diff options
| author | 2025-10-23 19:29:35 +0200 | |
|---|---|---|
| committer | 2025-10-23 19:29:35 +0200 | |
| commit | 4dae8d9ab482aa5ca0ef9d10de1b1200e99b5859 (patch) | |
| tree | c41fcccd270becc4b25f0660df76f005550eeb5a /amd64/emit.c | |
| parent | a203377fffa4dfe57602904598c836245806c006 (diff) | |
amd64 missing stuff
Diffstat (limited to 'amd64/emit.c')
| -rw-r--r-- | amd64/emit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/amd64/emit.c b/amd64/emit.c index bf7813f..3dce9cb 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -658,6 +658,7 @@ DEFINSTR2(Xtest, { 8, PRAX, PU32, "\xA9", EN_I32}, /* TEST EAX, imm32 */ { 8, PRAX, PI32, "\xA9", EN_I32}, /* TEST RAX, imm32 */ {4|8, PGPR, PI8, "\xF6", EN_RI8, .r8=1}, /* TEST r8, imm8 */ + {4|8, PGPR, PI32, "\xF7", EN_RI32, .ext=0}, /* TEST r32/64, imm32 */ {4|8, PGPR, PGPR, "\x85", EN_RR}, /* TEST r32/64, r32/64 */ {4|8, PGPR, PMEM, "\x85", EN_RM}, /* TEST r32/64, m32/64 */ ) @@ -851,7 +852,7 @@ gencopy(uchar **pcode, enum irclass cls, struct block *blk, int curi, struct ope goto GOTLoad; } Xlea(pcode, cls, dst, ref2oper(val)); - } else if (val.bits == ZEROREF.bits && dst.t == OREG && !flagslivep(blk, curi)) { + } else if (val.bits == ZEROREF.bits && dst.t == OREG && (kisflt(cls) || !flagslivep(blk, curi))) { /* dst = 0 -> xor dst, dst; but only if it is ok to clobber flags */ Xxor(pcode, kisint(cls) ? KI4 : cls, dst, dst); } else if (isaddrcon(val)) { |