mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 19:21:06 +00:00
cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros
The ld*_raw and st*_raw macros are now only used within the code produced by cpu_ldst_template.h, and only in three places. Expand these out to just call the ld_p and st_p functions directly. Note that in all the callsites the address argument is a uintptr_t, so we can drop that part of the double-cast used in the saddr() and laddr() macros. Backports commit 355392329e4a843580e53cb027ed85e0cbebb640 from qemu
This commit is contained in:
parent
1a880ef99b
commit
f1a1f3c642
|
@ -92,7 +92,7 @@ glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
|
|||
oi, retaddr);
|
||||
} else {
|
||||
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
|
||||
res = glue(glue(ld, USUFFIX), _raw)(hostaddr);
|
||||
res = glue(glue(ld, USUFFIX), _p)((uint8_t *)hostaddr);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
|
|||
MMUSUFFIX)(env, addr, oi, retaddr);
|
||||
} else {
|
||||
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
|
||||
res = glue(glue(lds, SUFFIX), _raw)(hostaddr);
|
||||
res = glue(glue(lds, SUFFIX), _p)((uint8_t *)hostaddr);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
|
|||
retaddr);
|
||||
} else {
|
||||
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
|
||||
glue(glue(st, SUFFIX), _raw)(hostaddr, v);
|
||||
glue(glue(st, SUFFIX), _p)((uint8_t *)hostaddr, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue