mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
cmd/internal/obj/arm64: replace range checks with isaddcon2
isaddcon2 tests for the range 0 <= v <= 0xffffff - replace duplicated range checks with calls to isaddcon2. Change-Id: Ia6f331852ed3d77715b265cb4fcc500579eac711 Reviewed-on: https://go-review.googlesource.com/c/go/+/650935 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Fannie Zhang <Fannie.Zhang@arm.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
4f11f8ff7d
commit
dab10bca37
@ -1953,7 +1953,7 @@ func (c *ctxt7) con32class(a *obj.Addr) int {
|
||||
return C_BITCON
|
||||
}
|
||||
|
||||
if 0 <= v && v <= 0xffffff {
|
||||
if isaddcon2(int64(v)) {
|
||||
return C_ADDCON2
|
||||
}
|
||||
return C_LCON
|
||||
@ -2205,7 +2205,7 @@ func (c *ctxt7) aclass(a *obj.Addr) int {
|
||||
return C_BITCON
|
||||
}
|
||||
|
||||
if 0 <= v && v <= 0xffffff {
|
||||
if isaddcon2(v) {
|
||||
return C_ADDCON2
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user