mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
softmmu templates: optionally pass CPUState to memory access functions
Optionally, make memory access helpers take a parameter for CPUState instead of relying on global env. On most targets, perform simple moves to reorder registers. On i386, switch from regparm(3) calling convention to standard stack-based version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
6a18ae2d29
commit
e141ab52d2
16 changed files with 576 additions and 44 deletions
|
@ -798,6 +798,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
|
|||
case INDEX_op_qemu_st8:
|
||||
case INDEX_op_qemu_st16:
|
||||
case INDEX_op_qemu_st32:
|
||||
#ifdef CONFIG_TCG_PASS_AREG0
|
||||
tcg_out_r(s, TCG_AREG0);
|
||||
#endif
|
||||
tcg_out_r(s, *args++);
|
||||
tcg_out_r(s, *args++);
|
||||
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
|
||||
|
@ -808,6 +811,9 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
|
|||
#endif
|
||||
break;
|
||||
case INDEX_op_qemu_st64:
|
||||
#ifdef CONFIG_TCG_PASS_AREG0
|
||||
tcg_out_r(s, TCG_AREG0);
|
||||
#endif
|
||||
tcg_out_r(s, *args++);
|
||||
#if TCG_TARGET_REG_BITS == 32
|
||||
tcg_out_r(s, *args++);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue