mirror of
https://github.com/golang/go
synced 2024-11-17 00:24:48 -07:00
cmd/asm: fix condition check to work on ppc64
A condition check was added to parse.go in CL 405542 to prevent usage of scaled operands on ppc64. However while trying to improve the error notification message, an if-condition was left out by oversight. This CL corrects that. Change-Id: I8cef3dd194c75343354ffe888b5e639e694badde Reviewed-on: https://go-review.googlesource.com/c/go/+/426994 Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Archana Ravindar <aravind5@in.ibm.com> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
ebc75ac1c6
commit
59b15726d1
@ -1017,9 +1017,7 @@ func (p *Parser) registerIndirect(a *obj.Addr, prefix rune) {
|
||||
if scale != 0 && scale != 1 && (p.arch.Family == sys.ARM64 ||
|
||||
p.arch.Family == sys.PPC64) {
|
||||
// Support (R1)(R2) (no scaling) and (R1)(R2*1).
|
||||
if p.arch.Family != sys.PPC64 {
|
||||
p.errorf("%s doesn't support scaled register format", p.arch.Name)
|
||||
}
|
||||
p.errorf("%s doesn't support scaled register format", p.arch.Name)
|
||||
} else {
|
||||
a.Scale = int16(scale)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user