aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Munday <mike.munday@lowrisc.org>2021-09-08 14:07:12 +0000
committerMichael Munday <mike.munday@lowrisc.org>2021-09-08 14:51:31 +0000
commit1da64686f85da38af13c4ee186f261343455c697 (patch)
treea890ee51ae7aafaf071386460e102b9e3e869577 /test
parentfdc2072420d28b761e30dd02e7ed6118cda33f4f (diff)
downloadgo-1da64686f85da38af13c4ee186f261343455c697.tar.gz
go-1da64686f85da38af13c4ee186f261343455c697.zip
test/codegen: fix compilation of bitfield tests
The codegen tests are currently skipped (see #48247) and the bitfield tests do not actually compile due to a duplicate function name (sbfiz5) added in CL 267602. Renaming the function fixes the issue. Updates #48247. Change-Id: I626fd5ef13732dc358e73ace9ddcc4cbb6ae5b21 Reviewed-on: https://go-review.googlesource.com/c/go/+/348391 Trust: Michael Munday <mike.munday@lowrisc.org> Run-TryBot: Michael Munday <mike.munday@lowrisc.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/codegen/bitfield.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/codegen/bitfield.go b/test/codegen/bitfield.go
index d4ffbad85d..3ed9cfe603 100644
--- a/test/codegen/bitfield.go
+++ b/test/codegen/bitfield.go
@@ -99,10 +99,6 @@ func sbfiz5(x int32) int32 {
return (x << 4) >> 3
}
-func sbfiz5(x int32) int64 {
- return int64(x+1) << 40 // arm64:"SBFIZ\t[$]40, R[0-9]+, [$]24",-"LSL"
-}
-
func sbfiz6(x int16) int64 {
return int64(x+1) << 3 // arm64:"SBFIZ\t[$]3, R[0-9]+, [$]16",-"LSL"
}
@@ -111,6 +107,10 @@ func sbfiz7(x int8) int64 {
return int64(x+1) << 62 // arm64:"SBFIZ\t[$]62, R[0-9]+, [$]2",-"LSL"
}
+func sbfiz8(x int32) int64 {
+ return int64(x+1) << 40 // arm64:"SBFIZ\t[$]40, R[0-9]+, [$]24",-"LSL"
+}
+
// sbfx
func sbfx1(x int64) int64 {
return (x << 3) >> 4 // arm64:"SBFX\t[$]1, R[0-9]+, [$]60",-"LSL",-"ASR"