diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-26 13:33:27 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-26 13:33:27 -0500 |
commit | 5bff7146fd6fe9b1c0611ad3365455b37c54cdf3 (patch) | |
tree | 124966b2925da59899eaa9536f1a0bccb69d53e8 /lisc/isel.c | |
parent | 6275cd6e0676eba4c80bc3293b4b8c28189eaa86 (diff) | |
download | roux-5bff7146fd6fe9b1c0611ad3365455b37c54cdf3.tar.gz |
add cheapo static assert
Diffstat (limited to 'lisc/isel.c')
-rw-r--r-- | lisc/isel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index 26f103f..e60d6d6 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -528,15 +528,15 @@ classify(Ins *i0, Ins *i1, AClass *ac, int op) return ((6-nint) << 4) | ((8-nsse) << 8); } -int rsave[/* NRSave */] = { +int rsave[] = { RDI, RSI, RDX, RCX, R8, R9, R10, R11, RAX, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14 }; -typedef char make_sure_rsave_has_correct_size[ - sizeof rsave == NRSave * sizeof(int) ? 1 : -1 -]; -int rclob[NRClob] = {RBX, R12, R13, R14, R15}; +int rclob[] = {RBX, R12, R13, R14, R15}; + +MAKESURE(rsave_has_correct_size, sizeof rsave == NRSave * sizeof(int)); +MAKESURE(rclob_has_correct_size, sizeof rclob == NRClob * sizeof(int)); ulong calldef(Ins i, int p[2]) |