aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorgrischka <grischka>2016-10-04 17:36:51 +0200
committergrischka <grischka>2016-10-04 17:36:51 +0200
commitb691585785086024549cfb9ac65f3397263965aa (patch)
treee7b13cf60f7c967c7230b4175d2e81eed950d7ac /tcc.h
parent1c4cf1855632d712a67f3cc28e43469f8b5f936a (diff)
downloadtinycc-b691585785086024549cfb9ac65f3397263965aa.tar.gz
tinycc-b691585785086024549cfb9ac65f3397263965aa.tar.bz2
tccgen: arm/i386: save_reg_upstack
tccgen.c:gv() when loading long long from lvalue, before was saving all registers which caused problems in the arm function call register parameter preparation, as with void foo(long long y, int x); int main(void) { unsigned int *xx[1], x; unsigned long long *yy[1], y; foo(**yy, **xx); return 0; } Now only the modified register is saved if necessary, as in this case where it is used to store the result of the post-inc: long long *p, v, **pp; v = 1; p = &v; p[0]++; printf("another long long spill test : %lld\n", *p); i386-gen.c : - found a similar problem with TOK_UMULL caused by the vstack juggle in tccgen:gen_opl() (bug seen only when using EBX as 4th register)
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index c25ab01..49fde3b 100644
--- a/tcc.h
+++ b/tcc.h
@@ -1295,6 +1295,7 @@ ST_FUNC void lexpand_nr(void);
#endif
ST_FUNC void vpushv(SValue *v);
ST_FUNC void save_reg(int r);
+ST_FUNC void save_reg_upstack(int r, int n);
ST_FUNC int get_reg(int rc);
ST_FUNC void save_regs(int n);
ST_FUNC void gaddrof(void);