5g: register allocation bugs

Fixes #1099.

R=ken2, r
CC=golang-dev
https://golang.org/cl/2147047
10 files changed