aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/switch.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/switch.go')
-rw-r--r--test/codegen/switch.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/codegen/switch.go b/test/codegen/switch.go
index 1a66a5ddf8..a8860d0cc4 100644
--- a/test/codegen/switch.go
+++ b/test/codegen/switch.go
@@ -137,8 +137,8 @@ type K interface {
// use a runtime call for type switches to interface types.
func interfaceSwitch(x any) int {
- // amd64:`CALL\truntime.interfaceSwitch`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*8)`
- // arm64:`CALL\truntime.interfaceSwitch`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
+ // amd64:`CALL runtime.interfaceSwitch`,`MOVL 16\(AX\)`,`MOVQ 8\(.*\)(.*\*8)`
+ // arm64:`CALL runtime.interfaceSwitch`,`LDAR`,`MOVWU 16\(R0\)`,`MOVD \(R.*\)\(R.*\)`
switch x.(type) {
case I:
return 1
@@ -150,8 +150,8 @@ func interfaceSwitch(x any) int {
}
func interfaceSwitch2(x K) int {
- // amd64:`CALL\truntime.interfaceSwitch`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*8)`
- // arm64:`CALL\truntime.interfaceSwitch`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
+ // amd64:`CALL runtime.interfaceSwitch`,`MOVL 16\(AX\)`,`MOVQ 8\(.*\)(.*\*8)`
+ // arm64:`CALL runtime.interfaceSwitch`,`LDAR`,`MOVWU 16\(R0\)`,`MOVD \(R.*\)\(R.*\)`
switch x.(type) {
case I:
return 1
@@ -163,8 +163,8 @@ func interfaceSwitch2(x K) int {
}
func interfaceCast(x any) int {
- // amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*1)`
- // arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
+ // amd64:`CALL runtime.typeAssert`,`MOVL 16\(AX\)`,`MOVQ 8\(.*\)(.*\*1)`
+ // arm64:`CALL runtime.typeAssert`,`LDAR`,`MOVWU 16\(R0\)`,`MOVD \(R.*\)\(R.*\)`
if _, ok := x.(I); ok {
return 3
}
@@ -172,8 +172,8 @@ func interfaceCast(x any) int {
}
func interfaceCast2(x K) int {
- // amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*1)`
- // arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
+ // amd64:`CALL runtime.typeAssert`,`MOVL 16\(AX\)`,`MOVQ 8\(.*\)(.*\*1)`
+ // arm64:`CALL runtime.typeAssert`,`LDAR`,`MOVWU 16\(R0\)`,`MOVD \(R.*\)\(R.*\)`
if _, ok := x.(I); ok {
return 3
}
@@ -181,8 +181,8 @@ func interfaceCast2(x K) int {
}
func interfaceConv(x IJ) I {
- // amd64:`CALL\truntime.typeAssert`,`MOVL\t16\(AX\)`,`MOVQ\t8\(.*\)(.*\*1)`
- // arm64:`CALL\truntime.typeAssert`,`LDAR`,`MOVWU\t16\(R0\)`,`MOVD\t\(R.*\)\(R.*\)`
+ // amd64:`CALL runtime.typeAssert`,`MOVL 16\(AX\)`,`MOVQ 8\(.*\)(.*\*1)`
+ // arm64:`CALL runtime.typeAssert`,`LDAR`,`MOVWU 16\(R0\)`,`MOVD \(R.*\)\(R.*\)`
return x
}
@@ -195,7 +195,7 @@ func stringSwitchInlineable(s string) {
}
}
func stringSwitch() {
- // amd64:-"CMP",-"CALL"
- // arm64:-"CMP",-"CALL"
+ // amd64:-"CMP" -"CALL"
+ // arm64:-"CMP" -"CALL"
stringSwitchInlineable("foo")
}