From 8037e3ba5e3c15f9e06d41e5784286f48474b6f3 Mon Sep 17 00:00:00 2001 From: Kai Backman Date: Fri, 16 Oct 2009 12:02:14 -0700 Subject: [PATCH] fix arm build, add 64 bit cgen_asop R=rsc APPROVED=rsc DELTA=21 (21 added, 0 deleted, 0 changed) OCL=35845 CL=35845 --- src/cmd/5g/ggen.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c index 13b58790648..f1829e5df73 100644 --- a/src/cmd/5g/ggen.c +++ b/src/cmd/5g/ggen.c @@ -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: ;