mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
cmd/compile/internal/ssagen: gofmt -w -s ssa.go
Change-Id: Ie169c226e8973c8b504412cc0ac1f14abcdfdb1c Reviewed-on: https://go-review.googlesource.com/c/go/+/423755 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
4a4e206884
commit
a13903562d
|
@ -2073,175 +2073,175 @@ type opAndType struct {
|
|||
}
|
||||
|
||||
var opToSSA = map[opAndType]ssa.Op{
|
||||
opAndType{ir.OADD, types.TINT8}: ssa.OpAdd8,
|
||||
opAndType{ir.OADD, types.TUINT8}: ssa.OpAdd8,
|
||||
opAndType{ir.OADD, types.TINT16}: ssa.OpAdd16,
|
||||
opAndType{ir.OADD, types.TUINT16}: ssa.OpAdd16,
|
||||
opAndType{ir.OADD, types.TINT32}: ssa.OpAdd32,
|
||||
opAndType{ir.OADD, types.TUINT32}: ssa.OpAdd32,
|
||||
opAndType{ir.OADD, types.TINT64}: ssa.OpAdd64,
|
||||
opAndType{ir.OADD, types.TUINT64}: ssa.OpAdd64,
|
||||
opAndType{ir.OADD, types.TFLOAT32}: ssa.OpAdd32F,
|
||||
opAndType{ir.OADD, types.TFLOAT64}: ssa.OpAdd64F,
|
||||
{ir.OADD, types.TINT8}: ssa.OpAdd8,
|
||||
{ir.OADD, types.TUINT8}: ssa.OpAdd8,
|
||||
{ir.OADD, types.TINT16}: ssa.OpAdd16,
|
||||
{ir.OADD, types.TUINT16}: ssa.OpAdd16,
|
||||
{ir.OADD, types.TINT32}: ssa.OpAdd32,
|
||||
{ir.OADD, types.TUINT32}: ssa.OpAdd32,
|
||||
{ir.OADD, types.TINT64}: ssa.OpAdd64,
|
||||
{ir.OADD, types.TUINT64}: ssa.OpAdd64,
|
||||
{ir.OADD, types.TFLOAT32}: ssa.OpAdd32F,
|
||||
{ir.OADD, types.TFLOAT64}: ssa.OpAdd64F,
|
||||
|
||||
opAndType{ir.OSUB, types.TINT8}: ssa.OpSub8,
|
||||
opAndType{ir.OSUB, types.TUINT8}: ssa.OpSub8,
|
||||
opAndType{ir.OSUB, types.TINT16}: ssa.OpSub16,
|
||||
opAndType{ir.OSUB, types.TUINT16}: ssa.OpSub16,
|
||||
opAndType{ir.OSUB, types.TINT32}: ssa.OpSub32,
|
||||
opAndType{ir.OSUB, types.TUINT32}: ssa.OpSub32,
|
||||
opAndType{ir.OSUB, types.TINT64}: ssa.OpSub64,
|
||||
opAndType{ir.OSUB, types.TUINT64}: ssa.OpSub64,
|
||||
opAndType{ir.OSUB, types.TFLOAT32}: ssa.OpSub32F,
|
||||
opAndType{ir.OSUB, types.TFLOAT64}: ssa.OpSub64F,
|
||||
{ir.OSUB, types.TINT8}: ssa.OpSub8,
|
||||
{ir.OSUB, types.TUINT8}: ssa.OpSub8,
|
||||
{ir.OSUB, types.TINT16}: ssa.OpSub16,
|
||||
{ir.OSUB, types.TUINT16}: ssa.OpSub16,
|
||||
{ir.OSUB, types.TINT32}: ssa.OpSub32,
|
||||
{ir.OSUB, types.TUINT32}: ssa.OpSub32,
|
||||
{ir.OSUB, types.TINT64}: ssa.OpSub64,
|
||||
{ir.OSUB, types.TUINT64}: ssa.OpSub64,
|
||||
{ir.OSUB, types.TFLOAT32}: ssa.OpSub32F,
|
||||
{ir.OSUB, types.TFLOAT64}: ssa.OpSub64F,
|
||||
|
||||
opAndType{ir.ONOT, types.TBOOL}: ssa.OpNot,
|
||||
{ir.ONOT, types.TBOOL}: ssa.OpNot,
|
||||
|
||||
opAndType{ir.ONEG, types.TINT8}: ssa.OpNeg8,
|
||||
opAndType{ir.ONEG, types.TUINT8}: ssa.OpNeg8,
|
||||
opAndType{ir.ONEG, types.TINT16}: ssa.OpNeg16,
|
||||
opAndType{ir.ONEG, types.TUINT16}: ssa.OpNeg16,
|
||||
opAndType{ir.ONEG, types.TINT32}: ssa.OpNeg32,
|
||||
opAndType{ir.ONEG, types.TUINT32}: ssa.OpNeg32,
|
||||
opAndType{ir.ONEG, types.TINT64}: ssa.OpNeg64,
|
||||
opAndType{ir.ONEG, types.TUINT64}: ssa.OpNeg64,
|
||||
opAndType{ir.ONEG, types.TFLOAT32}: ssa.OpNeg32F,
|
||||
opAndType{ir.ONEG, types.TFLOAT64}: ssa.OpNeg64F,
|
||||
{ir.ONEG, types.TINT8}: ssa.OpNeg8,
|
||||
{ir.ONEG, types.TUINT8}: ssa.OpNeg8,
|
||||
{ir.ONEG, types.TINT16}: ssa.OpNeg16,
|
||||
{ir.ONEG, types.TUINT16}: ssa.OpNeg16,
|
||||
{ir.ONEG, types.TINT32}: ssa.OpNeg32,
|
||||
{ir.ONEG, types.TUINT32}: ssa.OpNeg32,
|
||||
{ir.ONEG, types.TINT64}: ssa.OpNeg64,
|
||||
{ir.ONEG, types.TUINT64}: ssa.OpNeg64,
|
||||
{ir.ONEG, types.TFLOAT32}: ssa.OpNeg32F,
|
||||
{ir.ONEG, types.TFLOAT64}: ssa.OpNeg64F,
|
||||
|
||||
opAndType{ir.OBITNOT, types.TINT8}: ssa.OpCom8,
|
||||
opAndType{ir.OBITNOT, types.TUINT8}: ssa.OpCom8,
|
||||
opAndType{ir.OBITNOT, types.TINT16}: ssa.OpCom16,
|
||||
opAndType{ir.OBITNOT, types.TUINT16}: ssa.OpCom16,
|
||||
opAndType{ir.OBITNOT, types.TINT32}: ssa.OpCom32,
|
||||
opAndType{ir.OBITNOT, types.TUINT32}: ssa.OpCom32,
|
||||
opAndType{ir.OBITNOT, types.TINT64}: ssa.OpCom64,
|
||||
opAndType{ir.OBITNOT, types.TUINT64}: ssa.OpCom64,
|
||||
{ir.OBITNOT, types.TINT8}: ssa.OpCom8,
|
||||
{ir.OBITNOT, types.TUINT8}: ssa.OpCom8,
|
||||
{ir.OBITNOT, types.TINT16}: ssa.OpCom16,
|
||||
{ir.OBITNOT, types.TUINT16}: ssa.OpCom16,
|
||||
{ir.OBITNOT, types.TINT32}: ssa.OpCom32,
|
||||
{ir.OBITNOT, types.TUINT32}: ssa.OpCom32,
|
||||
{ir.OBITNOT, types.TINT64}: ssa.OpCom64,
|
||||
{ir.OBITNOT, types.TUINT64}: ssa.OpCom64,
|
||||
|
||||
opAndType{ir.OIMAG, types.TCOMPLEX64}: ssa.OpComplexImag,
|
||||
opAndType{ir.OIMAG, types.TCOMPLEX128}: ssa.OpComplexImag,
|
||||
opAndType{ir.OREAL, types.TCOMPLEX64}: ssa.OpComplexReal,
|
||||
opAndType{ir.OREAL, types.TCOMPLEX128}: ssa.OpComplexReal,
|
||||
{ir.OIMAG, types.TCOMPLEX64}: ssa.OpComplexImag,
|
||||
{ir.OIMAG, types.TCOMPLEX128}: ssa.OpComplexImag,
|
||||
{ir.OREAL, types.TCOMPLEX64}: ssa.OpComplexReal,
|
||||
{ir.OREAL, types.TCOMPLEX128}: ssa.OpComplexReal,
|
||||
|
||||
opAndType{ir.OMUL, types.TINT8}: ssa.OpMul8,
|
||||
opAndType{ir.OMUL, types.TUINT8}: ssa.OpMul8,
|
||||
opAndType{ir.OMUL, types.TINT16}: ssa.OpMul16,
|
||||
opAndType{ir.OMUL, types.TUINT16}: ssa.OpMul16,
|
||||
opAndType{ir.OMUL, types.TINT32}: ssa.OpMul32,
|
||||
opAndType{ir.OMUL, types.TUINT32}: ssa.OpMul32,
|
||||
opAndType{ir.OMUL, types.TINT64}: ssa.OpMul64,
|
||||
opAndType{ir.OMUL, types.TUINT64}: ssa.OpMul64,
|
||||
opAndType{ir.OMUL, types.TFLOAT32}: ssa.OpMul32F,
|
||||
opAndType{ir.OMUL, types.TFLOAT64}: ssa.OpMul64F,
|
||||
{ir.OMUL, types.TINT8}: ssa.OpMul8,
|
||||
{ir.OMUL, types.TUINT8}: ssa.OpMul8,
|
||||
{ir.OMUL, types.TINT16}: ssa.OpMul16,
|
||||
{ir.OMUL, types.TUINT16}: ssa.OpMul16,
|
||||
{ir.OMUL, types.TINT32}: ssa.OpMul32,
|
||||
{ir.OMUL, types.TUINT32}: ssa.OpMul32,
|
||||
{ir.OMUL, types.TINT64}: ssa.OpMul64,
|
||||
{ir.OMUL, types.TUINT64}: ssa.OpMul64,
|
||||
{ir.OMUL, types.TFLOAT32}: ssa.OpMul32F,
|
||||
{ir.OMUL, types.TFLOAT64}: ssa.OpMul64F,
|
||||
|
||||
opAndType{ir.ODIV, types.TFLOAT32}: ssa.OpDiv32F,
|
||||
opAndType{ir.ODIV, types.TFLOAT64}: ssa.OpDiv64F,
|
||||
{ir.ODIV, types.TFLOAT32}: ssa.OpDiv32F,
|
||||
{ir.ODIV, types.TFLOAT64}: ssa.OpDiv64F,
|
||||
|
||||
opAndType{ir.ODIV, types.TINT8}: ssa.OpDiv8,
|
||||
opAndType{ir.ODIV, types.TUINT8}: ssa.OpDiv8u,
|
||||
opAndType{ir.ODIV, types.TINT16}: ssa.OpDiv16,
|
||||
opAndType{ir.ODIV, types.TUINT16}: ssa.OpDiv16u,
|
||||
opAndType{ir.ODIV, types.TINT32}: ssa.OpDiv32,
|
||||
opAndType{ir.ODIV, types.TUINT32}: ssa.OpDiv32u,
|
||||
opAndType{ir.ODIV, types.TINT64}: ssa.OpDiv64,
|
||||
opAndType{ir.ODIV, types.TUINT64}: ssa.OpDiv64u,
|
||||
{ir.ODIV, types.TINT8}: ssa.OpDiv8,
|
||||
{ir.ODIV, types.TUINT8}: ssa.OpDiv8u,
|
||||
{ir.ODIV, types.TINT16}: ssa.OpDiv16,
|
||||
{ir.ODIV, types.TUINT16}: ssa.OpDiv16u,
|
||||
{ir.ODIV, types.TINT32}: ssa.OpDiv32,
|
||||
{ir.ODIV, types.TUINT32}: ssa.OpDiv32u,
|
||||
{ir.ODIV, types.TINT64}: ssa.OpDiv64,
|
||||
{ir.ODIV, types.TUINT64}: ssa.OpDiv64u,
|
||||
|
||||
opAndType{ir.OMOD, types.TINT8}: ssa.OpMod8,
|
||||
opAndType{ir.OMOD, types.TUINT8}: ssa.OpMod8u,
|
||||
opAndType{ir.OMOD, types.TINT16}: ssa.OpMod16,
|
||||
opAndType{ir.OMOD, types.TUINT16}: ssa.OpMod16u,
|
||||
opAndType{ir.OMOD, types.TINT32}: ssa.OpMod32,
|
||||
opAndType{ir.OMOD, types.TUINT32}: ssa.OpMod32u,
|
||||
opAndType{ir.OMOD, types.TINT64}: ssa.OpMod64,
|
||||
opAndType{ir.OMOD, types.TUINT64}: ssa.OpMod64u,
|
||||
{ir.OMOD, types.TINT8}: ssa.OpMod8,
|
||||
{ir.OMOD, types.TUINT8}: ssa.OpMod8u,
|
||||
{ir.OMOD, types.TINT16}: ssa.OpMod16,
|
||||
{ir.OMOD, types.TUINT16}: ssa.OpMod16u,
|
||||
{ir.OMOD, types.TINT32}: ssa.OpMod32,
|
||||
{ir.OMOD, types.TUINT32}: ssa.OpMod32u,
|
||||
{ir.OMOD, types.TINT64}: ssa.OpMod64,
|
||||
{ir.OMOD, types.TUINT64}: ssa.OpMod64u,
|
||||
|
||||
opAndType{ir.OAND, types.TINT8}: ssa.OpAnd8,
|
||||
opAndType{ir.OAND, types.TUINT8}: ssa.OpAnd8,
|
||||
opAndType{ir.OAND, types.TINT16}: ssa.OpAnd16,
|
||||
opAndType{ir.OAND, types.TUINT16}: ssa.OpAnd16,
|
||||
opAndType{ir.OAND, types.TINT32}: ssa.OpAnd32,
|
||||
opAndType{ir.OAND, types.TUINT32}: ssa.OpAnd32,
|
||||
opAndType{ir.OAND, types.TINT64}: ssa.OpAnd64,
|
||||
opAndType{ir.OAND, types.TUINT64}: ssa.OpAnd64,
|
||||
{ir.OAND, types.TINT8}: ssa.OpAnd8,
|
||||
{ir.OAND, types.TUINT8}: ssa.OpAnd8,
|
||||
{ir.OAND, types.TINT16}: ssa.OpAnd16,
|
||||
{ir.OAND, types.TUINT16}: ssa.OpAnd16,
|
||||
{ir.OAND, types.TINT32}: ssa.OpAnd32,
|
||||
{ir.OAND, types.TUINT32}: ssa.OpAnd32,
|
||||
{ir.OAND, types.TINT64}: ssa.OpAnd64,
|
||||
{ir.OAND, types.TUINT64}: ssa.OpAnd64,
|
||||
|
||||
opAndType{ir.OOR, types.TINT8}: ssa.OpOr8,
|
||||
opAndType{ir.OOR, types.TUINT8}: ssa.OpOr8,
|
||||
opAndType{ir.OOR, types.TINT16}: ssa.OpOr16,
|
||||
opAndType{ir.OOR, types.TUINT16}: ssa.OpOr16,
|
||||
opAndType{ir.OOR, types.TINT32}: ssa.OpOr32,
|
||||
opAndType{ir.OOR, types.TUINT32}: ssa.OpOr32,
|
||||
opAndType{ir.OOR, types.TINT64}: ssa.OpOr64,
|
||||
opAndType{ir.OOR, types.TUINT64}: ssa.OpOr64,
|
||||
{ir.OOR, types.TINT8}: ssa.OpOr8,
|
||||
{ir.OOR, types.TUINT8}: ssa.OpOr8,
|
||||
{ir.OOR, types.TINT16}: ssa.OpOr16,
|
||||
{ir.OOR, types.TUINT16}: ssa.OpOr16,
|
||||
{ir.OOR, types.TINT32}: ssa.OpOr32,
|
||||
{ir.OOR, types.TUINT32}: ssa.OpOr32,
|
||||
{ir.OOR, types.TINT64}: ssa.OpOr64,
|
||||
{ir.OOR, types.TUINT64}: ssa.OpOr64,
|
||||
|
||||
opAndType{ir.OXOR, types.TINT8}: ssa.OpXor8,
|
||||
opAndType{ir.OXOR, types.TUINT8}: ssa.OpXor8,
|
||||
opAndType{ir.OXOR, types.TINT16}: ssa.OpXor16,
|
||||
opAndType{ir.OXOR, types.TUINT16}: ssa.OpXor16,
|
||||
opAndType{ir.OXOR, types.TINT32}: ssa.OpXor32,
|
||||
opAndType{ir.OXOR, types.TUINT32}: ssa.OpXor32,
|
||||
opAndType{ir.OXOR, types.TINT64}: ssa.OpXor64,
|
||||
opAndType{ir.OXOR, types.TUINT64}: ssa.OpXor64,
|
||||
{ir.OXOR, types.TINT8}: ssa.OpXor8,
|
||||
{ir.OXOR, types.TUINT8}: ssa.OpXor8,
|
||||
{ir.OXOR, types.TINT16}: ssa.OpXor16,
|
||||
{ir.OXOR, types.TUINT16}: ssa.OpXor16,
|
||||
{ir.OXOR, types.TINT32}: ssa.OpXor32,
|
||||
{ir.OXOR, types.TUINT32}: ssa.OpXor32,
|
||||
{ir.OXOR, types.TINT64}: ssa.OpXor64,
|
||||
{ir.OXOR, types.TUINT64}: ssa.OpXor64,
|
||||
|
||||
opAndType{ir.OEQ, types.TBOOL}: ssa.OpEqB,
|
||||
opAndType{ir.OEQ, types.TINT8}: ssa.OpEq8,
|
||||
opAndType{ir.OEQ, types.TUINT8}: ssa.OpEq8,
|
||||
opAndType{ir.OEQ, types.TINT16}: ssa.OpEq16,
|
||||
opAndType{ir.OEQ, types.TUINT16}: ssa.OpEq16,
|
||||
opAndType{ir.OEQ, types.TINT32}: ssa.OpEq32,
|
||||
opAndType{ir.OEQ, types.TUINT32}: ssa.OpEq32,
|
||||
opAndType{ir.OEQ, types.TINT64}: ssa.OpEq64,
|
||||
opAndType{ir.OEQ, types.TUINT64}: ssa.OpEq64,
|
||||
opAndType{ir.OEQ, types.TINTER}: ssa.OpEqInter,
|
||||
opAndType{ir.OEQ, types.TSLICE}: ssa.OpEqSlice,
|
||||
opAndType{ir.OEQ, types.TFUNC}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TMAP}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TCHAN}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TPTR}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TUINTPTR}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TUNSAFEPTR}: ssa.OpEqPtr,
|
||||
opAndType{ir.OEQ, types.TFLOAT64}: ssa.OpEq64F,
|
||||
opAndType{ir.OEQ, types.TFLOAT32}: ssa.OpEq32F,
|
||||
{ir.OEQ, types.TBOOL}: ssa.OpEqB,
|
||||
{ir.OEQ, types.TINT8}: ssa.OpEq8,
|
||||
{ir.OEQ, types.TUINT8}: ssa.OpEq8,
|
||||
{ir.OEQ, types.TINT16}: ssa.OpEq16,
|
||||
{ir.OEQ, types.TUINT16}: ssa.OpEq16,
|
||||
{ir.OEQ, types.TINT32}: ssa.OpEq32,
|
||||
{ir.OEQ, types.TUINT32}: ssa.OpEq32,
|
||||
{ir.OEQ, types.TINT64}: ssa.OpEq64,
|
||||
{ir.OEQ, types.TUINT64}: ssa.OpEq64,
|
||||
{ir.OEQ, types.TINTER}: ssa.OpEqInter,
|
||||
{ir.OEQ, types.TSLICE}: ssa.OpEqSlice,
|
||||
{ir.OEQ, types.TFUNC}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TMAP}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TCHAN}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TPTR}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TUINTPTR}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TUNSAFEPTR}: ssa.OpEqPtr,
|
||||
{ir.OEQ, types.TFLOAT64}: ssa.OpEq64F,
|
||||
{ir.OEQ, types.TFLOAT32}: ssa.OpEq32F,
|
||||
|
||||
opAndType{ir.ONE, types.TBOOL}: ssa.OpNeqB,
|
||||
opAndType{ir.ONE, types.TINT8}: ssa.OpNeq8,
|
||||
opAndType{ir.ONE, types.TUINT8}: ssa.OpNeq8,
|
||||
opAndType{ir.ONE, types.TINT16}: ssa.OpNeq16,
|
||||
opAndType{ir.ONE, types.TUINT16}: ssa.OpNeq16,
|
||||
opAndType{ir.ONE, types.TINT32}: ssa.OpNeq32,
|
||||
opAndType{ir.ONE, types.TUINT32}: ssa.OpNeq32,
|
||||
opAndType{ir.ONE, types.TINT64}: ssa.OpNeq64,
|
||||
opAndType{ir.ONE, types.TUINT64}: ssa.OpNeq64,
|
||||
opAndType{ir.ONE, types.TINTER}: ssa.OpNeqInter,
|
||||
opAndType{ir.ONE, types.TSLICE}: ssa.OpNeqSlice,
|
||||
opAndType{ir.ONE, types.TFUNC}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TMAP}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TCHAN}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TPTR}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TUINTPTR}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TUNSAFEPTR}: ssa.OpNeqPtr,
|
||||
opAndType{ir.ONE, types.TFLOAT64}: ssa.OpNeq64F,
|
||||
opAndType{ir.ONE, types.TFLOAT32}: ssa.OpNeq32F,
|
||||
{ir.ONE, types.TBOOL}: ssa.OpNeqB,
|
||||
{ir.ONE, types.TINT8}: ssa.OpNeq8,
|
||||
{ir.ONE, types.TUINT8}: ssa.OpNeq8,
|
||||
{ir.ONE, types.TINT16}: ssa.OpNeq16,
|
||||
{ir.ONE, types.TUINT16}: ssa.OpNeq16,
|
||||
{ir.ONE, types.TINT32}: ssa.OpNeq32,
|
||||
{ir.ONE, types.TUINT32}: ssa.OpNeq32,
|
||||
{ir.ONE, types.TINT64}: ssa.OpNeq64,
|
||||
{ir.ONE, types.TUINT64}: ssa.OpNeq64,
|
||||
{ir.ONE, types.TINTER}: ssa.OpNeqInter,
|
||||
{ir.ONE, types.TSLICE}: ssa.OpNeqSlice,
|
||||
{ir.ONE, types.TFUNC}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TMAP}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TCHAN}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TPTR}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TUINTPTR}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TUNSAFEPTR}: ssa.OpNeqPtr,
|
||||
{ir.ONE, types.TFLOAT64}: ssa.OpNeq64F,
|
||||
{ir.ONE, types.TFLOAT32}: ssa.OpNeq32F,
|
||||
|
||||
opAndType{ir.OLT, types.TINT8}: ssa.OpLess8,
|
||||
opAndType{ir.OLT, types.TUINT8}: ssa.OpLess8U,
|
||||
opAndType{ir.OLT, types.TINT16}: ssa.OpLess16,
|
||||
opAndType{ir.OLT, types.TUINT16}: ssa.OpLess16U,
|
||||
opAndType{ir.OLT, types.TINT32}: ssa.OpLess32,
|
||||
opAndType{ir.OLT, types.TUINT32}: ssa.OpLess32U,
|
||||
opAndType{ir.OLT, types.TINT64}: ssa.OpLess64,
|
||||
opAndType{ir.OLT, types.TUINT64}: ssa.OpLess64U,
|
||||
opAndType{ir.OLT, types.TFLOAT64}: ssa.OpLess64F,
|
||||
opAndType{ir.OLT, types.TFLOAT32}: ssa.OpLess32F,
|
||||
{ir.OLT, types.TINT8}: ssa.OpLess8,
|
||||
{ir.OLT, types.TUINT8}: ssa.OpLess8U,
|
||||
{ir.OLT, types.TINT16}: ssa.OpLess16,
|
||||
{ir.OLT, types.TUINT16}: ssa.OpLess16U,
|
||||
{ir.OLT, types.TINT32}: ssa.OpLess32,
|
||||
{ir.OLT, types.TUINT32}: ssa.OpLess32U,
|
||||
{ir.OLT, types.TINT64}: ssa.OpLess64,
|
||||
{ir.OLT, types.TUINT64}: ssa.OpLess64U,
|
||||
{ir.OLT, types.TFLOAT64}: ssa.OpLess64F,
|
||||
{ir.OLT, types.TFLOAT32}: ssa.OpLess32F,
|
||||
|
||||
opAndType{ir.OLE, types.TINT8}: ssa.OpLeq8,
|
||||
opAndType{ir.OLE, types.TUINT8}: ssa.OpLeq8U,
|
||||
opAndType{ir.OLE, types.TINT16}: ssa.OpLeq16,
|
||||
opAndType{ir.OLE, types.TUINT16}: ssa.OpLeq16U,
|
||||
opAndType{ir.OLE, types.TINT32}: ssa.OpLeq32,
|
||||
opAndType{ir.OLE, types.TUINT32}: ssa.OpLeq32U,
|
||||
opAndType{ir.OLE, types.TINT64}: ssa.OpLeq64,
|
||||
opAndType{ir.OLE, types.TUINT64}: ssa.OpLeq64U,
|
||||
opAndType{ir.OLE, types.TFLOAT64}: ssa.OpLeq64F,
|
||||
opAndType{ir.OLE, types.TFLOAT32}: ssa.OpLeq32F,
|
||||
{ir.OLE, types.TINT8}: ssa.OpLeq8,
|
||||
{ir.OLE, types.TUINT8}: ssa.OpLeq8U,
|
||||
{ir.OLE, types.TINT16}: ssa.OpLeq16,
|
||||
{ir.OLE, types.TUINT16}: ssa.OpLeq16U,
|
||||
{ir.OLE, types.TINT32}: ssa.OpLeq32,
|
||||
{ir.OLE, types.TUINT32}: ssa.OpLeq32U,
|
||||
{ir.OLE, types.TINT64}: ssa.OpLeq64,
|
||||
{ir.OLE, types.TUINT64}: ssa.OpLeq64U,
|
||||
{ir.OLE, types.TFLOAT64}: ssa.OpLeq64F,
|
||||
{ir.OLE, types.TFLOAT32}: ssa.OpLeq32F,
|
||||
}
|
||||
|
||||
func (s *state) concreteEtype(t *types.Type) types.Kind {
|
||||
|
@ -2295,142 +2295,142 @@ type twoOpsAndType struct {
|
|||
|
||||
var fpConvOpToSSA = map[twoTypes]twoOpsAndType{
|
||||
|
||||
twoTypes{types.TINT8, types.TFLOAT32}: twoOpsAndType{ssa.OpSignExt8to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
twoTypes{types.TINT16, types.TFLOAT32}: twoOpsAndType{ssa.OpSignExt16to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
twoTypes{types.TINT32, types.TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt32to32F, types.TINT32},
|
||||
twoTypes{types.TINT64, types.TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64to32F, types.TINT64},
|
||||
{types.TINT8, types.TFLOAT32}: {ssa.OpSignExt8to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
{types.TINT16, types.TFLOAT32}: {ssa.OpSignExt16to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
{types.TINT32, types.TFLOAT32}: {ssa.OpCopy, ssa.OpCvt32to32F, types.TINT32},
|
||||
{types.TINT64, types.TFLOAT32}: {ssa.OpCopy, ssa.OpCvt64to32F, types.TINT64},
|
||||
|
||||
twoTypes{types.TINT8, types.TFLOAT64}: twoOpsAndType{ssa.OpSignExt8to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
twoTypes{types.TINT16, types.TFLOAT64}: twoOpsAndType{ssa.OpSignExt16to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
twoTypes{types.TINT32, types.TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt32to64F, types.TINT32},
|
||||
twoTypes{types.TINT64, types.TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64to64F, types.TINT64},
|
||||
{types.TINT8, types.TFLOAT64}: {ssa.OpSignExt8to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
{types.TINT16, types.TFLOAT64}: {ssa.OpSignExt16to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
{types.TINT32, types.TFLOAT64}: {ssa.OpCopy, ssa.OpCvt32to64F, types.TINT32},
|
||||
{types.TINT64, types.TFLOAT64}: {ssa.OpCopy, ssa.OpCvt64to64F, types.TINT64},
|
||||
|
||||
twoTypes{types.TFLOAT32, types.TINT8}: twoOpsAndType{ssa.OpCvt32Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
twoTypes{types.TFLOAT32, types.TINT16}: twoOpsAndType{ssa.OpCvt32Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
twoTypes{types.TFLOAT32, types.TINT32}: twoOpsAndType{ssa.OpCvt32Fto32, ssa.OpCopy, types.TINT32},
|
||||
twoTypes{types.TFLOAT32, types.TINT64}: twoOpsAndType{ssa.OpCvt32Fto64, ssa.OpCopy, types.TINT64},
|
||||
{types.TFLOAT32, types.TINT8}: {ssa.OpCvt32Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
{types.TFLOAT32, types.TINT16}: {ssa.OpCvt32Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
{types.TFLOAT32, types.TINT32}: {ssa.OpCvt32Fto32, ssa.OpCopy, types.TINT32},
|
||||
{types.TFLOAT32, types.TINT64}: {ssa.OpCvt32Fto64, ssa.OpCopy, types.TINT64},
|
||||
|
||||
twoTypes{types.TFLOAT64, types.TINT8}: twoOpsAndType{ssa.OpCvt64Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
twoTypes{types.TFLOAT64, types.TINT16}: twoOpsAndType{ssa.OpCvt64Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
twoTypes{types.TFLOAT64, types.TINT32}: twoOpsAndType{ssa.OpCvt64Fto32, ssa.OpCopy, types.TINT32},
|
||||
twoTypes{types.TFLOAT64, types.TINT64}: twoOpsAndType{ssa.OpCvt64Fto64, ssa.OpCopy, types.TINT64},
|
||||
{types.TFLOAT64, types.TINT8}: {ssa.OpCvt64Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
{types.TFLOAT64, types.TINT16}: {ssa.OpCvt64Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
{types.TFLOAT64, types.TINT32}: {ssa.OpCvt64Fto32, ssa.OpCopy, types.TINT32},
|
||||
{types.TFLOAT64, types.TINT64}: {ssa.OpCvt64Fto64, ssa.OpCopy, types.TINT64},
|
||||
// unsigned
|
||||
twoTypes{types.TUINT8, types.TFLOAT32}: twoOpsAndType{ssa.OpZeroExt8to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
twoTypes{types.TUINT16, types.TFLOAT32}: twoOpsAndType{ssa.OpZeroExt16to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
twoTypes{types.TUINT32, types.TFLOAT32}: twoOpsAndType{ssa.OpZeroExt32to64, ssa.OpCvt64to32F, types.TINT64}, // go wide to dodge unsigned
|
||||
twoTypes{types.TUINT64, types.TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpInvalid, types.TUINT64}, // Cvt64Uto32F, branchy code expansion instead
|
||||
{types.TUINT8, types.TFLOAT32}: {ssa.OpZeroExt8to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
{types.TUINT16, types.TFLOAT32}: {ssa.OpZeroExt16to32, ssa.OpCvt32to32F, types.TINT32},
|
||||
{types.TUINT32, types.TFLOAT32}: {ssa.OpZeroExt32to64, ssa.OpCvt64to32F, types.TINT64}, // go wide to dodge unsigned
|
||||
{types.TUINT64, types.TFLOAT32}: {ssa.OpCopy, ssa.OpInvalid, types.TUINT64}, // Cvt64Uto32F, branchy code expansion instead
|
||||
|
||||
twoTypes{types.TUINT8, types.TFLOAT64}: twoOpsAndType{ssa.OpZeroExt8to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
twoTypes{types.TUINT16, types.TFLOAT64}: twoOpsAndType{ssa.OpZeroExt16to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
twoTypes{types.TUINT32, types.TFLOAT64}: twoOpsAndType{ssa.OpZeroExt32to64, ssa.OpCvt64to64F, types.TINT64}, // go wide to dodge unsigned
|
||||
twoTypes{types.TUINT64, types.TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpInvalid, types.TUINT64}, // Cvt64Uto64F, branchy code expansion instead
|
||||
{types.TUINT8, types.TFLOAT64}: {ssa.OpZeroExt8to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
{types.TUINT16, types.TFLOAT64}: {ssa.OpZeroExt16to32, ssa.OpCvt32to64F, types.TINT32},
|
||||
{types.TUINT32, types.TFLOAT64}: {ssa.OpZeroExt32to64, ssa.OpCvt64to64F, types.TINT64}, // go wide to dodge unsigned
|
||||
{types.TUINT64, types.TFLOAT64}: {ssa.OpCopy, ssa.OpInvalid, types.TUINT64}, // Cvt64Uto64F, branchy code expansion instead
|
||||
|
||||
twoTypes{types.TFLOAT32, types.TUINT8}: twoOpsAndType{ssa.OpCvt32Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
twoTypes{types.TFLOAT32, types.TUINT16}: twoOpsAndType{ssa.OpCvt32Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
twoTypes{types.TFLOAT32, types.TUINT32}: twoOpsAndType{ssa.OpCvt32Fto64, ssa.OpTrunc64to32, types.TINT64}, // go wide to dodge unsigned
|
||||
twoTypes{types.TFLOAT32, types.TUINT64}: twoOpsAndType{ssa.OpInvalid, ssa.OpCopy, types.TUINT64}, // Cvt32Fto64U, branchy code expansion instead
|
||||
{types.TFLOAT32, types.TUINT8}: {ssa.OpCvt32Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
{types.TFLOAT32, types.TUINT16}: {ssa.OpCvt32Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
{types.TFLOAT32, types.TUINT32}: {ssa.OpCvt32Fto64, ssa.OpTrunc64to32, types.TINT64}, // go wide to dodge unsigned
|
||||
{types.TFLOAT32, types.TUINT64}: {ssa.OpInvalid, ssa.OpCopy, types.TUINT64}, // Cvt32Fto64U, branchy code expansion instead
|
||||
|
||||
twoTypes{types.TFLOAT64, types.TUINT8}: twoOpsAndType{ssa.OpCvt64Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
twoTypes{types.TFLOAT64, types.TUINT16}: twoOpsAndType{ssa.OpCvt64Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
twoTypes{types.TFLOAT64, types.TUINT32}: twoOpsAndType{ssa.OpCvt64Fto64, ssa.OpTrunc64to32, types.TINT64}, // go wide to dodge unsigned
|
||||
twoTypes{types.TFLOAT64, types.TUINT64}: twoOpsAndType{ssa.OpInvalid, ssa.OpCopy, types.TUINT64}, // Cvt64Fto64U, branchy code expansion instead
|
||||
{types.TFLOAT64, types.TUINT8}: {ssa.OpCvt64Fto32, ssa.OpTrunc32to8, types.TINT32},
|
||||
{types.TFLOAT64, types.TUINT16}: {ssa.OpCvt64Fto32, ssa.OpTrunc32to16, types.TINT32},
|
||||
{types.TFLOAT64, types.TUINT32}: {ssa.OpCvt64Fto64, ssa.OpTrunc64to32, types.TINT64}, // go wide to dodge unsigned
|
||||
{types.TFLOAT64, types.TUINT64}: {ssa.OpInvalid, ssa.OpCopy, types.TUINT64}, // Cvt64Fto64U, branchy code expansion instead
|
||||
|
||||
// float
|
||||
twoTypes{types.TFLOAT64, types.TFLOAT32}: twoOpsAndType{ssa.OpCvt64Fto32F, ssa.OpCopy, types.TFLOAT32},
|
||||
twoTypes{types.TFLOAT64, types.TFLOAT64}: twoOpsAndType{ssa.OpRound64F, ssa.OpCopy, types.TFLOAT64},
|
||||
twoTypes{types.TFLOAT32, types.TFLOAT32}: twoOpsAndType{ssa.OpRound32F, ssa.OpCopy, types.TFLOAT32},
|
||||
twoTypes{types.TFLOAT32, types.TFLOAT64}: twoOpsAndType{ssa.OpCvt32Fto64F, ssa.OpCopy, types.TFLOAT64},
|
||||
{types.TFLOAT64, types.TFLOAT32}: {ssa.OpCvt64Fto32F, ssa.OpCopy, types.TFLOAT32},
|
||||
{types.TFLOAT64, types.TFLOAT64}: {ssa.OpRound64F, ssa.OpCopy, types.TFLOAT64},
|
||||
{types.TFLOAT32, types.TFLOAT32}: {ssa.OpRound32F, ssa.OpCopy, types.TFLOAT32},
|
||||
{types.TFLOAT32, types.TFLOAT64}: {ssa.OpCvt32Fto64F, ssa.OpCopy, types.TFLOAT64},
|
||||
}
|
||||
|
||||
// this map is used only for 32-bit arch, and only includes the difference
|
||||
// on 32-bit arch, don't use int64<->float conversion for uint32
|
||||
var fpConvOpToSSA32 = map[twoTypes]twoOpsAndType{
|
||||
twoTypes{types.TUINT32, types.TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt32Uto32F, types.TUINT32},
|
||||
twoTypes{types.TUINT32, types.TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt32Uto64F, types.TUINT32},
|
||||
twoTypes{types.TFLOAT32, types.TUINT32}: twoOpsAndType{ssa.OpCvt32Fto32U, ssa.OpCopy, types.TUINT32},
|
||||
twoTypes{types.TFLOAT64, types.TUINT32}: twoOpsAndType{ssa.OpCvt64Fto32U, ssa.OpCopy, types.TUINT32},
|
||||
{types.TUINT32, types.TFLOAT32}: {ssa.OpCopy, ssa.OpCvt32Uto32F, types.TUINT32},
|
||||
{types.TUINT32, types.TFLOAT64}: {ssa.OpCopy, ssa.OpCvt32Uto64F, types.TUINT32},
|
||||
{types.TFLOAT32, types.TUINT32}: {ssa.OpCvt32Fto32U, ssa.OpCopy, types.TUINT32},
|
||||
{types.TFLOAT64, types.TUINT32}: {ssa.OpCvt64Fto32U, ssa.OpCopy, types.TUINT32},
|
||||
}
|
||||
|
||||
// uint64<->float conversions, only on machines that have instructions for that
|
||||
var uint64fpConvOpToSSA = map[twoTypes]twoOpsAndType{
|
||||
twoTypes{types.TUINT64, types.TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64Uto32F, types.TUINT64},
|
||||
twoTypes{types.TUINT64, types.TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64Uto64F, types.TUINT64},
|
||||
twoTypes{types.TFLOAT32, types.TUINT64}: twoOpsAndType{ssa.OpCvt32Fto64U, ssa.OpCopy, types.TUINT64},
|
||||
twoTypes{types.TFLOAT64, types.TUINT64}: twoOpsAndType{ssa.OpCvt64Fto64U, ssa.OpCopy, types.TUINT64},
|
||||
{types.TUINT64, types.TFLOAT32}: {ssa.OpCopy, ssa.OpCvt64Uto32F, types.TUINT64},
|
||||
{types.TUINT64, types.TFLOAT64}: {ssa.OpCopy, ssa.OpCvt64Uto64F, types.TUINT64},
|
||||
{types.TFLOAT32, types.TUINT64}: {ssa.OpCvt32Fto64U, ssa.OpCopy, types.TUINT64},
|
||||
{types.TFLOAT64, types.TUINT64}: {ssa.OpCvt64Fto64U, ssa.OpCopy, types.TUINT64},
|
||||
}
|
||||
|
||||
var shiftOpToSSA = map[opAndTwoTypes]ssa.Op{
|
||||
opAndTwoTypes{ir.OLSH, types.TINT8, types.TUINT8}: ssa.OpLsh8x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT8, types.TUINT8}: ssa.OpLsh8x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT8, types.TUINT16}: ssa.OpLsh8x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT8, types.TUINT16}: ssa.OpLsh8x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT8, types.TUINT32}: ssa.OpLsh8x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT8, types.TUINT32}: ssa.OpLsh8x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT8, types.TUINT64}: ssa.OpLsh8x64,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT8, types.TUINT64}: ssa.OpLsh8x64,
|
||||
{ir.OLSH, types.TINT8, types.TUINT8}: ssa.OpLsh8x8,
|
||||
{ir.OLSH, types.TUINT8, types.TUINT8}: ssa.OpLsh8x8,
|
||||
{ir.OLSH, types.TINT8, types.TUINT16}: ssa.OpLsh8x16,
|
||||
{ir.OLSH, types.TUINT8, types.TUINT16}: ssa.OpLsh8x16,
|
||||
{ir.OLSH, types.TINT8, types.TUINT32}: ssa.OpLsh8x32,
|
||||
{ir.OLSH, types.TUINT8, types.TUINT32}: ssa.OpLsh8x32,
|
||||
{ir.OLSH, types.TINT8, types.TUINT64}: ssa.OpLsh8x64,
|
||||
{ir.OLSH, types.TUINT8, types.TUINT64}: ssa.OpLsh8x64,
|
||||
|
||||
opAndTwoTypes{ir.OLSH, types.TINT16, types.TUINT8}: ssa.OpLsh16x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT16, types.TUINT8}: ssa.OpLsh16x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT16, types.TUINT16}: ssa.OpLsh16x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT16, types.TUINT16}: ssa.OpLsh16x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT16, types.TUINT32}: ssa.OpLsh16x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT16, types.TUINT32}: ssa.OpLsh16x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT16, types.TUINT64}: ssa.OpLsh16x64,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT16, types.TUINT64}: ssa.OpLsh16x64,
|
||||
{ir.OLSH, types.TINT16, types.TUINT8}: ssa.OpLsh16x8,
|
||||
{ir.OLSH, types.TUINT16, types.TUINT8}: ssa.OpLsh16x8,
|
||||
{ir.OLSH, types.TINT16, types.TUINT16}: ssa.OpLsh16x16,
|
||||
{ir.OLSH, types.TUINT16, types.TUINT16}: ssa.OpLsh16x16,
|
||||
{ir.OLSH, types.TINT16, types.TUINT32}: ssa.OpLsh16x32,
|
||||
{ir.OLSH, types.TUINT16, types.TUINT32}: ssa.OpLsh16x32,
|
||||
{ir.OLSH, types.TINT16, types.TUINT64}: ssa.OpLsh16x64,
|
||||
{ir.OLSH, types.TUINT16, types.TUINT64}: ssa.OpLsh16x64,
|
||||
|
||||
opAndTwoTypes{ir.OLSH, types.TINT32, types.TUINT8}: ssa.OpLsh32x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT32, types.TUINT8}: ssa.OpLsh32x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT32, types.TUINT16}: ssa.OpLsh32x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT32, types.TUINT16}: ssa.OpLsh32x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT32, types.TUINT32}: ssa.OpLsh32x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT32, types.TUINT32}: ssa.OpLsh32x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT32, types.TUINT64}: ssa.OpLsh32x64,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT32, types.TUINT64}: ssa.OpLsh32x64,
|
||||
{ir.OLSH, types.TINT32, types.TUINT8}: ssa.OpLsh32x8,
|
||||
{ir.OLSH, types.TUINT32, types.TUINT8}: ssa.OpLsh32x8,
|
||||
{ir.OLSH, types.TINT32, types.TUINT16}: ssa.OpLsh32x16,
|
||||
{ir.OLSH, types.TUINT32, types.TUINT16}: ssa.OpLsh32x16,
|
||||
{ir.OLSH, types.TINT32, types.TUINT32}: ssa.OpLsh32x32,
|
||||
{ir.OLSH, types.TUINT32, types.TUINT32}: ssa.OpLsh32x32,
|
||||
{ir.OLSH, types.TINT32, types.TUINT64}: ssa.OpLsh32x64,
|
||||
{ir.OLSH, types.TUINT32, types.TUINT64}: ssa.OpLsh32x64,
|
||||
|
||||
opAndTwoTypes{ir.OLSH, types.TINT64, types.TUINT8}: ssa.OpLsh64x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT64, types.TUINT8}: ssa.OpLsh64x8,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT64, types.TUINT16}: ssa.OpLsh64x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT64, types.TUINT16}: ssa.OpLsh64x16,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT64, types.TUINT32}: ssa.OpLsh64x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT64, types.TUINT32}: ssa.OpLsh64x32,
|
||||
opAndTwoTypes{ir.OLSH, types.TINT64, types.TUINT64}: ssa.OpLsh64x64,
|
||||
opAndTwoTypes{ir.OLSH, types.TUINT64, types.TUINT64}: ssa.OpLsh64x64,
|
||||
{ir.OLSH, types.TINT64, types.TUINT8}: ssa.OpLsh64x8,
|
||||
{ir.OLSH, types.TUINT64, types.TUINT8}: ssa.OpLsh64x8,
|
||||
{ir.OLSH, types.TINT64, types.TUINT16}: ssa.OpLsh64x16,
|
||||
{ir.OLSH, types.TUINT64, types.TUINT16}: ssa.OpLsh64x16,
|
||||
{ir.OLSH, types.TINT64, types.TUINT32}: ssa.OpLsh64x32,
|
||||
{ir.OLSH, types.TUINT64, types.TUINT32}: ssa.OpLsh64x32,
|
||||
{ir.OLSH, types.TINT64, types.TUINT64}: ssa.OpLsh64x64,
|
||||
{ir.OLSH, types.TUINT64, types.TUINT64}: ssa.OpLsh64x64,
|
||||
|
||||
opAndTwoTypes{ir.ORSH, types.TINT8, types.TUINT8}: ssa.OpRsh8x8,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT8, types.TUINT8}: ssa.OpRsh8Ux8,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT8, types.TUINT16}: ssa.OpRsh8x16,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT8, types.TUINT16}: ssa.OpRsh8Ux16,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT8, types.TUINT32}: ssa.OpRsh8x32,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT8, types.TUINT32}: ssa.OpRsh8Ux32,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT8, types.TUINT64}: ssa.OpRsh8x64,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT8, types.TUINT64}: ssa.OpRsh8Ux64,
|
||||
{ir.ORSH, types.TINT8, types.TUINT8}: ssa.OpRsh8x8,
|
||||
{ir.ORSH, types.TUINT8, types.TUINT8}: ssa.OpRsh8Ux8,
|
||||
{ir.ORSH, types.TINT8, types.TUINT16}: ssa.OpRsh8x16,
|
||||
{ir.ORSH, types.TUINT8, types.TUINT16}: ssa.OpRsh8Ux16,
|
||||
{ir.ORSH, types.TINT8, types.TUINT32}: ssa.OpRsh8x32,
|
||||
{ir.ORSH, types.TUINT8, types.TUINT32}: ssa.OpRsh8Ux32,
|
||||
{ir.ORSH, types.TINT8, types.TUINT64}: ssa.OpRsh8x64,
|
||||
{ir.ORSH, types.TUINT8, types.TUINT64}: ssa.OpRsh8Ux64,
|
||||
|
||||
opAndTwoTypes{ir.ORSH, types.TINT16, types.TUINT8}: ssa.OpRsh16x8,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT16, types.TUINT8}: ssa.OpRsh16Ux8,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT16, types.TUINT16}: ssa.OpRsh16x16,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT16, types.TUINT16}: ssa.OpRsh16Ux16,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT16, types.TUINT32}: ssa.OpRsh16x32,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT16, types.TUINT32}: ssa.OpRsh16Ux32,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT16, types.TUINT64}: ssa.OpRsh16x64,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT16, types.TUINT64}: ssa.OpRsh16Ux64,
|
||||
{ir.ORSH, types.TINT16, types.TUINT8}: ssa.OpRsh16x8,
|
||||
{ir.ORSH, types.TUINT16, types.TUINT8}: ssa.OpRsh16Ux8,
|
||||
{ir.ORSH, types.TINT16, types.TUINT16}: ssa.OpRsh16x16,
|
||||
{ir.ORSH, types.TUINT16, types.TUINT16}: ssa.OpRsh16Ux16,
|
||||
{ir.ORSH, types.TINT16, types.TUINT32}: ssa.OpRsh16x32,
|
||||
{ir.ORSH, types.TUINT16, types.TUINT32}: ssa.OpRsh16Ux32,
|
||||
{ir.ORSH, types.TINT16, types.TUINT64}: ssa.OpRsh16x64,
|
||||
{ir.ORSH, types.TUINT16, types.TUINT64}: ssa.OpRsh16Ux64,
|
||||
|
||||
opAndTwoTypes{ir.ORSH, types.TINT32, types.TUINT8}: ssa.OpRsh32x8,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT32, types.TUINT8}: ssa.OpRsh32Ux8,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT32, types.TUINT16}: ssa.OpRsh32x16,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT32, types.TUINT16}: ssa.OpRsh32Ux16,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT32, types.TUINT32}: ssa.OpRsh32x32,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT32, types.TUINT32}: ssa.OpRsh32Ux32,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT32, types.TUINT64}: ssa.OpRsh32x64,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT32, types.TUINT64}: ssa.OpRsh32Ux64,
|
||||
{ir.ORSH, types.TINT32, types.TUINT8}: ssa.OpRsh32x8,
|
||||
{ir.ORSH, types.TUINT32, types.TUINT8}: ssa.OpRsh32Ux8,
|
||||
{ir.ORSH, types.TINT32, types.TUINT16}: ssa.OpRsh32x16,
|
||||
{ir.ORSH, types.TUINT32, types.TUINT16}: ssa.OpRsh32Ux16,
|
||||
{ir.ORSH, types.TINT32, types.TUINT32}: ssa.OpRsh32x32,
|
||||
{ir.ORSH, types.TUINT32, types.TUINT32}: ssa.OpRsh32Ux32,
|
||||
{ir.ORSH, types.TINT32, types.TUINT64}: ssa.OpRsh32x64,
|
||||
{ir.ORSH, types.TUINT32, types.TUINT64}: ssa.OpRsh32Ux64,
|
||||
|
||||
opAndTwoTypes{ir.ORSH, types.TINT64, types.TUINT8}: ssa.OpRsh64x8,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT64, types.TUINT8}: ssa.OpRsh64Ux8,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT64, types.TUINT16}: ssa.OpRsh64x16,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT64, types.TUINT16}: ssa.OpRsh64Ux16,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT64, types.TUINT32}: ssa.OpRsh64x32,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT64, types.TUINT32}: ssa.OpRsh64Ux32,
|
||||
opAndTwoTypes{ir.ORSH, types.TINT64, types.TUINT64}: ssa.OpRsh64x64,
|
||||
opAndTwoTypes{ir.ORSH, types.TUINT64, types.TUINT64}: ssa.OpRsh64Ux64,
|
||||
{ir.ORSH, types.TINT64, types.TUINT8}: ssa.OpRsh64x8,
|
||||
{ir.ORSH, types.TUINT64, types.TUINT8}: ssa.OpRsh64Ux8,
|
||||
{ir.ORSH, types.TINT64, types.TUINT16}: ssa.OpRsh64x16,
|
||||
{ir.ORSH, types.TUINT64, types.TUINT16}: ssa.OpRsh64Ux16,
|
||||
{ir.ORSH, types.TINT64, types.TUINT32}: ssa.OpRsh64x32,
|
||||
{ir.ORSH, types.TUINT64, types.TUINT32}: ssa.OpRsh64Ux32,
|
||||
{ir.ORSH, types.TINT64, types.TUINT64}: ssa.OpRsh64x64,
|
||||
{ir.ORSH, types.TUINT64, types.TUINT64}: ssa.OpRsh64Ux64,
|
||||
}
|
||||
|
||||
func (s *state) ssaShiftOp(op ir.Op, t *types.Type, u *types.Type) ssa.Op {
|
||||
|
@ -3773,38 +3773,38 @@ var softFloatOps map[ssa.Op]sfRtCallDef
|
|||
func softfloatInit() {
|
||||
// Some of these operations get transformed by sfcall.
|
||||
softFloatOps = map[ssa.Op]sfRtCallDef{
|
||||
ssa.OpAdd32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fadd32"), types.TFLOAT32},
|
||||
ssa.OpAdd64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fadd64"), types.TFLOAT64},
|
||||
ssa.OpSub32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fadd32"), types.TFLOAT32},
|
||||
ssa.OpSub64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fadd64"), types.TFLOAT64},
|
||||
ssa.OpMul32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fmul32"), types.TFLOAT32},
|
||||
ssa.OpMul64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fmul64"), types.TFLOAT64},
|
||||
ssa.OpDiv32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fdiv32"), types.TFLOAT32},
|
||||
ssa.OpDiv64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fdiv64"), types.TFLOAT64},
|
||||
ssa.OpAdd32F: {typecheck.LookupRuntimeFunc("fadd32"), types.TFLOAT32},
|
||||
ssa.OpAdd64F: {typecheck.LookupRuntimeFunc("fadd64"), types.TFLOAT64},
|
||||
ssa.OpSub32F: {typecheck.LookupRuntimeFunc("fadd32"), types.TFLOAT32},
|
||||
ssa.OpSub64F: {typecheck.LookupRuntimeFunc("fadd64"), types.TFLOAT64},
|
||||
ssa.OpMul32F: {typecheck.LookupRuntimeFunc("fmul32"), types.TFLOAT32},
|
||||
ssa.OpMul64F: {typecheck.LookupRuntimeFunc("fmul64"), types.TFLOAT64},
|
||||
ssa.OpDiv32F: {typecheck.LookupRuntimeFunc("fdiv32"), types.TFLOAT32},
|
||||
ssa.OpDiv64F: {typecheck.LookupRuntimeFunc("fdiv64"), types.TFLOAT64},
|
||||
|
||||
ssa.OpEq64F: sfRtCallDef{typecheck.LookupRuntimeFunc("feq64"), types.TBOOL},
|
||||
ssa.OpEq32F: sfRtCallDef{typecheck.LookupRuntimeFunc("feq32"), types.TBOOL},
|
||||
ssa.OpNeq64F: sfRtCallDef{typecheck.LookupRuntimeFunc("feq64"), types.TBOOL},
|
||||
ssa.OpNeq32F: sfRtCallDef{typecheck.LookupRuntimeFunc("feq32"), types.TBOOL},
|
||||
ssa.OpLess64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fgt64"), types.TBOOL},
|
||||
ssa.OpLess32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fgt32"), types.TBOOL},
|
||||
ssa.OpLeq64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fge64"), types.TBOOL},
|
||||
ssa.OpLeq32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fge32"), types.TBOOL},
|
||||
ssa.OpEq64F: {typecheck.LookupRuntimeFunc("feq64"), types.TBOOL},
|
||||
ssa.OpEq32F: {typecheck.LookupRuntimeFunc("feq32"), types.TBOOL},
|
||||
ssa.OpNeq64F: {typecheck.LookupRuntimeFunc("feq64"), types.TBOOL},
|
||||
ssa.OpNeq32F: {typecheck.LookupRuntimeFunc("feq32"), types.TBOOL},
|
||||
ssa.OpLess64F: {typecheck.LookupRuntimeFunc("fgt64"), types.TBOOL},
|
||||
ssa.OpLess32F: {typecheck.LookupRuntimeFunc("fgt32"), types.TBOOL},
|
||||
ssa.OpLeq64F: {typecheck.LookupRuntimeFunc("fge64"), types.TBOOL},
|
||||
ssa.OpLeq32F: {typecheck.LookupRuntimeFunc("fge32"), types.TBOOL},
|
||||
|
||||
ssa.OpCvt32to32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fint32to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto32: sfRtCallDef{typecheck.LookupRuntimeFunc("f32toint32"), types.TINT32},
|
||||
ssa.OpCvt64to32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fint64to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto64: sfRtCallDef{typecheck.LookupRuntimeFunc("f32toint64"), types.TINT64},
|
||||
ssa.OpCvt64Uto32F: sfRtCallDef{typecheck.LookupRuntimeFunc("fuint64to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto64U: sfRtCallDef{typecheck.LookupRuntimeFunc("f32touint64"), types.TUINT64},
|
||||
ssa.OpCvt32to64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fint32to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto32: sfRtCallDef{typecheck.LookupRuntimeFunc("f64toint32"), types.TINT32},
|
||||
ssa.OpCvt64to64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fint64to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto64: sfRtCallDef{typecheck.LookupRuntimeFunc("f64toint64"), types.TINT64},
|
||||
ssa.OpCvt64Uto64F: sfRtCallDef{typecheck.LookupRuntimeFunc("fuint64to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto64U: sfRtCallDef{typecheck.LookupRuntimeFunc("f64touint64"), types.TUINT64},
|
||||
ssa.OpCvt32Fto64F: sfRtCallDef{typecheck.LookupRuntimeFunc("f32to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto32F: sfRtCallDef{typecheck.LookupRuntimeFunc("f64to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32to32F: {typecheck.LookupRuntimeFunc("fint32to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto32: {typecheck.LookupRuntimeFunc("f32toint32"), types.TINT32},
|
||||
ssa.OpCvt64to32F: {typecheck.LookupRuntimeFunc("fint64to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto64: {typecheck.LookupRuntimeFunc("f32toint64"), types.TINT64},
|
||||
ssa.OpCvt64Uto32F: {typecheck.LookupRuntimeFunc("fuint64to32"), types.TFLOAT32},
|
||||
ssa.OpCvt32Fto64U: {typecheck.LookupRuntimeFunc("f32touint64"), types.TUINT64},
|
||||
ssa.OpCvt32to64F: {typecheck.LookupRuntimeFunc("fint32to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto32: {typecheck.LookupRuntimeFunc("f64toint32"), types.TINT32},
|
||||
ssa.OpCvt64to64F: {typecheck.LookupRuntimeFunc("fint64to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto64: {typecheck.LookupRuntimeFunc("f64toint64"), types.TINT64},
|
||||
ssa.OpCvt64Uto64F: {typecheck.LookupRuntimeFunc("fuint64to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto64U: {typecheck.LookupRuntimeFunc("f64touint64"), types.TUINT64},
|
||||
ssa.OpCvt32Fto64F: {typecheck.LookupRuntimeFunc("f32to64"), types.TFLOAT64},
|
||||
ssa.OpCvt64Fto32F: {typecheck.LookupRuntimeFunc("f64to32"), types.TFLOAT32},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue