ref: 3942d40cb5532fe51ac97e5a15610d20a0691fa3
parent: faebdc376eb7d03cff18cc20d997d328f5fdd9b7
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jul 15 20:48:29 EDT 2015
Remove janky return register crud for stack types. We don't return in a register. Why are we trying to pick one?
--- a/6/isel.c
+++ b/6/isel.c
@@ -478,15 +478,14 @@
Loc *stkbump; /* calculated stack offset */
int argsz, argoff;
size_t i, a;
+ Type *t;
rsp = locphysreg(Rrsp);
- if (tybase(exprtype(n))->type == Tyvoid) {
+ t = exprtype(n);
+ if (tybase(t)->type == Tyvoid || stacktype(t)) {
retloc = NULL;
ret = NULL;
- } else if (stacktype(exprtype(n))) {
- retloc = locphysreg(Rrax);
- ret = locreg(ModeQ);
- } else if (floattype(exprtype(n))) {
+ } else if (floattype(t)) {
retloc = coreg(Rxmm0d, mode(n));
ret = locreg(mode(n));
} else {