x86-asm: Correctly infer register size for bools
Register operands of type _Bool weren't correctly getting the 8-bit sized registers (but rather used the default 32-bit ones).
This commit is contained in:
@ -1478,7 +1478,8 @@ ST_FUNC void subst_asm_operand(CString *add_str,
|
||||
tcc_error("internal compiler error");
|
||||
|
||||
/* choose register operand size */
|
||||
if ((sv->type.t & VT_BTYPE) == VT_BYTE)
|
||||
if ((sv->type.t & VT_BTYPE) == VT_BYTE ||
|
||||
(sv->type.t & VT_BTYPE) == VT_BOOL)
|
||||
size = 1;
|
||||
else if ((sv->type.t & VT_BTYPE) == VT_SHORT)
|
||||
size = 2;
|
||||
|
||||
Reference in New Issue
Block a user