1. 16 Aug, 2016 27 commits
  2. 15 Aug, 2016 5 commits
  3. 11 Aug, 2016 3 commits
  4. 10 Aug, 2016 4 commits
    • Cherry Zhang's avatar
      [dev.ssa] cmd/internal/obj/arm64: fix encoding constant into some instructions · 748aa844
      Cherry Zhang authored
      When a constant can be encoded in a logical instruction (BITCON), do
      it this way instead of using the constant pool. The BITCON testing
      code runs faster than table lookup (using map):
      
      (on AMD64 machine, with pseudo random input)
      BenchmarkIsBitcon-4   	300000000	         4.04 ns/op
      BenchmarkTable-4      	50000000	        27.3 ns/op
      
      The equivalent C code of BITCON testing is formally verified with
      model checker CBMC against linear search of the lookup table.
      
      Also handle cases when a constant can be encoded in a MOV instruction.
      In this case, materializa the constant into REGTMP without using the
      constant pool.
      
      When constants need to be added to the constant pool, make sure to
      check whether it fits in 32-bit. If not, store 64-bit.
      
      Both legacy and SSA compiler backends are happy with this.
      
      Fixes #16226.
      
      Change-Id: I883e3069dee093a1cdc40853c42221a198a152b0
      Reviewed-on: https://go-review.googlesource.com/26631
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      748aa844
    • Josh Bleecher Snyder's avatar
      testing: respect benchtime on very fast benchmarks · 31ad583a
      Josh Bleecher Snyder authored
      When ns/op dropped below 1, the old code
      ignored benchtime and reverted to 1s.
      
      Change-Id: I59752cef88d8d73bfd5b085f5400ae657f78504e
      Reviewed-on: https://go-review.googlesource.com/26664
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarMarcel van Lohuizen <mpvl@golang.org>
      31ad583a
    • Keith Randall's avatar
      [dev.ssa] cmd/compile: implement GO386=387 · c069bc49
      Keith Randall authored
      Last part of the 386 SSA port.
      
      Modify the x86 backend to simulate SSE registers and
      instructions with 387 registers and instructions.
      The simulation isn't terribly performant, but it works,
      and the old implementation wasn't very performant either.
      Leaving to people who care about 387 to optimize if they want.
      
      Turn on SSA backend for 386 by default.
      
      Fixes #16358
      
      Change-Id: I678fb59132620b2c47e993c1c10c4c21135f70c0
      Reviewed-on: https://go-review.googlesource.com/25271
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      c069bc49
    • Keith Randall's avatar
      [dev.ssa] cmd/compile: more fixes for 386 shared libraries · 77ef597f
      Keith Randall authored
      Use the destination register for materializing the pc
      for GOT references also. See https://go-review.googlesource.com/c/25442/
      The SSA backend assumes CX does not get clobbered for these instructions.
      
      Mark duffzero as clobbering CX. The linker needs to clobber CX
      to materialize the address to call. (This affects the non-shared-library
      duffzero also, but hopefully forbidding one register across duffzero
      won't be a big deal.)
      
      Hopefully this is all the cases where the linker is clobbering CX
      under the hood and SSA assumes it isn't.
      
      Change-Id: I080c938170193df57cd5ce1f2a956b68a34cc886
      Reviewed-on: https://go-review.googlesource.com/26611
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      77ef597f
  5. 09 Aug, 2016 1 commit