diff options
| author | Cherry Zhang <cherryyz@google.com> | 2016-08-10 13:24:03 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2016-08-15 03:37:34 +0000 |
| commit | d99cee79b98dfb6c1cd8e64c96845ee29aa28b4c (patch) | |
| tree | 0ff90ed7f4ed8db4040630d9b99ddc911cb21dcf /src/cmd/internal/obj/link.go | |
| parent | 94c8e59ae11d374cd8dd46afec4710ad10500ad9 (diff) | |
| download | go-d99cee79b98dfb6c1cd8e64c96845ee29aa28b4c.tar.xz | |
[dev.ssa] cmd/compile, etc.: more ARM64 optimizations, and enable SSA by default
Add more ARM64 optimizations:
- use hardware zero register when it is possible.
- use shifted ops.
The assembler supports shifted ops but not documented, nor knows
how to print it. This CL adds them.
- enable fast division.
This was disabled because it makes the old backend generate slower
code. But with SSA it generates faster code.
Turn on SSA by default, also adjust tests.
Change-Id: I7794479954c83bb65008dcb457bc1e21d7496da6
Reviewed-on: https://go-review.googlesource.com/26950
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/internal/obj/link.go')
| -rw-r--r-- | src/cmd/internal/obj/link.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/link.go b/src/cmd/internal/obj/link.go index b6861f4c1e..3c66eecbf0 100644 --- a/src/cmd/internal/obj/link.go +++ b/src/cmd/internal/obj/link.go @@ -112,13 +112,17 @@ import ( // val = int32(y) // // reg<<shift, reg>>shift, reg->shift, reg@>shift -// Shifted register value, for ARM. +// Shifted register value, for ARM and ARM64. // In this form, reg must be a register and shift can be a register or an integer constant. // Encoding: // type = TYPE_SHIFT +// On ARM: // offset = (reg&15) | shifttype<<5 | count // shifttype = 0, 1, 2, 3 for <<, >>, ->, @> // count = (reg&15)<<8 | 1<<4 for a register shift count, (n&31)<<7 for an integer constant. +// On ARM64: +// offset = (reg&31)<<16 | shifttype<<22 | (count&63)<<10 +// shifttype = 0, 1, 2 for <<, >>, -> // // (reg, reg) // A destination register pair. When used as the last argument of an instruction, |
