Source File
cond.go
Belonging Package
github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64
package amd64import ()type cond byteconst (// condO represents (overflow) condition.condO cond = iota// condNO represents (no overflow) condition.condNO// condB represents (< unsigned) condition.condB// condNB represents (>= unsigned) condition.condNB// condZ represents (zero) condition.condZ// condNZ represents (not-zero) condition.condNZ// condBE represents (<= unsigned) condition.condBE// condNBE represents (> unsigned) condition.condNBE// condS represents (negative) condition.condS// condNS represents (not-negative) condition.condNS// condP represents (parity) condition.condP// condNP represents (not parity) condition.condNP// condL represents (< signed) condition.condL// condNL represents (>= signed) condition.condNL// condLE represents (<= signed) condition.condLE// condNLE represents (> signed) condition.condNLEcondInvalid)func ( cond) () string {switch {case condO:return "o"case condNO:return "no"case condB:return "b"case condNB:return "nb"case condZ:return "z"case condNZ:return "nz"case condBE:return "be"case condNBE:return "nbe"case condS:return "s"case condNS:return "ns"case condL:return "l"case condNL:return "nl"case condLE:return "le"case condNLE:return "nle"case condP:return "p"case condNP:return "np"default:panic("unreachable")}}func condFromSSAIntCmpCond( ssa.IntegerCmpCond) cond {switch {case ssa.IntegerCmpCondEqual:return condZcase ssa.IntegerCmpCondNotEqual:return condNZcase ssa.IntegerCmpCondSignedLessThan:return condLcase ssa.IntegerCmpCondSignedGreaterThanOrEqual:return condNLcase ssa.IntegerCmpCondSignedGreaterThan:return condNLEcase ssa.IntegerCmpCondSignedLessThanOrEqual:return condLEcase ssa.IntegerCmpCondUnsignedLessThan:return condBcase ssa.IntegerCmpCondUnsignedGreaterThanOrEqual:return condNBcase ssa.IntegerCmpCondUnsignedGreaterThan:return condNBEcase ssa.IntegerCmpCondUnsignedLessThanOrEqual:return condBEdefault:panic("unreachable")}}func condFromSSAFloatCmpCond( ssa.FloatCmpCond) cond {switch {case ssa.FloatCmpCondGreaterThanOrEqual:return condNBcase ssa.FloatCmpCondGreaterThan:return condNBEcase ssa.FloatCmpCondEqual, ssa.FloatCmpCondNotEqual, ssa.FloatCmpCondLessThan, ssa.FloatCmpCondLessThanOrEqual:panic(fmt.Sprintf("cond %s must be treated as a special case", ))default:panic("unreachable")}}func ( cond) () byte {return byte()}func ( cond) () cond {switch {case condO:return condNOcase condNO:return condOcase condB:return condNBcase condNB:return condBcase condZ:return condNZcase condNZ:return condZcase condBE:return condNBEcase condNBE:return condBEcase condS:return condNScase condNS:return condScase condP:return condNPcase condNP:return condPcase condL:return condNLcase condNL:return condLcase condLE:return condNLEcase condNLE:return condLEdefault:panic("unreachable")}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |