diff options
| author | Cherry Zhang <cherryyz@google.com> | 2017-04-11 10:39:55 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2017-05-16 17:15:11 +0000 |
| commit | b53acd89db5847b9ddcba076df89bef8788dd348 (patch) | |
| tree | 493bcde661137e8aee2d73c96a3774f2c9bfd127 /src/cmd/internal/obj/mips/obj0.go | |
| parent | 84a51432a80686267e131f5d516559b3d82122b8 (diff) | |
| download | go-b53acd89db5847b9ddcba076df89bef8788dd348.tar.xz | |
cmd/internal/obj/mips: add support of LLV, SCV, NOOP instructions
LLV and SCV are 64-bit load-linked and store-conditional. They
were used in runtime as #define WORD. Change them to normal
instruction form.
NOOP is hardware no-op. It was written as WORD $0. Make a name
for it for better disassembly output.
Fixes #12561.
Fixes #18238.
Change-Id: I82c667ce756fa83ef37b034b641e8c4366335e83
Reviewed-on: https://go-review.googlesource.com/40297
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/mips/obj0.go')
| -rw-r--r-- | src/cmd/internal/obj/mips/obj0.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/cmd/internal/obj/mips/obj0.go b/src/cmd/internal/obj/mips/obj0.go index 7ed4e4d9cb..ae9d1282a4 100644 --- a/src/cmd/internal/obj/mips/obj0.go +++ b/src/cmd/internal/obj/mips/obj0.go @@ -786,16 +786,8 @@ func (c *ctxt0) stacksplit(p *obj.Prog, framesize int32) *obj.Prog { func (c *ctxt0) addnop(p *obj.Prog) { q := c.newprog() - // we want to use the canonical NOP (SLL $0,R0,R0) here, - // however, as the assembler will always replace $0 - // as R0, we have to resort to manually encode the SLL - // instruction as WORD $0. - q.As = AWORD + q.As = ANOOP q.Pos = p.Pos - q.From.Type = obj.TYPE_CONST - q.From.Name = obj.NAME_NONE - q.From.Offset = 0 - q.Link = p.Link p.Link = q } |
