diff options
Diffstat (limited to 'src/lj_target.h')
-rw-r--r-- | src/lj_target.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_target.h b/src/lj_target.h index 13de8fc6..4808a38c 100644 --- a/src/lj_target.h +++ b/src/lj_target.h | |||
@@ -16,17 +16,19 @@ typedef uint32_t Reg; | |||
16 | 16 | ||
17 | /* The hi-bit is NOT set for an allocated register. This means the value | 17 | /* The hi-bit is NOT set for an allocated register. This means the value |
18 | ** can be directly used without masking. The hi-bit is set for a register | 18 | ** can be directly used without masking. The hi-bit is set for a register |
19 | ** allocation hint or for RID_INIT. | 19 | ** allocation hint or for RID_INIT, RID_SINK or RID_SUNK. |
20 | */ | 20 | */ |
21 | #define RID_NONE 0x80 | 21 | #define RID_NONE 0x80 |
22 | #define RID_MASK 0x7f | 22 | #define RID_MASK 0x7f |
23 | #define RID_INIT (RID_NONE|RID_MASK) | 23 | #define RID_INIT (RID_NONE|RID_MASK) |
24 | #define RID_SINK (RID_INIT-1) | ||
25 | #define RID_SUNK (RID_INIT-2) | ||
24 | 26 | ||
25 | #define ra_noreg(r) ((r) & RID_NONE) | 27 | #define ra_noreg(r) ((r) & RID_NONE) |
26 | #define ra_hasreg(r) (!((r) & RID_NONE)) | 28 | #define ra_hasreg(r) (!((r) & RID_NONE)) |
27 | 29 | ||
28 | /* The ra_hashint() macro assumes a previous test for ra_noreg(). */ | 30 | /* The ra_hashint() macro assumes a previous test for ra_noreg(). */ |
29 | #define ra_hashint(r) ((r) != RID_INIT) | 31 | #define ra_hashint(r) ((r) < RID_SUNK) |
30 | #define ra_gethint(r) ((Reg)((r) & RID_MASK)) | 32 | #define ra_gethint(r) ((Reg)((r) & RID_MASK)) |
31 | #define ra_sethint(rr, r) rr = (uint8_t)((r)|RID_NONE) | 33 | #define ra_sethint(rr, r) rr = (uint8_t)((r)|RID_NONE) |
32 | #define ra_samehint(r1, r2) (ra_gethint((r1)^(r2)) == 0) | 34 | #define ra_samehint(r1, r2) (ra_gethint((r1)^(r2)) == 0) |