History

x86-64 bug fix: Use stack with alignment just like 32bit environments.

Shinichiro Hamaji committed 17 years ago

Commit e6db5f51 parent 06fa15f1 file · +4 −5Browse files

Unified · Split

tcc.c+4−5
@@ -4802,13 +4802,12 @@ void save_reg(int r) · 4801 unmodified lines
48024802 r = p->r & VT_VALMASK;
48034803 /* store register in the stack */
48044804 type = &p->type;
4805−#ifndef TCC_TARGET_X86_64
4806− if ((p->r & VT_LVAL) ||
4805+ if ((p->r & VT_LVAL) ||
48074806 (!is_float(type->t) && (type->t & VT_BTYPE) != VT_LLONG))
4808− type = &int_type;
4809−#else
4810− if (p->r & VT_LVAL)
4807+#ifdef TCC_TARGET_X86_64
48114808 type = &char_pointer_type;
4809+#else
4810+ type = &int_type;
48124811 #endif
48134812 size = type_size(type, &align);
48144813 loc = (loc - size) & -align;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t