From 1673075d4bd324e69cb4e6e58760316e2c84e604 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 27 Mar 2026 15:12:23 -0700 Subject: test/codegen: fix broken syntax A bunch of tests had broken yet undetected syntax errors in their assembly output regexps. Things like mismatched quotes, using ^ instead of - for negation, etc. In addition, since CL 716060 using commas as separators between regexps doesn't work, and ends up just silently dropping every regexp after the comma. Fix all these things, and add a test to make sure that we're not silently dropping regexps on the floor. After this CL I will do some cleanup to align with CL 716060, like replacing commas and \s with spaces (which was the point of that CL, but wasn't consistently rewritten everywhere). Change-Id: I54f226120a311ead0c6c62eaf5d152ceed106034 Reviewed-on: https://go-review.googlesource.com/c/go/+/760521 Reviewed-by: Junyang Shao Reviewed-by: Keith Randall Reviewed-by: Paul Murphy Auto-Submit: Keith Randall LUCI-TryBot-Result: Go LUCI --- test/codegen/arithmetic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/codegen/arithmetic.go') diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go index 93e4aaed03..867b08a55e 100644 --- a/test/codegen/arithmetic.go +++ b/test/codegen/arithmetic.go @@ -37,11 +37,11 @@ func AddLargeConst(a uint64, out []uint64) { // ppc64x/power9:"ADDIS [$]-32768,", "ADD [$]1," // ppc64x/power8:"ADDIS [$]-32768,", "ADD [$]1," out[5] = a - 2147483647 - // ppc64x:"ADDIS [$]-32768,", ^"ADD " + // ppc64x:"ADDIS [$]-32768,", -"ADD " out[6] = a - 2147483648 - // ppc64x:"ADD [$]2147450880,", ^"ADDIS " + // ppc64x:"ADD [$]2147450880,", -"ADDIS " out[7] = a + 0x7FFF8000 - // ppc64x:"ADD [$]-32768,", ^"ADDIS " + // ppc64x:"ADD [$]-32768,", -"ADDIS " out[8] = a - 32768 // ppc64x/power10:"ADD [$]-32769," // ppc64x/power9:"ADDIS [$]-1,", "ADD [$]32767," -- cgit v1.3