mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 18:05:29 +00:00
tcg: Fix types in tcg_regset_{set,reset}_reg
There was a potential problem here with an ILP32 host with 64 host registers. Backports commit 80a8b9a910e14d4a1937f70dce944891990f3441 from qemu
This commit is contained in:
parent
fc8b4316a9
commit
fe632c4df8
|
@ -189,9 +189,9 @@ typedef enum TCGOpcode {
|
|||
NB_OPS,
|
||||
} TCGOpcode;
|
||||
|
||||
#define tcg_regset_set_reg(d, r) (d) |= 1L << (r)
|
||||
#define tcg_regset_reset_reg(d, r) (d) &= ~(1L << (r))
|
||||
#define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1)
|
||||
#define tcg_regset_set_reg(d, r) ((d) |= (TCGRegSet)1 << (r))
|
||||
#define tcg_regset_reset_reg(d, r) ((d) &= ~((TCGRegSet)1 << (r)))
|
||||
#define tcg_regset_test_reg(d, r) (((d) >> (r)) & 1)
|
||||
|
||||
#ifndef TCG_TARGET_INSN_UNIT_SIZE
|
||||
# error "Missing TCG_TARGET_INSN_UNIT_SIZE"
|
||||
|
|
Loading…
Reference in a new issue