mirror of
https://github.com/frida/tinycc
synced 2025-01-04 11:04:42 +03:00
x86-64 bug fix: Use stack with alignment just like 32bit environments.
This commit is contained in:
parent
06fa15fb99
commit
e6db5f5fb6
9
tcc.c
9
tcc.c
@ -4802,13 +4802,12 @@ void save_reg(int r)
|
|||||||
r = p->r & VT_VALMASK;
|
r = p->r & VT_VALMASK;
|
||||||
/* store register in the stack */
|
/* store register in the stack */
|
||||||
type = &p->type;
|
type = &p->type;
|
||||||
#ifndef TCC_TARGET_X86_64
|
if ((p->r & VT_LVAL) ||
|
||||||
if ((p->r & VT_LVAL) ||
|
|
||||||
(!is_float(type->t) && (type->t & VT_BTYPE) != VT_LLONG))
|
(!is_float(type->t) && (type->t & VT_BTYPE) != VT_LLONG))
|
||||||
type = &int_type;
|
#ifdef TCC_TARGET_X86_64
|
||||||
#else
|
|
||||||
if (p->r & VT_LVAL)
|
|
||||||
type = &char_pointer_type;
|
type = &char_pointer_type;
|
||||||
|
#else
|
||||||
|
type = &int_type;
|
||||||
#endif
|
#endif
|
||||||
size = type_size(type, &align);
|
size = type_size(type, &align);
|
||||||
loc = (loc - size) & -align;
|
loc = (loc - size) & -align;
|
||||||
|
Loading…
Reference in New Issue
Block a user