arm64/arm64asm: fix the wrong shifted register offset go assembler syntax

The current Go assembler encodes "MOVB R4, (R2)(R6)" as "44682638"
and encodes "MOVB R4, (R2)(R6<<0)" as "44782638", but the current
Go disassembler returns the same Go syntax "MOVB R4, (R3)(R6) for
the above two binarys. To match the assembler, this patch fixes the
wrong shifted register go syntax.

The fixed Go syntax:
  strb w4, [x2, x6, lsl #0]  ->   MOVB R4, (R2)(R6<<0)
  strb w4, [x2, x6]          ->   MOVB R4, (R2)(R6)

Change-Id: I60d4cdf1c04511891268efe510a18291fe0c0da6
Reviewed-on: https://go-review.googlesource.com/c/arch/+/214358
Run-TryBot: fannie zhang <Fannie.Zhang@arm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Trust: fannie zhang <Fannie.Zhang@arm.com>
3 files changed
tree: c6b0fad77187e3bc5a6b2adcc343c06fafb35a83
  1. AUTHORS
  2. CONTRIBUTING.md
  3. CONTRIBUTORS
  4. LICENSE
  5. PATENTS
  6. README.md
  7. arm/
  8. arm64/
  9. codereview.cfg
  10. go.mod
  11. go.sum
  12. ppc64/
  13. x86/
README.md

arch

This repository holds machine architecture information used by the Go toolchain. The parts needed in the main Go repository are copied in.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the arch repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/arch:” in the subject line, so it is easy to find.