!3 golang: fix patch 0012 format

Merge pull request !3 from Grooooot/master
This commit is contained in:
openeuler-ci-bot 2020-01-10 16:00:35 +08:00 committed by Gitee
commit c85faa0eb9
2 changed files with 74 additions and 71 deletions

View File

@ -1,7 +1,8 @@
From f1887468d1ae9781407f24a2b121ed34a6dfec4c Mon Sep 17 00:00:00 2001 From acc723af2646200d13f76ffde80b000c4095074a Mon Sep 17 00:00:00 2001
From: Cherry Zhang <cherryyz@google.com> From: Cherry Zhang <cherryyz@google.com>
Date: Fri, 27 Dec 2019 12:02:00 -0500 Date: Fri, 27 Dec 2019 12:02:00 -0500
Subject: [PATCH] [release-branch.go1.13] runtime: ensure memmove write pointer atomically on ARM64 Subject: [PATCH] [release-branch.go1.13] runtime: ensure memmove write pointer
atomically on ARM64
If a pointer write is not atomic, if the GC is running If a pointer write is not atomic, if the GC is running
concurrently, it may observe a partially updated pointer, which concurrently, it may observe a partially updated pointer, which
@ -19,13 +20,18 @@ Change-Id: I1b3ca24c6b1ac8a8aaf9ee470115e9a89ec1b00b
Reviewed-on: https://go-review.googlesource.com/c/go/+/212626 Reviewed-on: https://go-review.googlesource.com/c/go/+/212626
Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Austin Clements <austin@google.com>
(cherry picked from commit ffbc02761abb47106ce88e09290a31513b5f6c8a) (cherry picked from commit ffbc02761abb47106ce88e09290a31513b5f6c8a)
Reviewed-on: https://go-review.googlesource.com/c/go/+/213683
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
--- ---
src/runtime/memmove_arm64.s | 42 +++++++++++++++++++++++++++++++++++++-----
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/src/runtime/memmove_arm64.s b/src/runtime/memmove_arm64.s diff --git a/src/runtime/memmove_arm64.s b/src/runtime/memmove_arm64.s
index ac29f94..cedb018 100644 index ac29f94..cedb018 100644
--- a/src/runtime/memmove_arm64.s --- a/src/runtime/memmove_arm64.s
+++ b/src/runtime/memmove_arm64.s +++ b/src/runtime/memmove_arm64.s
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@ check:
CMP R3, R4 CMP R3, R4
BLT backward BLT backward
@ -34,7 +40,7 @@ index ac29f94..cedb018 100644
// R3 and R4 are advanced as we copy. // R3 and R4 are advanced as we copy.
// (There may be implementations of armv8 where copying by bytes until // (There may be implementations of armv8 where copying by bytes until
@@ -30,11 +30,12 @@ @@ -30,11 +30,12 @@ check:
// optimization, but the on the one tested so far (xgene) it did not // optimization, but the on the one tested so far (xgene) it did not
// make a significance difference.) // make a significance difference.)
@ -48,7 +54,7 @@ index ac29f94..cedb018 100644
LDP.P 32(R4), (R8, R10) LDP.P 32(R4), (R8, R10)
STP.P (R8, R10), 32(R3) STP.P (R8, R10), 32(R3)
LDP -16(R4), (R11, R12) LDP -16(R4), (R11, R12)
@@ -43,10 +44,26 @@ @@ -43,10 +44,26 @@ forwardlargeloop:
CBNZ R7, forwardlargeloop CBNZ R7, forwardlargeloop
noforwardlarge: noforwardlarge:
@ -76,7 +82,7 @@ index ac29f94..cedb018 100644
ADD R3, R6, R9 // R9 points just past the destination memory ADD R3, R6, R9 // R9 points just past the destination memory
forwardtailloop: forwardtailloop:
@@ -90,7 +107,7 @@ @@ -90,7 +107,7 @@ copy1:
RET RET
backward: backward:
@ -85,7 +91,7 @@ index ac29f94..cedb018 100644
// R3 and R4 are advanced to the end of the destination/source buffers // R3 and R4 are advanced to the end of the destination/source buffers
// respectively and moved back as we copy. // respectively and moved back as we copy.
@@ -99,13 +116,28 @@ @@ -99,13 +116,28 @@ backward:
CBZ R6, nobackwardtail // Do we need to do any byte-by-byte copying? CBZ R6, nobackwardtail // Do we need to do any byte-by-byte copying?
@ -115,3 +121,6 @@ index ac29f94..cedb018 100644
nobackwardtail: nobackwardtail:
CBNZ R7, backwardlarge // Do we need to do any doubleword-by-doubleword copying? CBNZ R7, backwardlarge // Do we need to do any doubleword-by-doubleword copying?
RET RET
--
1.8.3.1

View File

@ -67,7 +67,6 @@ Summary: The Go Programming Language
License: BSD and Public Domain License: BSD and Public Domain
URL: http://golang.org/ URL: http://golang.org/
Source0: https://dl.google.com/go/go%{version}.src.tar.gz Source0: https://dl.google.com/go/go%{version}.src.tar.gz
Source100: golang-gdbinit
%if !%{golang_bootstrap} %if !%{golang_bootstrap}
BuildRequires: gcc-go >= 5 BuildRequires: gcc-go >= 5
@ -335,9 +334,6 @@ mkdir -p %{buildroot}%{gopath}/src/bitbucket.org
mkdir -p %{buildroot}%{gopath}/src/code.google.com/p mkdir -p %{buildroot}%{gopath}/src/code.google.com/p
mkdir -p %{buildroot}%{gopath}/src/golang.org/x mkdir -p %{buildroot}%{gopath}/src/golang.org/x
mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d
cp -av %{SOURCE100} %{buildroot}%{_sysconfdir}/gdbinit.d/golang.gdb
%check %check
export GOROOT=$(pwd -P) export GOROOT=$(pwd -P)
export PATH="$GOROOT"/bin:"$PATH" export PATH="$GOROOT"/bin:"$PATH"
@ -392,8 +388,6 @@ fi
%dir %{gopath}/src/golang.org %dir %{gopath}/src/golang.org
%dir %{gopath}/src/golang.org/x %dir %{gopath}/src/golang.org/x
%{_sysconfdir}/gdbinit.d
%files help -f go-docs.list -f go-shared.list %files help -f go-docs.list -f go-shared.list
%files devel -f go-tests.list -f go-misc.list -f go-src.list %files devel -f go-tests.list -f go-misc.list -f go-src.list