aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2021-01-07 14:01:29 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2021-02-25 23:19:16 +0000
commita61524d1033632f733f69bf6635e767d70d95cdd (patch)
tree4dc51195c94d9ba847240c3bb62f8ac298f86cd5 /src/cmd/asm
parent5f15af111cb40c3ac154be88288abd381e6f61e2 (diff)
downloadgo-a61524d1033632f733f69bf6635e767d70d95cdd.tar.xz
cmd/internal/obj: add Prog.SetFrom3{Reg,Const}
These are the the most common uses, and they reduce line noise. I don't love adding new deprecated APIs, but since they're trivial wrappers, it'll be very easy to update them along with the rest. No functional changes; passes toolstash-check. Change-Id: I691a8175cfef9081180e463c63f326376af3f3a6 Reviewed-on: https://go-review.googlesource.com/c/go/+/296009 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/asm/asm.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmd/asm/internal/asm/asm.go b/src/cmd/asm/internal/asm/asm.go
index c4032759bb..06867cd507 100644
--- a/src/cmd/asm/internal/asm/asm.go
+++ b/src/cmd/asm/internal/asm/asm.go
@@ -811,10 +811,7 @@ func (p *Parser) asmInstruction(op obj.As, cond string, a []obj.Addr) {
} else {
mask = (^uint32(0) >> uint(mask2+1)) & (^uint32(0) << uint(31-(mask1-1)))
}
- prog.SetFrom3(obj.Addr{
- Type: obj.TYPE_CONST,
- Offset: int64(mask),
- })
+ prog.SetFrom3Const(int64(mask))
prog.To = a[4]
break
}