From 0b0e64c2c95487815a8d252ab833e5eccfb5aeb5 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 3 Oct 2016 20:39:48 +0200 Subject: x86-asm: Correct register size for pointer ops A pointer is 64 bit as well, so it needs a full register for register operands. --- i386-asm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'i386-asm.c') diff --git a/i386-asm.c b/i386-asm.c index 1d1ebcf..16b2e91 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -1493,7 +1493,8 @@ ST_FUNC void subst_asm_operand(CString *add_str, else if ((sv->type.t & VT_BTYPE) == VT_SHORT) size = 2; #ifdef TCC_TARGET_X86_64 - else if ((sv->type.t & VT_BTYPE) == VT_LLONG) + else if ((sv->type.t & VT_BTYPE) == VT_LLONG || + (sv->type.t & VT_BTYPE) == VT_PTR) size = 8; #endif else -- cgit v1.3.1