1. 11 Apr, 2018 9 commits
    • Ben Shi's avatar
      cmd/internal/obj/arm64: support SWPD/SWPW/SWPH/SWPB · e1040d79
      Ben Shi authored
      SWPD/SWPW/SWPH/SWPB were introduced in ARMv8.1. They swap content
      of register and memory atomically. And their difference is
      SWPD: 64-bit double word data
      SWPW: 32-bit word data (zero extended to 64-bit)
      SWPH: 16-bit half word data (zero extended to 64-bit)
      SWPB: 8-bit byte data (zero extended to 64-bit)
      
      This CL implements them in the arm64 assembler.
      
      Change-Id: I2d9fb2310674bd92693531210e187143e7eed602
      Reviewed-on: https://go-review.googlesource.com/101516Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e1040d79
    • Tobias Klauser's avatar
      go/build, runtime/internal/sys: reserve RISC-V arch names · 9446eaa9
      Tobias Klauser authored
      In #17528 it was discussed (off-topic to the actual issue) to reserve
      GOARCH names for the RISC-V architecture. With the first RISC-V
      Linux-capable development boards released (e.g. HiFive Unleashed),
      Linux distributions being ported to RISC-V (e.g. Debian, Fedora) and
      RISC-V support being added to gccgo (CL 96377), it becomes more likely
      that Go software (and maybe Go itself) will be ported as well.
      
      Add riscv and riscv64 (which is already used by gccgo), so Go 1.11 will
      already recognize "*_riscv{,64}.go" as reserved files.
      
      Change-Id: I042aab19c68751d82ea513e40f7b1d7e1ad924ea
      Reviewed-on: https://go-review.googlesource.com/106256
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      9446eaa9
    • fanzha02's avatar
      internal/bytealg: add optimized Compare for arm64 · d31ee641
      fanzha02 authored
      Use LDP instructions to load 16 bytes per loop when the source length is long. Specially
      process the 8 bytes length, 4 bytes length and 2 bytes length to get a better performance.
      
      Benchmark result:
      name                           old time/op   new time/op    delta
      BytesCompare/1-8                21.0ns ± 0%    10.5ns ± 0%      ~     (p=0.079 n=4+5)
      BytesCompare/2-8                11.5ns ± 0%    10.5ns ± 0%    -8.70%  (p=0.008 n=5+5)
      BytesCompare/4-8                13.5ns ± 0%    10.0ns ± 0%   -25.93%  (p=0.008 n=5+5)
      BytesCompare/8-8                28.8ns ± 0%     9.5ns ± 0%      ~     (p=0.079 n=4+5)
      BytesCompare/16-8               40.5ns ± 0%    10.5ns ± 0%   -74.07%  (p=0.008 n=5+5)
      BytesCompare/32-8               64.6ns ± 0%    12.5ns ± 0%   -80.65%  (p=0.008 n=5+5)
      BytesCompare/64-8                112ns ± 0%      16ns ± 0%   -85.27%  (p=0.008 n=5+5)
      BytesCompare/128-8               208ns ± 0%      24ns ± 0%   -88.22%  (p=0.008 n=5+5)
      BytesCompare/256-8               400ns ± 0%      50ns ± 0%   -87.62%  (p=0.008 n=5+5)
      BytesCompare/512-8               785ns ± 0%      82ns ± 0%   -89.61%  (p=0.008 n=5+5)
      BytesCompare/1024-8             1.55µs ± 0%    0.14µs ± 0%      ~     (p=0.079 n=4+5)
      BytesCompare/2048-8             3.09µs ± 0%    0.27µs ± 0%      ~     (p=0.079 n=4+5)
      CompareBytesEqual-8             39.0ns ± 0%    12.0ns ± 0%   -69.23%  (p=0.008 n=5+5)
      CompareBytesToNil-8             8.57ns ± 5%    8.23ns ± 2%    -3.99%  (p=0.016 n=5+5)
      CompareBytesEmpty-8             7.37ns ± 0%    7.36ns ± 4%      ~     (p=0.690 n=5+5)
      CompareBytesIdentical-8         7.39ns ± 0%    7.46ns ± 2%      ~     (p=0.667 n=5+5)
      CompareBytesSameLength-8        17.0ns ± 0%    10.5ns ± 0%   -38.24%  (p=0.008 n=5+5)
      CompareBytesDifferentLength-8   17.0ns ± 0%    10.5ns ± 0%   -38.24%  (p=0.008 n=5+5)
      CompareBytesBigUnaligned-8      1.58ms ± 0%    0.19ms ± 0%   -88.31%  (p=0.016 n=4+5)
      CompareBytesBig-8               1.59ms ± 0%    0.19ms ± 0%   -88.27%  (p=0.016 n=5+4)
      CompareBytesBigIdentical-8      7.01ns ± 0%    6.60ns ± 3%    -5.91%  (p=0.008 n=5+5)
      
      name                           old speed     new speed      delta
      CompareBytesBigUnaligned-8     662MB/s ± 0%  5660MB/s ± 0%  +755.15%  (p=0.016 n=4+5)
      CompareBytesBig-8              661MB/s ± 0%  5636MB/s ± 0%  +752.57%  (p=0.016 n=5+4)
      CompareBytesBigIdentical-8     150TB/s ± 0%   159TB/s ± 3%    +6.27%  (p=0.008 n=5+5)
      
      This is resubmit of CL90175.
      
      Change-Id: Ie841daedb3123a68dd2554f27ebef0b3f8a855c2
      Reviewed-on: https://go-review.googlesource.com/101635
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      d31ee641
    • fanzha02's avatar
      cmd/internal/obj/arm64: add support for a series of load/store with register offset instrucitons · 60402856
      fanzha02 authored
      The patch adds support for arm64 instructions LDRB, LDRH, LDRSB,
      LDRSH, LDRSW, STR, STRB and STRH with register offset.
      
      Test cases are also added.
      
      Change-Id: I8d17fddd2963c0bc366e12b00bac49b93f3f0957
      Reviewed-on: https://go-review.googlesource.com/91575Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      60402856
    • Tobias Klauser's avatar
      runtime: use internal/cpu instead of support_avx · e0ac5f54
      Tobias Klauser authored
      After CL 104636 cpu.X86.HasAVX is set early enough that it can be used
      to determine useAVXmemmove. Use it and remove support_avx.
      
      Change-Id: Ib7a627bede2bf96c92362507e742bd833cb42a74
      Reviewed-on: https://go-review.googlesource.com/106235
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      e0ac5f54
    • Alberto Donizetti's avatar
      cmd/go: document GOTOOLDIR environment variable · 51533fda
      Alberto Donizetti authored
      Also, make the variables list sorted.
      
      Fixes #24794
      
      Change-Id: I55f77004b00391875d26df8e55e54d79cef168dc
      Reviewed-on: https://go-review.googlesource.com/106255Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      51533fda
    • Rob Pike's avatar
      doc/install.html: address comments from review of previous edit · cf776036
      Rob Pike authored
      Point out that one can just run the commands now; it's not necessary
      to log out first.
      
      Change-Id: I48d0cc0273d97ba54ce59b3a3bbcae0b5af9aaef
      Reviewed-on: https://go-review.googlesource.com/106195Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      cf776036
    • Jeremy Schlatter's avatar
      doc: switch from spaces to tabs for indentation in example code · 338ac2af
      Jeremy Schlatter authored
      This is the standard that gofmt uses.
      
      Change-Id: I30e70611ccd0d3bbaa500fa84e9d1ba75970f0bc
      GitHub-Last-Rev: b2b7af0df9759ad447b6fd3551ea356804d136b2
      GitHub-Pull-Request: golang/go#24802
      Reviewed-on: https://go-review.googlesource.com/106123Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      338ac2af
    • Keith Randall's avatar
      runtime: use fixed TLS offsets on darwin/amd64 and darwin/386 · b3a854c7
      Keith Randall authored
      Fixes #23617
      
      Note that this CL does not affect darwin/arm and darwin/arm64,
      still TBD what, if anything, needs to be done for those.
      
      This is a fix of CL 105975 which was reverted in CL 106155.
      Needed to use movl instead of movq for 386.
      
      Change-Id: I0db7f8087173869e60cc22c6c3124fa0a0739b46
      Reviewed-on: https://go-review.googlesource.com/106156
      Run-TryBot: Keith Randall <khr@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b3a854c7
  2. 10 Apr, 2018 23 commits
  3. 09 Apr, 2018 8 commits