author | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2012年12月11日 13:14:09 -0200 |
---|---|---|
committer | pcpa <paulo.cesar.pereira.de.andrade@gmail.com> | 2012年12月11日 13:14:09 -0200 |
commit | a04df966c056513cdd85086e2c85b491bad55f3c (patch) | |
tree | cb0b8c43462d50ed2a2e81df5f2337de02e8f7b0 /lib/lightning.c | |
parent | 7e3d863767300bc65ad8742eb9494e700dcebf19 (diff) | |
download | lightning-a04df966c056513cdd85086e2c85b491bad55f3c.tar.gz |
-rw-r--r-- | lib/lightning.c | 27 |
diff --git a/lib/lightning.c b/lib/lightning.c index 7bef394..a416872 100644 --- a/lib/lightning.c +++ b/lib/lightning.c @@ -262,31 +262,10 @@ _jit_unget_reg(jit_state_t *_jit, jit_int32_t regno) unsigned long jit_regset_scan1(jit_regset_t set, jit_int32_t offset) { - jit_int32_t index; - jit_int32_t length; - union { - jit_uint64_t ul; - jit_uint8_t uc[8]; - } data; - assert(offset >= 0 && offset <= 63); - data.ul = set; - if (data.uc[index = offset >> 3]) { - length = (index + 1) << 3; - for (; offset < length; offset++) { - if (set & (1LL << offset)) - return (offset); - } - } - for (index++; index < 8; index++) { - if (data.uc[index]) { - offset = index << 3; - length = (index + 1) << 3; - for (; offset < length; offset++) { - if (set & (1LL << offset)) - return (offset); - } - } + for (; offset < 64; offset++) { + if (set & (1LL << offset)) + return (offset); } return (ULONG_MAX); } |