1
0
mirror of https://github.com/golang/go synced 2024-11-23 05:50:05 -07:00

cmd/compile/internal/mips: use hardware NOP instruction as NOOP on mips platform

This CL uses mips hardware NOP instruction as NOOP on mips platform, instead of pseudo NOP "nor $zero,$zero,$zero".

Change-Id: I336e1ba4228b71e6bfc6be66b367a4327fb3b36e
Reviewed-on: https://go-review.googlesource.com/c/go/+/509015
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
Junxian Zhu 2023-07-12 19:07:55 +08:00 committed by Joel Sing
parent 64c2072a94
commit 68a32ced0f
2 changed files with 2 additions and 10 deletions

View File

@ -46,10 +46,6 @@ func zerorange(pp *objw.Progs, p *obj.Prog, off, cnt int64, _ *uint32) *obj.Prog
}
func ginsnop(pp *objw.Progs) *obj.Prog {
p := pp.Prog(mips.ANOR)
p.From.Type = obj.TYPE_REG
p.From.Reg = mips.REG_R0
p.To.Type = obj.TYPE_REG
p.To.Reg = mips.REG_R0
p := pp.Prog(mips.ANOOP)
return p
}

View File

@ -50,10 +50,6 @@ func zerorange(pp *objw.Progs, p *obj.Prog, off, cnt int64, _ *uint32) *obj.Prog
}
func ginsnop(pp *objw.Progs) *obj.Prog {
p := pp.Prog(mips.ANOR)
p.From.Type = obj.TYPE_REG
p.From.Reg = mips.REG_R0
p.To.Type = obj.TYPE_REG
p.To.Reg = mips.REG_R0
p := pp.Prog(mips.ANOOP)
return p
}