diff options
Diffstat (limited to 'test/codegen/bits.go')
-rw-r--r-- | test/codegen/bits.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/codegen/bits.go b/test/codegen/bits.go index 65d57c8f9f..18f9daf7cf 100644 --- a/test/codegen/bits.go +++ b/test/codegen/bits.go @@ -314,3 +314,15 @@ func op_orn(x, y uint32) uint32 { // arm64:`ORN\t`,-`ORR` return x | ^y } + +// check bitsets +func bitSetPowerOf2Test(x int) bool { + // amd64:"BTL\t[$]3" + return x&8 == 8 +} + +func bitSetTest(x int) bool { + // amd64:"ANDQ\t[$]9, AX" + // amd64:"CMPQ\tAX, [$]9" + return x&9 == 9 +} |