aboutsummaryrefslogtreecommitdiff
path: root/c67-gen.c
diff options
context:
space:
mode:
authorjiang <30155751@qq.com>2014-05-03 23:51:09 +0800
committerjiang <30155751@qq.com>2014-05-03 23:51:09 +0800
commit089dea355a28da44376ce4f5195baa4b4e0b217d (patch)
tree6b06240e0d4f7271d3e165cbf962750e689e566c /c67-gen.c
parenta0d45c1bcd87d2388817076ac9b62343d8ae04c3 (diff)
downloadtinycc-089dea355a28da44376ce4f5195baa4b4e0b217d.tar.gz
tinycc-089dea355a28da44376ce4f5195baa4b4e0b217d.tar.bz2
tcc on i386 are still having problems at work.Thank Roy report again. Struck on several variables can be connected to commit in the register. I am worried whether tcc can run the os. Since my machine is ubuntu 64 bits I can test my machine.
Diffstat (limited to 'c67-gen.c')
-rw-r--r--c67-gen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/c67-gen.c b/c67-gen.c
index 209fa7f..07ae259 100644
--- a/c67-gen.c
+++ b/c67-gen.c
@@ -58,7 +58,7 @@
#define RC_IRET RC_C67_A4 /* function return: integer register */
#define RC_LRET RC_C67_A5 /* function return: second integer register */
#define RC_FRET RC_C67_A4 /* function return: float register */
-
+#define RC_MASK (RC_INT|RC_FLOAT)
/* pretty names for the registers */
enum {
TREG_EAX = 0, // really A2
@@ -1571,12 +1571,21 @@ void load(int r, SValue * sv)
v = fr & VT_VALMASK;
if (fr & VT_LVAL) {
+ if(fr & VT_TMP){
+ int size, align;
+ if((ft & VT_BTYPE) == VT_FUNC)
+ size = PTR_SIZE;
+ else
+ size = type_size(&sv->type, &align);
+ loc_stack(size, 0);
+ }
if (v == VT_LLOCAL) {
v1.type.t = VT_INT;
v1.r = VT_LOCAL | VT_LVAL;
v1.c.ul = fc;
load(r, &v1);
fr = r;
+ fc = 0;
} else if ((ft & VT_BTYPE) == VT_LDOUBLE) {
tcc_error("long double not supported");
} else if ((ft & VT_TYPE) == VT_BYTE) {