1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:04:49 -07:00

cmd/asm/internal/arch: use generic obj.Rconv function everywhere

Rather than using arm64.Rconv directly in the archArm64 constructor
use the generic obj.Rconv helper. This removes the only use of
arm64.Rconv outside the arm64 package itself.

Change-Id: I99e9e7156b52cd26dc134f610f764ec794264e2c
Reviewed-on: https://go-review.googlesource.com/38756
Run-TryBot: Dave Cheney <dave@cheney.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Dave Cheney 2017-03-29 14:35:27 +11:00
parent 3e4afe2307
commit bfd8093c96

View File

@ -238,15 +238,15 @@ func archArm64() *Arch {
register := make(map[string]int16)
// Create maps for easy lookup of instruction names etc.
// Note that there is no list of names as there is for 386 and amd64.
register[arm64.Rconv(arm64.REGSP)] = int16(arm64.REGSP)
register[obj.Rconv(arm64.REGSP)] = int16(arm64.REGSP)
for i := arm64.REG_R0; i <= arm64.REG_R31; i++ {
register[arm64.Rconv(i)] = int16(i)
register[obj.Rconv(i)] = int16(i)
}
for i := arm64.REG_F0; i <= arm64.REG_F31; i++ {
register[arm64.Rconv(i)] = int16(i)
register[obj.Rconv(i)] = int16(i)
}
for i := arm64.REG_V0; i <= arm64.REG_V31; i++ {
register[arm64.Rconv(i)] = int16(i)
register[obj.Rconv(i)] = int16(i)
}
register["LR"] = arm64.REGLINK
register["DAIF"] = arm64.REG_DAIF