commit 1c41819e40c2bc91f7495ba692e528fdaff4a25d
parent f574e2e82a1877b577464f516ca19d3f904d4150
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Fri, 4 Feb 2022 18:45:08 -0600
x64: fix 1 byte reg to reg comparisons
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x64.c b/x64.c
@@ -547,7 +547,7 @@ _cmp_reg_to_reg(struct data *const text, const uint8_t size, const enum reg reg1
if (rex)
array_addlit(text, rex);
- array_addlit(text, 0x3b);
+ array_addlit(text, 0x3A + (size != 1));
array_addlit(text, (MOD_DIRECT << 6) | (reg1 << 3) | reg2);
}