1. 19 Apr, 2017 12 commits
  2. 18 Apr, 2017 21 commits
  3. 17 Apr, 2017 7 commits
    • Keith Randall's avatar
      cmd/compile: implement non-constant rotates · 7e07e635
      Keith Randall authored
      Makes math/bits.Rotate{Left,Right} fast on amd64.
      
      name              old time/op  new time/op  delta
      RotateLeft-12     7.42ns ± 6%  5.45ns ± 6%  -26.54%   (p=0.000 n=9+10)
      RotateLeft8-12    4.77ns ± 5%  3.42ns ± 7%  -28.25%   (p=0.000 n=8+10)
      RotateLeft16-12   4.82ns ± 8%  3.40ns ± 7%  -29.36%  (p=0.000 n=10+10)
      RotateLeft32-12   4.87ns ± 7%  3.48ns ± 7%  -28.51%    (p=0.000 n=8+9)
      RotateLeft64-12   5.23ns ±10%  3.35ns ± 6%  -35.97%   (p=0.000 n=9+10)
      RotateRight-12    7.59ns ± 8%  5.71ns ± 1%  -24.72%   (p=0.000 n=10+8)
      RotateRight8-12   4.98ns ± 7%  3.36ns ± 9%  -32.55%  (p=0.000 n=10+10)
      RotateRight16-12  5.12ns ± 2%  3.45ns ± 5%  -32.62%  (p=0.000 n=10+10)
      RotateRight32-12  4.80ns ± 6%  3.42ns ±16%  -28.68%  (p=0.000 n=10+10)
      RotateRight64-12  4.78ns ± 6%  3.42ns ± 6%  -28.50%  (p=0.000 n=10+10)
      
      Update #18940
      
      Change-Id: Ie79fb5581c489ed4d3b859314c5e669a134c119b
      Reviewed-on: https://go-review.googlesource.com/39711
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      7e07e635
    • Austin Clements's avatar
      runtime: make internal CallersFrames-equivalent that doesn't escape PC slice · 38521004
      Austin Clements authored
      The Frames API forces the PC slice to escape to the heap because it
      stores it in the Frames object. However, we'd like to use this API for
      call stack expansion internally in the runtime in places where it
      would be very good to avoid heap allocation.
      
      This commit makes this possible by pulling the bulk of the Frames
      implementation into an internal frameExpander API. The key difference
      between these APIs is that the frameExpander does not hold the PC
      slice; instead, the caller is responsible for threading the PC slice
      through the frameExpander API calls. This makes it possible to keep
      the PC slice on the stack. The Frames API then becomes a thin shim
      around the frameExpander that keeps the PC slice in the Frames object.
      
      Change-Id: If6b2d0b9132a2a905a0cf5deced9feddce76fc0e
      Reviewed-on: https://go-review.googlesource.com/40610
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Lazar <lazard@golang.org>
      38521004
    • Andy Balholm's avatar
      net/http: ignore extra space between response version and status code · 668cca6c
      Andy Balholm authored
      Reading a response with a status line like "HTTP/1.0  401 Unauthorized"
      (with two spaces after the version) has been returning an error. Now the
      extra space will be ignored.
      
      Fixes #19989
      
      Change-Id: I0c88a6ef7562ba80e2e2635be2070dd1b5b671a7
      Reviewed-on: https://go-review.googlesource.com/40933Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      668cca6c
    • Michael Hudson-Doyle's avatar
      cmd/link: only include the version info and export data in ABI hash · 533ed967
      Michael Hudson-Doyle authored
      Previously the "ABI hash" for a package (used to determine if a loaded shared
      library has the ABI expected by its loader) was the hash of the entire
      __.PKGDEF file. But that means it depends on the build ID generated by the go
      tool for the package, which means that if a file is added (even a .c or .h
      file!) to the package, the ABI changes, perhaps uncessarily.
      
      Fixes #19920
      
      Change-Id: If919481e1a03afb350c8a9c7a0666bb90ee90270
      Reviewed-on: https://go-review.googlesource.com/40401
      Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      533ed967
    • Robert Griesemer's avatar
      spec: clarify use of fused-floating point operations · 94b6011c
      Robert Griesemer authored
      Added a paragraph and examples explaining when an implementation
      may use fused floating-point operations (such as FMA) and how to
      prevent operation fusion.
      
      For #17895.
      
      Change-Id: I64c9559fc1097e597525caca420cfa7032d67014
      Reviewed-on: https://go-review.googlesource.com/40391Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      94b6011c
    • Lynn Boger's avatar
      cmd/asm: detect invalid DS form offsets for ppc64x · 7d4cca07
      Lynn Boger authored
      While debugging a recent regression it was discovered that
      the assembler for ppc64x was not always generating the correct
      instruction for DS form loads and stores.  When an instruction
      is DS form then the offset must be a multiple of 4, and if it
      isn't then bits outside the offset field were being incorrectly
      set resulting in unexpected and incorrect instructions.
      
      This change adds a check to determine when the opcode is DS form
      and then verifies that the offset is a multiple of 4 before
      generating the instruction, otherwise logs an error.
      
      This also changes a few asm files that were using unaligned offsets
      for DS form loads and stores.  In the runtime package these were
      instructions intended to cause a crash so using aligned or unaligned
      offsets doesn't change that behavior.
      
      Change-Id: Ie3a7e1e65dcc9933b54de7a46a054da8459cb56f
      Reviewed-on: https://go-review.googlesource.com/40476Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      7d4cca07
    • Mostyn Bramley-Moore's avatar
      syscall: make TestFcntlFlock more robust · 16db1892
      Mostyn Bramley-Moore authored
      Avoid the use of constant absolute temp files in tests.  This could
      produce flaky results, for example on multiuser development machines.
      
      Change-Id: Ia76157a0660fbe294bb31a46ded886cea5deec97
      Reviewed-on: https://go-review.googlesource.com/40916Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      16db1892