diff options
| author | Michael Matz <matz@suse.de> | 2016-08-08 20:46:16 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:10 +0100 |
| commit | 0381387640fecfc1d8bd9e79d972a2b58c508069 (patch) | |
| tree | 39e348e4ecc5537f9b57dae4deaf03da51d26351 /i386-asm.c | |
| parent | 9e0af6d2b513ed7ee2f6221bbdf85a8e54e00fc1 (diff) | |
| download | tinycc-0381387640fecfc1d8bd9e79d972a2b58c508069.tar.gz tinycc-0381387640fecfc1d8bd9e79d972a2b58c508069.tar.bz2 | |
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).
Diffstat (limited to 'i386-asm.c')
| -rw-r--r-- | i386-asm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |
