diff options
| author | Michael Matz <matz@suse.de> | 2016-08-06 23:19:04 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:10 +0100 |
| commit | c0368604e196d53b281cd2aceb140b5facd36ed7 (patch) | |
| tree | 79e43dc55a8404909231fe2f91516df9a0ebcc52 /i386-asm.c | |
| parent | 45b24c37a0ea8886ac13c7a93741566c197071f4 (diff) | |
| download | tinycc-c0368604e196d53b281cd2aceb140b5facd36ed7.tar.gz tinycc-c0368604e196d53b281cd2aceb140b5facd36ed7.tar.bz2 | |
x86-64-asm: Fix ltr/str and push/pop operands
str accepts rm16/r32/r64, and push/pop defaults to 64 when given
memory operands (to 32 on i386).
Diffstat (limited to 'i386-asm.c')
| -rw-r--r-- | i386-asm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -869,6 +869,9 @@ ST_FUNC void asm_opcode(TCCState *s1, int opcode) if ((opcode == TOK_ASM_push || opcode == TOK_ASM_pop) && (ops[0].type & (OP_SEG | OP_IM8S | OP_IM32))) s = 2; + else if ((opcode == TOK_ASM_push || opcode == TOK_ASM_pop) && + (ops[0].type & OP_EA)) + s = NBWLX - 2; else tcc_error("cannot infer opcode suffix"); } |
