From 4ee0df8c466861bcd258ec55b58283f276d3b3d5 Mon Sep 17 00:00:00 2001 From: qiulaidongfeng <2645477756@qq.com> Date: Sat, 26 Jul 2025 16:46:22 +0800 Subject: cmd: remove dead code Fixes #74076 Change-Id: Icc67b3d4e342f329584433bd1250c56ae8f5a73d Reviewed-on: https://go-review.googlesource.com/c/go/+/690635 Reviewed-by: Alan Donovan LUCI-TryBot-Result: Go LUCI Commit-Queue: Alan Donovan Reviewed-by: Keith Randall Reviewed-by: Keith Randall Auto-Submit: Alan Donovan Reviewed-by: Dmitri Shuralyov --- src/cmd/asm/internal/arch/loong64.go | 12 ------------ src/cmd/asm/internal/asm/asm.go | 8 -------- 2 files changed, 20 deletions(-) (limited to 'src/cmd/asm') 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 { -- cgit v1.3-6-g1900