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:
parent
763b1f87e7
commit
297ae99c3f
2 changed files with 4 additions and 2 deletions
|
@ -91,6 +91,8 @@ enum jit_reloc_kind
|
||||||
JIT_RELOC_JCC_WITH_VENEER,
|
JIT_RELOC_JCC_WITH_VENEER,
|
||||||
JIT_RELOC_LOAD_FROM_POOL,
|
JIT_RELOC_LOAD_FROM_POOL,
|
||||||
#endif
|
#endif
|
||||||
|
JIT_RELOC_MASK = 15,
|
||||||
|
JIT_RELOC_FLAG_0 = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct jit_reloc
|
typedef struct jit_reloc
|
||||||
|
|
|
@ -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);
|
ASSERT((diff & ((1 << reloc.rsh) - 1)) == 0);
|
||||||
diff >>= reloc.rsh;
|
diff >>= reloc.rsh;
|
||||||
|
|
||||||
switch (reloc.kind)
|
switch (reloc.kind & JIT_RELOC_MASK)
|
||||||
{
|
{
|
||||||
case JIT_RELOC_ABSOLUTE:
|
case JIT_RELOC_ABSOLUTE:
|
||||||
if (sizeof(diff) == 4)
|
if (sizeof(diff) == 4)
|
||||||
|
@ -1365,7 +1365,7 @@ emit_literal_pool(jit_state_t *_jit, enum guard_pool guard)
|
||||||
if (_jit->overflow)
|
if (_jit->overflow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (entry->reloc.kind) {
|
switch (entry->reloc.kind & JIT_RELOC_MASK) {
|
||||||
case JIT_RELOC_JMP_WITH_VENEER:
|
case JIT_RELOC_JMP_WITH_VENEER:
|
||||||
patch_jmp_offset((uint32_t*) loc, diff);
|
patch_jmp_offset((uint32_t*) loc, diff);
|
||||||
emit_veneer(_jit, (void*) (uintptr_t) entry->value);
|
emit_veneer(_jit, (void*) (uintptr_t) entry->value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue