aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/bits.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/bits.go')
-rw-r--r--test/codegen/bits.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/codegen/bits.go b/test/codegen/bits.go
index 354dbf407a..c20e4d6733 100644
--- a/test/codegen/bits.go
+++ b/test/codegen/bits.go
@@ -120,6 +120,16 @@ func bitoff64(a, b uint64) (n uint64) {
return n
}
+func clearLastBit(x int64, y int32) (int64, int32) {
+ // amd64:"ANDQ\t[$]-2"
+ a := (x >> 1) << 1
+
+ // amd64:"ANDL\t[$]-2"
+ b := (y >> 1) << 1
+
+ return a, b
+}
+
func bitcompl64(a, b uint64) (n uint64) {
// amd64:"BTCQ"
n += b ^ (1 << (a & 63))