diff options
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteMIPS.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteMIPS.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS.go b/src/cmd/compile/internal/ssa/rewriteMIPS.go index 3fc5527955..fdf329cbd0 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS.go @@ -297,6 +297,8 @@ func rewriteValueMIPS(v *Value) bool { return rewriteValueMIPS_OpMIPSMOVHstorezero(v) case OpMIPSMOVWload: return rewriteValueMIPS_OpMIPSMOVWload(v) + case OpMIPSMOVWnop: + return rewriteValueMIPS_OpMIPSMOVWnop(v) case OpMIPSMOVWreg: return rewriteValueMIPS_OpMIPSMOVWreg(v) case OpMIPSMOVWstore: @@ -514,6 +516,9 @@ func rewriteValueMIPS(v *Value) bool { case OpSqrt: v.Op = OpMIPSSQRTD return true + case OpSqrt32: + v.Op = OpMIPSSQRTF + return true case OpStaticCall: v.Op = OpMIPSCALLstatic return true @@ -3647,6 +3652,21 @@ func rewriteValueMIPS_OpMIPSMOVWload(v *Value) bool { } return false } +func rewriteValueMIPS_OpMIPSMOVWnop(v *Value) bool { + v_0 := v.Args[0] + // match: (MOVWnop (MOVWconst [c])) + // result: (MOVWconst [c]) + for { + if v_0.Op != OpMIPSMOVWconst { + break + } + c := auxIntToInt32(v_0.AuxInt) + v.reset(OpMIPSMOVWconst) + v.AuxInt = int32ToAuxInt(c) + return true + } + return false +} func rewriteValueMIPS_OpMIPSMOVWreg(v *Value) bool { v_0 := v.Args[0] // match: (MOVWreg x) |