[dev.ssa] cmd/compile: handle GetG on ARM

Use hardware g register (R10) for GetG, allow g to appear at LHS of
some ops.

Progress on SSA backend for ARM. Now everything compiles and runs.

Updates #15365.

Change-Id: Icdf93585579faa86cc29b1e17ab7c90f0119fc4e
Reviewed-on: https://go-review.googlesource.com/23952
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Cherry Zhang 2016-05-31 14:01:34 -04:00
parent 0393ed8201
commit 93b8aab5c9
6 changed files with 151 additions and 115 deletions

View file

@ -24,7 +24,7 @@ var ssaRegToReg = []int16{
arm.REG_R7,
arm.REG_R8,
arm.REG_R9,
arm.REG_R10,
arm.REGG, // aka R10
arm.REG_R11,
arm.REG_R12,
arm.REGSP, // aka R13
@ -111,7 +111,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
// memory arg needs no code
case ssa.OpArg:
// input args need no code
case ssa.OpSP, ssa.OpSB:
case ssa.OpSP, ssa.OpSB, ssa.OpGetG:
// nothing to do
case ssa.OpCopy, ssa.OpARMMOVWconvert:
if v.Type.IsMemory() {