diff options
Diffstat (limited to 'test/codegen/switch.go')
| -rw-r--r-- | test/codegen/switch.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/codegen/switch.go b/test/codegen/switch.go index a8860d0cc4..baa8934e06 100644 --- a/test/codegen/switch.go +++ b/test/codegen/switch.go @@ -23,8 +23,8 @@ func f(x string) int { // use jump tables for 8+ int cases func square(x int) int { - // amd64:`JMP\s\(.*\)\(.*\)$` - // arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$` + // amd64:`JMP \(.*\)\(.*\)$` + // arm64:`MOVD \(R.*\)\(R.*<<3\)`,`JMP \(R.*\)$` // loong64: `ALSLV`,`MOVV`,`JMP` switch x { case 1: @@ -50,8 +50,8 @@ func square(x int) int { // use jump tables for 8+ string lengths func length(x string) int { - // amd64:`JMP\s\(.*\)\(.*\)$` - // arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$` + // amd64:`JMP \(.*\)\(.*\)$` + // arm64:`MOVD \(R.*\)\(R.*<<3\)`,`JMP \(R.*\)$` // loong64:`ALSLV`,`MOVV`,`JMP` switch x { case "a": @@ -78,23 +78,23 @@ func length(x string) int { // Use single-byte ordered comparisons for binary searching strings. // See issue 53333. func mimetype(ext string) string { - // amd64: `CMPB\s1\(.*\), \$104$`,-`cmpstring` - // arm64: `MOVB\s1\(R.*\), R.*$`, `CMPW\s\$104, R.*$`, -`cmpstring` + // amd64: `CMPB 1\(.*\), \$104$`,-`cmpstring` + // arm64: `MOVB 1\(R.*\), R.*$`, `CMPW \$104, R.*$`, -`cmpstring` switch ext { - // amd64: `CMPL\s\(.*\), \$1836345390$` - // arm64: `MOVD\s\$1836345390`, `CMPW\sR.*, R.*$` + // amd64: `CMPL \(.*\), \$1836345390$` + // arm64: `MOVD \$1836345390`, `CMPW R.*, R.*$` case ".htm": return "A" - // amd64: `CMPL\s\(.*\), \$1953457454$` - // arm64: `MOVD\s\$1953457454`, `CMPW\sR.*, R.*$` + // amd64: `CMPL \(.*\), \$1953457454$` + // arm64: `MOVD \$1953457454`, `CMPW R.*, R.*$` case ".eot": return "B" - // amd64: `CMPL\s\(.*\), \$1735815982$` - // arm64: `MOVD\s\$1735815982`, `CMPW\sR.*, R.*$` + // amd64: `CMPL \(.*\), \$1735815982$` + // arm64: `MOVD \$1735815982`, `CMPW R.*, R.*$` case ".svg": return "C" - // amd64: `CMPL\s\(.*\), \$1718907950$` - // arm64: `MOVD\s\$1718907950`, `CMPW\sR.*, R.*$` + // amd64: `CMPL \(.*\), \$1718907950$` + // arm64: `MOVD \$1718907950`, `CMPW R.*, R.*$` case ".ttf": return "D" default: @@ -104,8 +104,8 @@ func mimetype(ext string) string { // use jump tables for type switches to concrete types. func typeSwitch(x any) int { - // amd64:`JMP\s\(.*\)\(.*\)$` - // arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$` + // amd64:`JMP \(.*\)\(.*\)$` + // arm64:`MOVD \(R.*\)\(R.*<<3\)`,`JMP \(R.*\)$` switch x.(type) { case int: return 0 |
