1. 23 Jan, 2015 3 commits
  2. 21 Jan, 2015 1 commit
  3. 20 Jan, 2015 2 commits
  4. 19 Jan, 2015 2 commits
  5. 16 Jan, 2015 5 commits
    • runtime: Add __sparc__ case for SETCONTEXT_CLOBBERS_TLS. · 0f59f5c1
      The glibc setcontext incorrectly modifies %g7 on SPARC.
      
      From Richard Henderson.
      
      From-SVN: r219778
      Ian Lance Taylor committed
    • testing/quick: Revert Alpha specific change. · 20780a00
      No longer needed now that libffi supports complex types.
      
      From-SVN: r219777
      Ian Lance Taylor committed
    • compiler, reflect, runtime: Use static chain for closures. · 38bf819a
      Change from using __go_set_closure to passing the closure
      value in the static chain field.  Uses new backend support for
      setting the closure chain in a call from C via
      __builtin_call_with_static_chain.  Uses new support in libffi
      for Go closures.
      
      The old architecture specific support for reflect.MakeFunc is
      removed, replaced by the libffi support.
      
      All work done by Richard Henderson.
      
      	* go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument.
      	(Gcc_backend::static_chain_variable): New method.
      
      From-SVN: r219776
      Richard Henderson committed
    • net: Restore earlier Solaris-specific version of setKeepAlivePeriod. · 72d7151a
      The version from the master repository seems to be appropriate
      for OpenSolaris but not for Solaris itself.  Solaris 11.2
      proper does not define TCP_KEEPIDLE or TCP_KEEPINTVL.
      
      From-SVN: r219749
      Ian Lance Taylor committed
    • runtime: Use a struct, not void, for an empty struct for libffi. · cb054b63
      A recent libffi upgrade caused the reflect test to fail on
      386.  The problem case is a function that returns an empty
      struct--a struct with no fields.  The libffi library does not
      recognize the existence of empty structs, presumably since
      they can't happen in C.  To work around this, the Go interface
      to the libffi library changes an empty struct to void.  This
      normally works fine, but with the new libffi upgrade it fails
      for a function that returns an empty struct.  On 386 a
      function that returns a struct is expected to pop the hidden
      pointer when it returns.  So when we convert an empty struct
      to void, libffi is calling a function that pops the hidden
      pointer but does not expect that to happen.
      
      In the older version of libffi, this didn't matter, because
      the libffi code for 386 used a frame pointer, so the fact that
      the stack pointer was wonky when the function returned was
      ignored as the stack pointer was immediately replaced by the
      saved frame pointer.  In the newer version of libffi, the 386
      code is more efficient and does not use a frame pointer, and
      therefore it matters whether libffi expects the function to
      pop the hidden pointer or not.
      
      This patch changes libgo to convert an empty to a struct with
      a single field of type void.  This seems to be enough to get
      the test cases working again.
      
      Of course the real fix would be to change libffi to handle
      empty types, but as libffi uses size == 0 as a marker for an
      uninitialized type, that would be a non-trivial change.
      
      From-SVN: r219701
      Ian Lance Taylor committed
  6. 15 Jan, 2015 5 commits
  7. 10 Jan, 2015 1 commit
  8. 09 Jan, 2015 1 commit
  9. 08 Jan, 2015 1 commit
  10. 06 Jan, 2015 1 commit
  11. 05 Jan, 2015 1 commit
  12. 23 Dec, 2014 1 commit
  13. 17 Dec, 2014 1 commit
  14. 13 Dec, 2014 3 commits
    • re PR go/61258 (gccgo: assertion failure go-map-delete.c:37 [GoSmith]) · 9ac18f8c
      	PR go/61258
      runtime: Don't crash when deleting zero-sized key.
      
      From-SVN: r218702
      Ian Lance Taylor committed
    • testing: Add testing.MainStart function. · e846322c
      This patches in the Go 1.4 function, for convenience for
      people using the Go 1.4 go tool with mainline gccgo.
      
      From-SVN: r218700
      Ian Lance Taylor committed
    • runtime: Clear stack pointers for extra G's. · c31fc2f4
      Fix an unusual C to Go callback case.  Newly created C threads
      call into Go code, forcing the Go code to allocate new M and G
      structures.  While executing Go code, the stack is split.  The
      Go code then returns.  Returning from a Go callback is treated
      as entering a system call, so the G gcstack field is set to
      point to the Go stack.  In this case, though, we were called
      from a newly created C thread, so we drop the extra M and G
      structures.  The C thread then exits.
      
      Then a new C thread calls into Go code, reusing the previously
      created M and G.  The Go code requires a larger stack frame,
      causing the old stack segment to be unmapped and a new stack
      segment allocated.  At this point the gcstack field is
      pointing to the old stack segment.
      
      Then a garbage collection occurs.  The garbage collector sees
      that the gcstack field is not nil, so it scans it as the first
      stack segment.  Unfortunately it points to memory that was
      unmapped.  So the program crashes.
      
      The fix is simple: when handling extra G structures created
      for callbacks from new C threads, clear the gcstack field.
      
      From-SVN: r218699
      Ian Lance Taylor committed
  15. 12 Dec, 2014 1 commit
  16. 01 Dec, 2014 1 commit
  17. 21 Nov, 2014 1 commit
  18. 14 Nov, 2014 1 commit
    • runtime: set library name based on compiler name · 4c46b5f0
      Different compilers may have different release cadences or ABI
      incompatibilities, so it does not make sense to use the same library
      name for runtime libraries intended for different compilers.
      
      This CL causes a libgo built by llgo to receive the name libgo-llgo.
      Likewise, libgobegin is named libgobegin-llgo.
      
      From-SVN: r217583
      Ian Lance Taylor committed
  19. 12 Nov, 2014 1 commit
  20. 06 Nov, 2014 2 commits
  21. 05 Nov, 2014 1 commit
  22. 04 Nov, 2014 1 commit
    • libgo: add s390 support · 1fec5f52
      From Dominik Vogt.
      
      * libgo/go/syscall/libcall_linux_s390.go: New file for s390 support.
      * libgo/go/syscall/syscall_linux_s390.go: Ditto.
      * libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support.
      * libgo/go/syscall/syscall_linux_s390x.go: Ditto.
      * libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and
      s390x.
      * libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and
      s390x
      * libgo/mksysinfo.sh: Ditto.
      (upcase_fields): New helper function
      
      * libgo/go/debug/elf/file.go (applyRelocations): Implement relocations
      on s390x.
      (applyRelocationsS390x): Ditto.
      (DWARF): Ditto.
      * libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations.
      (r390Strings): Ditto.
      (String): Helper function for S390 relocations.
      (GoString): Ditto.
      
      * libgo/go/reflect/makefuncgo_s390.go: New file.
      (S390MakeFuncStubGo): Implementation of s390 abi.
      * libgo/go/reflect/makefuncgo_s390x.go: New file.
      (S390xMakeFuncStubGo): Implementation of s390x abi.
      * libgo/go/reflect/makefunc_s390.c: New file.
      (makeFuncStub): s390 and s390x specific implementation of function.
      * libgo/go/reflect/makefunc.go
      (MakeFunc): Add support for s390 and s390x.
      (makeMethodValue): Ditto.
      (makeValueMethod): Ditto.
      * libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto.
      (go_reflect_makefunc_file): Ditto.
      * libgo/go/reflect/makefunc_dummy.c: Ditto.
      * libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype
      for use in makefunc_s390.c.
      (__go_makefunc_returning): Ditto.
      
      * libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the
      arguments of the clone system call for s390[x].
      
      * libgo/configure.ac (is_s390): New variable.
      (is_s390x): Ditto
      (LIBGO_IS_S390): Ditto.
      (LIBGO_IS_S390X): Ditto.
      (GOARCH): Support s390 and s390x.
      * libgo/go/go/build/build.go (cgoEnabled): Ditto.
      * libgo/go/go/build/syslist.go (goarchList): Ditto.
      
      From-SVN: r217106
      Ian Lance Taylor committed
  23. 03 Nov, 2014 1 commit
  24. 28 Oct, 2014 2 commits