]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.ssa] cmd/compile: support NaCl in SSA for ARM
authorCherry Zhang <cherryyz@google.com>
Thu, 7 Jul 2016 14:49:43 +0000 (10:49 -0400)
committerCherry Zhang <cherryyz@google.com>
Sat, 16 Jul 2016 03:13:45 +0000 (03:13 +0000)
commit6b6de15d327142a19c978c8b9811310b174fd60b
tree8c14e4054d5c8860d704c95b9d46563582b12191
parent7d70f84f547a1b60279985fa91c407ddfde9bd64
[dev.ssa] cmd/compile: support NaCl in SSA for ARM

NaCl code runs in sandbox and there are restrictions for its
instruction uses
(https://developer.chrome.com/native-client/reference/sandbox_internals/arm-32-bit-sandbox).

Like the legacy backend, on NaCl,
- don't use R9, which is used as NaCl's "thread pointer".
- don't use Duff's device.
- don't use indexed load/stores.
- the assembler rewrites DIV/MOD to runtime calls, which on NaCl
  clobbers R12, so R12 is marked as clobbered for DIV/MOD.
- other restrictions are satisfied by the assembler.

Enable SSA specific tests on nacl/arm, and disable non-SSA ones.

Updates #15365.

Change-Id: I9262693ec6756b89ca29d3ae4e52a96fe5403b02
Reviewed-on: https://go-review.googlesource.com/24859
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/ssa/config.go
src/cmd/compile/internal/ssa/gen/ARM.rules
src/cmd/compile/internal/ssa/regalloc.go
src/cmd/compile/internal/ssa/rewriteARM.go
test/live.go
test/live_ssa.go
test/nilptr3.go
test/nilptr3_ssa.go
test/sliceopt.go