mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
riscv: simplify load from pool
This commit is contained in:
parent
8c7990d4a1
commit
33eddc7b62
2 changed files with 2 additions and 4 deletions
|
@ -454,7 +454,7 @@ static void comr(jit_state_t *_jit, int32_t r0, int32_t r1);
|
|||
static void movr(jit_state_t *_jit, int32_t r0, int32_t r1);
|
||||
static void movi(jit_state_t *_jit, int32_t r0, jit_word_t i0);
|
||||
|
||||
static uint64_t patch_load_from_pool(uint64_t instrs, uint32_t off);
|
||||
static uint64_t patch_load_from_pool(uint64_t instrs, int32_t off);
|
||||
static jit_reloc_t emit_load_from_pool(jit_state_t *_jit, uint64_t insts);
|
||||
static jit_reloc_t mov_addr(jit_state_t *_jit, int32_t r0);
|
||||
static jit_reloc_t movi_from_pool(jit_state_t *_jit, int32_t r0);
|
||||
|
|
|
@ -317,9 +317,7 @@ static void
|
|||
patch_load_from_pool_offset(uint32_t *loc, int32_t v)
|
||||
{
|
||||
load_from_pool_t *i = (load_from_pool_t *) loc;
|
||||
int32_t hi20 = v >>12;
|
||||
i->inst.auipc.U.imm31_12 = hi20;
|
||||
i->inst.load.I.imm11_0 = v - (hi20<<12);
|
||||
i->l = patch_load_from_pool(i->l, v);
|
||||
}
|
||||
static int32_t
|
||||
read_load_from_pool_offset(uint32_t *loc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue