1. 25 Jul, 2013 8 commits
    • Mikio Hara's avatar
      net: give more detail when test panics · cdd35983
      Mikio Hara authored
      R=golang-dev, dave
      CC=golang-dev
      https://golang.org/cl/11811043
      cdd35983
    • Peter Mundy's avatar
      syscall: prlimit argument error for Getrlimit and Setrlimit on Linux 32-bit · 58527600
      Peter Mundy authored
      The rlimit arguments for prlimit are reversed for linux 32-bit (386 and arm).
      Getrlimit becomes Setrlimit and vice versa.
      Fixes #5949.
      
      R=iant, mikioh.mikioh, rsc
      CC=golang-dev
      https://golang.org/cl/11803043
      58527600
    • Ian Lance Taylor's avatar
      cmd/cgo: gccgo fixes · d9d3debe
      Ian Lance Taylor authored
      Don't require a full-scale callback for calls to the special
      prologue functions.
      
      Always use a simple wrapper function for C functions, so that
      we can handle static functions defined in the import "C"
      comment.
      
      Disable a test that relies on gc-specific function names.
      
      Fixes #5905.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/11406047
      d9d3debe
    • Rémy Oudompheng's avatar
      cmd/gc: avoid passing unevaluated constant expressions to backends. · d7c99cdf
      Rémy Oudompheng authored
      Backends do not exactly expect receiving binary operators with
      constant operands or use workarounds to move them to
      register/stack in order to handle them.
      
      Fixes #5841.
      
      R=golang-dev, daniel.morsing, rsc
      CC=golang-dev
      https://golang.org/cl/11107044
      d7c99cdf
    • Mikio Hara's avatar
      net: simplify probeIPv6Stack · c0a4ce52
      Mikio Hara authored
      R=golang-dev, dave
      CC=golang-dev
      https://golang.org/cl/11807043
      c0a4ce52
    • Nick Craig-Wood's avatar
      crypto/md5: native arm assembler version · 085159da
      Nick Craig-Wood authored
      An ARM version of md5block.go with a big improvement in
      throughput (up to 2.5x) and a reduction in object size (21%).
      
      Code size
      
        Before 3100 bytes
        After 2424 bytes
        21% smaller
      
      Benchmarks on Rasperry Pi
      
      benchmark                       old ns/op    new ns/op    delta
      BenchmarkHash8Bytes                 11703         6636  -43.30%
      BenchmarkHash1K                     38057        21881  -42.50%
      BenchmarkHash8K                    208131       142735  -31.42%
      BenchmarkHash8BytesUnaligned        11457         6570  -42.66%
      BenchmarkHash1KUnaligned            69334        26841  -61.29%
      BenchmarkHash8KUnaligned           455120       182223  -59.96%
      
      benchmark                        old MB/s     new MB/s  speedup
      BenchmarkHash8Bytes                  0.68         1.21    1.78x
      BenchmarkHash1K                     26.91        46.80    1.74x
      BenchmarkHash8K                     39.36        57.39    1.46x
      BenchmarkHash8BytesUnaligned         0.70         1.22    1.74x
      BenchmarkHash1KUnaligned            14.77        38.15    2.58x
      BenchmarkHash8KUnaligned            18.00        44.96    2.50x
      
      benchmark                      old allocs   new allocs    delta
      BenchmarkHash8Bytes                     1            0  -100.00%
      BenchmarkHash1K                         2            0  -100.00%
      BenchmarkHash8K                         2            0  -100.00%
      BenchmarkHash8BytesUnaligned            1            0  -100.00%
      BenchmarkHash1KUnaligned                2            0  -100.00%
      BenchmarkHash8KUnaligned                2            0  -100.00%
      
      benchmark                       old bytes    new bytes    delta
      BenchmarkHash8Bytes                    64            0  -100.00%
      BenchmarkHash1K                       128            0  -100.00%
      BenchmarkHash8K                       128            0  -100.00%
      BenchmarkHash8BytesUnaligned           64            0  -100.00%
      BenchmarkHash1KUnaligned              128            0  -100.00%
      BenchmarkHash8KUnaligned              128            0  -100.00%
      
      This also adds another test which makes sure that the sums
      over larger blocks work properly. I wrote this test when I was
      worried about memory corruption.
      
      R=golang-dev, dave, bradfitz, rsc, ajstarks
      CC=golang-dev, minux.ma, remyoudompheng
      https://golang.org/cl/11648043
      085159da
    • Andrew Gerrand's avatar
      bufio: check buffer availability before reading in ReadFrom · 93c6d0ef
      Andrew Gerrand authored
      Fixes #5947.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/11801043
      93c6d0ef
    • Kevin Klues's avatar
      cmd/cgo: Fix issue with cgo cdefs · f7dfeea9
      Kevin Klues authored
      The problem is that the cdecl() function in cmd/cgo/godefs.go isn't
      properly translating the Go array type to a C array type when an
      asterisk follows the [] in the array type declaration (it is perfectly
      legal to put the asterisk on either side of the [] in go syntax,
      depending on how you set up your pointers).
      
      That said, the cdefs tool is only designed to translate from Go types
      generated using the cgo *godefs* tool -- where the godefs tool is
      designed to translate gcc-style C types into Go types. In essence, the
      cdefs tool translates from gcc-style C types to Go types (via the godefs
      tool), then back to kenc-style C types. Because of this, cdefs does not
      need to know how to translate arbitraty Go types into C, just the ones
      produced by godefs.
      
      The problem is that during this translation process, the logic is
      slightly wrong when going from (e.g.):
      
      char *array[10];
      to:
      array [10]*int8;
      back to:
      int8 *array[10];
      
      In the current implementation of cdecl(), the translation from the Go
      type declaration back to the kenc-style declaration looks for Go
      types of the form:
      
      name *[]type;
      rather than the actual generated Go type declaration of:
      name []*type;
      
      Both are valid Go syntax, with slightly different semantics, but the
      latter is the only one that can ever be generated by the godefs tools.
      (The semantics of the former are not directly expressible in a
      single C statement -- you would have to have to first typedef the array
      type, then declare a pointer to that typedef'd type in a separate
      statement).
      
      This commit changes the logic of cdecl() to look properly for, and
      translate, Go type declarations of the form:
      name []*type;
      
      Additionally, the original implementation only allowed for a single
      asterisk and a single sized aray (i.e. only a single level of pointer
      indirection, and only one set of []) on the type, whereas the patched
      version allows for an arbitrary number of both.
      
      Tests are included in misc/cgo/testcdefs and the all.bash script has been
      updated to account for these.
      
      R=golang-dev, bradfitz, dave, iant
      CC=golang-dev
      https://golang.org/cl/11377043
      f7dfeea9
  2. 24 Jul, 2013 14 commits
  3. 23 Jul, 2013 9 commits
  4. 22 Jul, 2013 9 commits