1. 09 Aug, 2016 1 commit
  2. 08 Aug, 2016 1 commit
  3. 07 Aug, 2016 1 commit
  4. 06 Aug, 2016 1 commit
  5. 04 Aug, 2016 4 commits
  6. 03 Aug, 2016 1 commit
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile: refactor out rulegen value parsing · 6a1153ac
      Josh Bleecher Snyder authored
      Previously, genMatch0 and genResult0 contained
      lots of duplication: locating the op, parsing
      the value, validation, etc.
      Parsing and validation was mixed in with code gen.
      
      Extract a helper, parseValue. It is responsible
      for parsing the value, locating the op, and doing
      shared validation.
      
      As a bonus (and possibly as my original motivation),
      make op selection pay attention to the number
      of args present.
      This allows arch-specific ops to share a name
      with generic ops as long as there is no ambiguity.
      It also detects and reports unresolved ambiguity,
      unlike before, where it would simply always
      pick the generic op, with no warning.
      
      Also use parseValue when generating the top-level
      op dispatch, to ensure its opinion about ops
      matches genMatch0 and genResult0.
      
      The order of statements in the generated code used
      to depend on the exact rule. It is now somewhat
      independent of the rule. That is the source
      of some of the generated code changes in this CL.
      See rewritedec64 and rewritegeneric for examples.
      It is a one-time change.
      
      The op dispatch switch and functions used to be
      sorted by opname without architecture. The sort
      now includes the architecture, leading to further
      generated code changes.
      See rewriteARM and rewriteAMD64 for examples.
      Again, it is a one-time change.
      
      There are no functional changes.
      
      Change-Id: I22c989183ad5651741ebdc0566349c5fd6c6b23c
      Reviewed-on: https://go-review.googlesource.com/24649
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      6a1153ac
  7. 02 Aug, 2016 10 commits
  8. 01 Aug, 2016 1 commit
  9. 29 Jul, 2016 1 commit
    • Cherry Zhang's avatar
      cmd/compile: fix possible spill of invalid pointer with DUFFZERO on AMD64 · 111d590f
      Cherry Zhang authored
      SSA compiler on AMD64 may spill Duff-adjusted address as scalar. If
      the object is on stack and the stack moves, the spilled address become
      invalid.
      
      Making the spill pointer-typed does not work. The Duff-adjusted address
      points to the memory before the area to be zeroed and may be invalid.
      This may cause stack scanning code panic.
      
      Fix it by doing Duff-adjustment in genValue, so the intermediate value
      is not seen by the reg allocator, and will not be spilled.
      
      Add a test to cover both cases. As it depends on allocation, it may
      be not always triggered.
      
      Fixes #16515.
      
      Change-Id: Ia81d60204782de7405b7046165ad063384ede0db
      Reviewed-on: https://go-review.googlesource.com/25309
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      111d590f
  10. 28 Jul, 2016 2 commits
  11. 27 Jul, 2016 4 commits
    • Rhys Hiltner's avatar
      runtime: reduce GC assist extra credit · ccca9c9c
      Rhys Hiltner authored
      Mutator goroutines that allocate memory during the concurrent mark
      phase are required to spend some time assisting the garbage
      collector. The magnitude of this mandatory assistance is proportional
      to the goroutine's allocation debt and subject to the assistance
      ratio as calculated by the pacer.
      
      When assisting the garbage collector, a mutator goroutine will go
      beyond paying off its allocation debt. It will build up extra credit
      to amortize the overhead of the assist.
      
      In fast-allocating applications with high assist ratios, building up
      this credit can take the affected goroutine's entire time slice.
      Reduce the penalty on each goroutine being selected to assist the GC
      in two ways, to spread the responsibility more evenly.
      
      First, do a consistent amount of extra scan work without regard for
      the pacer's assistance ratio. Second, reduce the magnitude of the
      extra scan work so it can be completed within a few hundred
      microseconds.
      
      Commentary on gcOverAssistWork is by Austin Clements, originally in
      https://golang.org/cl/24704
      
      Updates #14812
      Fixes #16432
      
      Change-Id: I436f899e778c20daa314f3e9f0e2a1bbd53b43e1
      Reviewed-on: https://go-review.googlesource.com/25155
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      Reviewed-by: 's avatarChris Broadfoot <cbro@golang.org>
      ccca9c9c
    • Cherry Zhang's avatar
      [dev.ssa] cmd/compile: fix possible invalid pointer spill in large Zero/Move on ARM · 114c0596
      Cherry Zhang authored
      Instead of comparing the address of the end of the memory to zero/copy,
      comparing the address of the last element, which is a valid pointer.
      Also unify large and unaligned Zero/Move, by passing alignment as AuxInt.
      
      Fixes #16515 for ARM.
      
      Change-Id: I19a62b31c5acf5c55c16a89bea1039c926dc91e5
      Reviewed-on: https://go-review.googlesource.com/25300
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      114c0596
    • Cherry Zhang's avatar
      [dev.ssa] cmd/compile: add more on ARM64 SSA · 83208504
      Cherry Zhang authored
      Support the following:
      - Shifts. ARM64 machine instructions only use lowest 6 bits of the
        shift (i.e. mod 64). Use conditional selection instruction to
        ensure Go semantics.
      - Zero/Move. Alignment is ensured.
      - Hmul, Avg64u, Sqrt.
      - reserve R18 (platform register in ARM64 ABI) and R29 (frame pointer
        in ARM64 ABI).
      
      Everything compiles, all.bash passed (with non-SSA test disabled).
      
      Change-Id: Ia8ed58dae5cbc001946f0b889357b258655078b1
      Reviewed-on: https://go-review.googlesource.com/25290
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      83208504
    • Brad Fitzpatrick's avatar
      net/http: fix data race with concurrent use of Server.Serve · c80e0d37
      Brad Fitzpatrick authored
      Fixes #16505
      
      Change-Id: I0afabcc8b1be3a5dbee59946b0c44d4c00a28d71
      Reviewed-on: https://go-review.googlesource.com/25280
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarChris Broadfoot <cbro@golang.org>
      c80e0d37
  12. 26 Jul, 2016 8 commits
  13. 25 Jul, 2016 1 commit
  14. 24 Jul, 2016 1 commit
    • David Chase's avatar
      [dev.ssa] cmd/compile: replace storeconst w/ storezero, fold addressing · 806cacc7
      David Chase authored
      Because PPC lacks store-immediate, remove the instruction
      that implies that it exists.  Replace it with storezero for
      the special case of storing zero, because R0 is reserved zero
      for Go (though the assembler knows this, do it in SSA).
      
      Also added address folding for storezero.
      (Now corrected to use right-sized stores in bulk-zero code.)
      
      Hello.go now compiles to
      genssa main
          00000 (...hello.go:7) TEXT "".main(SB), $0
          00001 (...hello.go:7) FUNCDATA $0, "".gcargs·0(SB)
          00002 (...hello.go:7) FUNCDATA $1, "".gclocals·1(SB)
      v23 00003 (...hello.go:8) MOVD $go.string."Hello, World!\n"(SB), R3
      v11 00004 (...hello.go:8) MOVD R3, 32(R1)
      v22 00005 (...hello.go:8) MOVD $14, R3
      v6  00006 (...hello.go:8) MOVD R3, 40(R1)
      v20 00007 (...hello.go:8) MOVD R0, 48(R1)
      v18 00008 (...hello.go:8) MOVD R0, 56(R1)
      v9  00009 (...hello.go:8) MOVD R0, 64(R1)
      v10 00010 (...hello.go:8) CALL fmt.Printf(SB)
      b2  00011 (...hello.go:9) RET
          00012 (<unknown line number>) END
      
      Updates #16010
      
      Change-Id: I33cfd98c21a1617502260ac753fa8cad68c8d85a
      Reviewed-on: https://go-review.googlesource.com/25151Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      806cacc7
  15. 23 Jul, 2016 1 commit
  16. 22 Jul, 2016 2 commits