|
|
|
@ -161,6 +161,7 @@ func TestSAR(t *testing.T) { |
|
|
|
|
|
|
|
|
|
func TestSGT(t *testing.T) { |
|
|
|
|
tests := []twoOperandTest{ |
|
|
|
|
|
|
|
|
|
{"0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
@ -171,6 +172,8 @@ func TestSGT(t *testing.T) { |
|
|
|
|
{"8000000000000000000000000000000000000000000000000000000000000001", "8000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"8000000000000000000000000000000000000000000000000000000000000001", "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "0000000000000000000000000000000000000000000000000000000000000001"}, |
|
|
|
|
{"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "8000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb", "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd", "0000000000000000000000000000000000000000000000000000000000000001"}, |
|
|
|
|
{"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd", "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
} |
|
|
|
|
testTwoOperandOp(t, tests, opSgt) |
|
|
|
|
} |
|
|
|
@ -187,6 +190,8 @@ func TestSLT(t *testing.T) { |
|
|
|
|
{"8000000000000000000000000000000000000000000000000000000000000001", "8000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"8000000000000000000000000000000000000000000000000000000000000001", "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "8000000000000000000000000000000000000000000000000000000000000001", "0000000000000000000000000000000000000000000000000000000000000001"}, |
|
|
|
|
{"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb", "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd", "0000000000000000000000000000000000000000000000000000000000000000"}, |
|
|
|
|
{"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd", "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb", "0000000000000000000000000000000000000000000000000000000000000001"}, |
|
|
|
|
} |
|
|
|
|
testTwoOperandOp(t, tests, opSlt) |
|
|
|
|
} |
|
|
|
@ -349,7 +354,11 @@ func BenchmarkOpEq(b *testing.B) { |
|
|
|
|
|
|
|
|
|
opBenchmark(b, opEq, x, y) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func BenchmarkOpEq2(b *testing.B) { |
|
|
|
|
x := "FBCDEF090807060504030201ffffffffFBCDEF090807060504030201ffffffff" |
|
|
|
|
y := "FBCDEF090807060504030201ffffffffFBCDEF090807060504030201fffffffe" |
|
|
|
|
opBenchmark(b, opEq, x, y) |
|
|
|
|
} |
|
|
|
|
func BenchmarkOpAnd(b *testing.B) { |
|
|
|
|
x := "ABCDEF090807060504030201ffffffffffffffffffffffffffffffffffffffff" |
|
|
|
|
y := "ABCDEF090807060504030201ffffffffffffffffffffffffffffffffffffffff" |
|
|
|
@ -412,3 +421,7 @@ func BenchmarkOpSAR(b *testing.B) { |
|
|
|
|
|
|
|
|
|
opBenchmark(b, opSAR, x, y) |
|
|
|
|
} |
|
|
|
|
func BenchmarkOpIsZero(b *testing.B) { |
|
|
|
|
x := "FBCDEF090807060504030201ffffffffFBCDEF090807060504030201ffffffff" |
|
|
|
|
opBenchmark(b, opIszero, x) |
|
|
|
|
} |
|
|
|
|