mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 18:06:56 +00:00
tcg/i386: Always use %ebp for TCG_AREG0
For x86_64, this can remove a REX prefix resulting in smaller code when manipulating globals of type i32, as we move them between backing store via cpu_env, aka TCG_AREG0. Backports commit 5740d9f714835964873325d1210b26811252843f from qemu
This commit is contained in:
parent
7ab51fc012
commit
f3a8a4a306
|
@ -84,6 +84,8 @@ typedef enum {
|
||||||
TCG_REG_RBP = TCG_REG_EBP,
|
TCG_REG_RBP = TCG_REG_EBP,
|
||||||
TCG_REG_RSI = TCG_REG_ESI,
|
TCG_REG_RSI = TCG_REG_ESI,
|
||||||
TCG_REG_RDI = TCG_REG_EDI,
|
TCG_REG_RDI = TCG_REG_EDI,
|
||||||
|
|
||||||
|
TCG_AREG0 = TCG_REG_EBP,
|
||||||
} TCGReg;
|
} TCGReg;
|
||||||
|
|
||||||
/* used for function call generation */
|
/* used for function call generation */
|
||||||
|
@ -227,12 +229,6 @@ extern bool have_avx2;
|
||||||
#define TCG_TARGET_extract_i64_valid(ofs, len) \
|
#define TCG_TARGET_extract_i64_valid(ofs, len) \
|
||||||
(((ofs) == 8 && (len) == 8) || ((ofs) + (len)) == 32)
|
(((ofs) == 8 && (len) == 8) || ((ofs) + (len)) == 32)
|
||||||
|
|
||||||
#if TCG_TARGET_REG_BITS == 64
|
|
||||||
# define TCG_AREG0 TCG_REG_R14
|
|
||||||
#else
|
|
||||||
# define TCG_AREG0 TCG_REG_EBP
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
|
static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue