aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2009-04-02 01:46:44 +0900
committergrischka <grischka>2009-04-18 15:07:09 +0200
commite6db5f5fb670598cc6dc9750537c1df39fa4e527 (patch)
treef16cb673436bf7a31fd9587e2c3b7872e4294961 /tcc.c
parent06fa15fb9912dde92c61541a759dc217962967b3 (diff)
downloadtinycc-e6db5f5fb670598cc6dc9750537c1df39fa4e527.tar.gz
tinycc-e6db5f5fb670598cc6dc9750537c1df39fa4e527.tar.bz2
x86-64 bug fix: Use stack with alignment just like 32bit environments.
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tcc.c b/tcc.c
index f707791..2ba115d 100644
--- a/tcc.c
+++ b/tcc.c
@@ -4802,13 +4802,12 @@ void save_reg(int r)
r = p->r & VT_VALMASK;
/* store register in the stack */
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))
- type = &int_type;
-#else
- if (p->r & VT_LVAL)
+#ifdef TCC_TARGET_X86_64
type = &char_pointer_type;
+#else
+ type = &int_type;
#endif
size = type_size(type, &align);
loc = (loc - size) & -align;