1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 18:50:21 +02:00

Add flag bits to the jit_reloc_kind enum

This commit is contained in:
Icecream95 2020-04-06 16:04:57 +12:00
parent 763b1f87e7
commit 297ae99c3f
No known key found for this signature in database
GPG key ID: 339D18472C107D93
2 changed files with 4 additions and 2 deletions

View file

@ -91,6 +91,8 @@ enum jit_reloc_kind
JIT_RELOC_JCC_WITH_VENEER,
JIT_RELOC_LOAD_FROM_POOL,
#endif
JIT_RELOC_MASK = 15,
JIT_RELOC_FLAG_0 = 16,
};
typedef struct jit_reloc

View file

@ -379,7 +379,7 @@ jit_patch_there(jit_state_t* _jit, jit_reloc_t reloc, jit_pointer_t addr)
ASSERT((diff & ((1 << reloc.rsh) - 1)) == 0);
diff >>= reloc.rsh;
switch (reloc.kind)
switch (reloc.kind & JIT_RELOC_MASK)
{
case JIT_RELOC_ABSOLUTE:
if (sizeof(diff) == 4)
@ -1365,7 +1365,7 @@ emit_literal_pool(jit_state_t *_jit, enum guard_pool guard)
if (_jit->overflow)
return;
switch (entry->reloc.kind) {
switch (entry->reloc.kind & JIT_RELOC_MASK) {
case JIT_RELOC_JMP_WITH_VENEER:
patch_jmp_offset((uint32_t*) loc, diff);
emit_veneer(_jit, (void*) (uintptr_t) entry->value);