From f0fa5603cfd2349dfa63ce2f45447f33bbf023b5 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Tue, 10 May 2016 03:33:14 +0200 Subject: x86-64: Run asmtest as well This fixes and activates the asm test that's part of tcctest.c also on x86-64, requiring a small fix for the 'm' constraint. --- i386-asm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'i386-asm.c') diff --git a/i386-asm.c b/i386-asm.c index 2cbc858..91345bf 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -1366,7 +1366,11 @@ ST_FUNC void subst_asm_operand(CString *add_str, snprintf(buf, sizeof(buf), "%d", (int)sv->c.i); cstr_cat(add_str, buf, -1); } else if ((r & VT_VALMASK) == VT_LOCAL) { +#ifdef TCC_TARGET_X86_64 + snprintf(buf, sizeof(buf), "%d(%%rbp)", (int)sv->c.i); +#else snprintf(buf, sizeof(buf), "%d(%%ebp)", (int)sv->c.i); +#endif cstr_cat(add_str, buf, -1); } else if (r & VT_LVAL) { reg = r & VT_VALMASK; -- cgit v1.3.1