mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
tcg: Introduce the 'z' constraint for a hardware zero register
For loongarch, mips, riscv and sparc, a zero register is available all the time. For aarch64, register index 31 depends on context: sometimes it is the stack pointer, and sometimes it is the zero register. Introduce a new general-purpose constraint which maps 0 to TCG_REG_ZERO, if defined. This differs from existing constant constraints in that const_arg[*] is recorded as false, indicating that the value is in a register. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
bf455ec50b
commit
6b8abd244b
8 changed files with 37 additions and 10 deletions
|
@ -927,7 +927,9 @@ operation uses a constant input constraint which does not allow all
|
|||
constants, it must also accept registers in order to have a fallback.
|
||||
The constraint '``i``' is defined generically to accept any constant.
|
||||
The constraint '``r``' is not defined generically, but is consistently
|
||||
used by each backend to indicate all registers.
|
||||
used by each backend to indicate all registers. If ``TCG_REG_ZERO``
|
||||
is defined by the backend, the constraint '``z``' is defined generically
|
||||
to map constant 0 to the hardware zero register.
|
||||
|
||||
The movi_i32 and movi_i64 operations must accept any constants.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue