summaryrefslogtreecommitdiff
path: root/6/asm.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-09-18 01:08:57 -0400
committerOri Bernstein <ori@eigenstate.org>2014-09-18 01:08:57 -0400
commitd5f312edc20a8f46eb5482f3e2a462ac839b881a (patch)
tree0bf6a272669a92749ca9dad446a28915a36354be /6/asm.h
parentd2a198f1959af5023bbc893fe396bb2f08262a61 (diff)
downloadmc-d5f312edc20a8f46eb5482f3e2a462ac839b881a.tar.gz
Correctly save/restore xmm registers.
Our allocator wasn't acutally saving them, so we clobbered.
Diffstat (limited to '6/asm.h')
-rw-r--r--6/asm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/6/asm.h b/6/asm.h
index 4c1d8a7..666bf26 100644
--- a/6/asm.h
+++ b/6/asm.h
@@ -3,7 +3,6 @@
#define Maxdef (2*Maxarg) /* maximum number of registers an insn can use or def */
#define Wordsz 4 /* the size of a "natural int" */
#define Ptrsz 8 /* the size of a machine word (ie, pointer size) */
-#define Nsaved 13 /* number of registers saved in the ABI */
typedef size_t regid;
@@ -131,7 +130,8 @@ struct Isel {
/* increased when we spill */
Loc *stksz;
- Loc *calleesave[Nsaved];
+ Loc *calleesave[Nreg];
+ size_t nsaved;
/* register allocator state */