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.
This commit is contained in:
Michael Matz
2016-05-10 03:33:14 +02:00
parent 4d68828259
commit f0fa5603cf
2 changed files with 31 additions and 13 deletions

View File

@ -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;