Commit 8037e3ba authored by Kai Backman's avatar Kai Backman

fix arm build, add 64 bit cgen_asop

R=rsc
APPROVED=rsc
DELTA=21  (21 added, 0 deleted, 0 changed)
OCL=35845
CL=35845
parent c58d9efc
......@@ -395,6 +395,8 @@ cgen_asop(Node *n)
goto hard;
if(!isint[nr->type->etype])
goto hard;
if(is64(nl->type) || is64(nr->type))
goto hard64;
switch(n->etype) {
case OADD:
......@@ -454,6 +456,25 @@ hard:
regfree(&n1);
regfree(&n2);
regfree(&n4);
goto ret;
hard64:
if(nr->ullman > nl->ullman) {
tempname(&n2, nr->type);
cgen(nr, &n2);
igen(nl, &n1, N);
} else {
igen(nl, &n1, N);
tempname(&n2, nr->type);
cgen(nr, &n2);
}
n3 = *n;
n3.left = &n1;
n3.right = &n2;
n3.op = n->etype;
cgen(&n3, &n1);
ret:
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment