8g: out of register bug fix

Fixes #868.

R=ken2
CC=golang-dev
https://golang.org/cl/1695049
diff --git a/src/cmd/8g/ggen.c b/src/cmd/8g/ggen.c
index 110446a..8a55ffd 100644
--- a/src/cmd/8g/ggen.c
+++ b/src/cmd/8g/ggen.c
@@ -672,8 +672,10 @@
 	a = optoas(op, nl->type);
 
 	if(nr->op == OLITERAL) {
+		tempname(&n2, nl->type);
+		cgen(nl, &n2);
 		regalloc(&n1, nl->type, res);
-		cgen(nl, &n1);
+		gmove(&n2, &n1);
 		sc = mpgetfix(nr->val.u.xval);
 		if(sc >= nl->type->width*8) {
 			// large shift gets 2 shifts by width