aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/asm
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2025-07-26 16:46:22 +0800
committerAlan Donovan <adonovan@google.com>2025-08-05 10:31:25 -0700
commit4ee0df8c466861bcd258ec55b58283f276d3b3d5 (patch)
tree9f8b467a6eff9720f5033477d21777e373848d2e /src/cmd/asm
parenta2c45f0eb1f281ed39c5111dd0fe4b2728f11cf3 (diff)
downloadgo-4ee0df8c466861bcd258ec55b58283f276d3b3d5.tar.xz
cmd: remove dead code
Fixes #74076 Change-Id: Icc67b3d4e342f329584433bd1250c56ae8f5a73d Reviewed-on: https://go-review.googlesource.com/c/go/+/690635 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Alan Donovan <adonovan@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/cmd/asm')
-rw-r--r--src/cmd/asm/internal/arch/loong64.go12
-rw-r--r--src/cmd/asm/internal/asm/asm.go8
2 files changed, 0 insertions, 20 deletions
diff --git a/src/cmd/asm/internal/arch/loong64.go b/src/cmd/asm/internal/arch/loong64.go
index bf5175f4a0..21263d3433 100644
--- a/src/cmd/asm/internal/arch/loong64.go
+++ b/src/cmd/asm/internal/arch/loong64.go
@@ -23,18 +23,6 @@ func jumpLoong64(word string) bool {
return false
}
-// IsLoong64MUL reports whether the op (as defined by an loong64.A* constant) is
-// one of the MUL/DIV/REM instructions that require special handling.
-func IsLoong64MUL(op obj.As) bool {
- switch op {
- case loong64.AMUL, loong64.AMULU, loong64.AMULV, loong64.AMULVU,
- loong64.ADIV, loong64.ADIVU, loong64.ADIVV, loong64.ADIVVU,
- loong64.AREM, loong64.AREMU, loong64.AREMV, loong64.AREMVU:
- return true
- }
- return false
-}
-
// IsLoong64RDTIME reports whether the op (as defined by an loong64.A*
// constant) is one of the RDTIMELW/RDTIMEHW/RDTIMED instructions that
// require special handling.
diff --git a/src/cmd/asm/internal/asm/asm.go b/src/cmd/asm/internal/asm/asm.go
index 9a6e22cab2..6bdbcb9c1b 100644
--- a/src/cmd/asm/internal/asm/asm.go
+++ b/src/cmd/asm/internal/asm/asm.go
@@ -974,14 +974,6 @@ func (p *Parser) getConstant(prog *obj.Prog, op obj.As, addr *obj.Addr) int64 {
return addr.Offset
}
-// getImmediate checks that addr represents an immediate constant and returns its value.
-func (p *Parser) getImmediate(prog *obj.Prog, op obj.As, addr *obj.Addr) int64 {
- if addr.Type != obj.TYPE_CONST || addr.Name != 0 || addr.Reg != 0 || addr.Index != 0 {
- p.errorf("%s: expected immediate constant; found %s", op, obj.Dconv(prog, addr))
- }
- return addr.Offset
-}
-
// getRegister checks that addr represents a register and returns its value.
func (p *Parser) getRegister(prog *obj.Prog, op obj.As, addr *obj.Addr) int16 {
if addr.Type != obj.TYPE_REG || addr.Offset != 0 || addr.Name != 0 || addr.Index != 0 {