]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/s390x: fix SYNC instruction encoding
authorMichael Munday <mike.munday@ibm.com>
Tue, 10 Nov 2020 10:31:28 +0000 (02:31 -0800)
committerMichael Munday <mike.munday@ibm.com>
Tue, 10 Nov 2020 15:48:04 +0000 (15:48 +0000)
SYNC is supposed to correspond to 'fast-BCR-serialization' which is
encoded as 'bcr 14,0'. In CL 197178 I accidentally modified the
encoding to 'bcr 7,0' which is a no-op. This CL reverses that change.

Fixes #42479.

Change-Id: I9918d93d720f5e12acc3014cde20d2d32cc87ee5
Reviewed-on: https://go-review.googlesource.com/c/go/+/268797
Run-TryBot: Michael Munday <mike.munday@ibm.com>
Trust: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/asm/testdata/s390x.s
src/cmd/internal/obj/s390x/asmz.go

index 03b84cfa62d2f7917279af9e3e89717f447b6b78..7c5d26be33f8386a11a98d96cfbf952cc2399692 100644 (file)
@@ -412,6 +412,8 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
        UNDEF                          // 00000000
        NOPH                           // 0700
 
+       SYNC                           // 07e0
+
        // vector add and sub instructions
        VAB     V3, V4, V4              // e743400000f3
        VAH     V3, V4, V4              // e743400010f3
index f0f9d5cefcc7a54af0190ab358b123f02bbb305a..06921085c9584ff3a3c6f4bd4170bb105ce1bb83 100644 (file)
@@ -3700,7 +3700,7 @@ func (c *ctxtz) asmout(p *obj.Prog, asm *[]byte) {
                }
 
        case 80: // sync
-               zRR(op_BCR, uint32(NotEqual), 0, asm)
+               zRR(op_BCR, 14, 0, asm) // fast-BCR-serialization
 
        case 81: // float to fixed and fixed to float moves (no conversion)
                switch p.As {