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
4802 r = p->r & VT_VALMASK;4802 r = p->r & VT_VALMASK;
4803 /* store register in the stack */4803 /* store register in the stack */
4804 type = &p->type;4804 type = &p->type;
4805#ifndef TCC_TARGET_X86_644805 if ((p->r & VT_LVAL) ||
4806 if ((p->r & VT_LVAL) ||
4807 (!is_float(type->t) && (type->t & VT_BTYPE) != VT_LLONG))4806 (!is_float(type->t) && (type->t & VT_BTYPE) != VT_LLONG))
4808 type = &int_type;4807#ifdef TCC_TARGET_X86_64
4809#else
4810 if (p->r & VT_LVAL)
4811 type = &char_pointer_type;4808 type = &char_pointer_type;
4809#else
4810 type = &int_type;
4812#endif4811#endif
4813 size = type_size(type, &align);4812 size = type_size(type, &align);
4814 loc = (loc - size) & -align;4813 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