gcc/libgo
Cherry Zhang fba70f605e compiler,runtime: use __builtin_dwarf_cfa for getcallersp
Currently, the compiler lowers runtime.getcallersp to
    __builtin_frame_address(1). In the C side of the runtime,
    getcallersp is defined as __builtin_frame_address(0). They don't
    match. Further, neither of them actually returns the caller's SP.
    On AMD64, __builtin_frame_address(0) just returns the frame
    pointer. __builtin_frame_address(1) returns the memory content
    where the frame pointer points to, which is typically the
    caller's frame pointer but can also be garbage if the frame
    pointer is not enabled.
    
    This CL changes it to use __builtin_dwarf_cfa(), which returns
    the caller's SP at the call site. This matches the SP we get
    from unwinding the stack.
    
    Currently getcallersp is not used for anything real. It will be
    used for precise stack scan (a new version of CL 159098).
    
    Reviewed-on: https://go-review.googlesource.com/c/162905

	* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa
	instead of __builtin_frame_address.

From-SVN: r268952
2019-02-15 23:22:29 +00:00
..
config re PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of gcc's required automake and modern Perl) 2018-10-31 20:46:17 +00:00
go re PR go/89123 (Too many go test failures on s390x-linux) 2019-02-15 14:51:10 +00:00
misc/cgo runtime, sync: use __atomic intrinsics instead of __sync 2019-02-01 21:55:38 +00:00
runtime compiler,runtime: use __builtin_dwarf_cfa for getcallersp 2019-02-15 23:22:29 +00:00
testsuite re PR go/89168 (FAIL: cmd/go/internal/load) 2019-02-15 00:36:50 +00:00
LICENSE
MERGE libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
Makefile.am libgo: add configury and sysinfo support for hurd 2019-02-01 22:46:39 +00:00
Makefile.in libgo: add configury and sysinfo support for hurd 2019-02-01 22:46:39 +00:00
PATENTS
README
README.gcc
VERSION libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
aclocal.m4 re PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of gcc's required automake and modern Perl) 2018-10-31 20:46:17 +00:00
check-packages.txt libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
config.h.in runtime, sync: use __atomic intrinsics instead of __sync 2019-02-01 21:55:38 +00:00
configure libgo: add configury and sysinfo support for hurd 2019-02-01 22:46:39 +00:00
configure.ac libgo: add configury and sysinfo support for hurd 2019-02-01 22:46:39 +00:00
goarch.sh libgo: support x32 as GOARCH=amd64p32 GOOS=linux 2018-10-01 20:17:11 +00:00
godeps.sh
gotool-packages.txt libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
libgo-packages.txt libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
libgo.imp
match.sh libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
merge.sh libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
mkrsysinfo.sh
mkruntimeinc.sh
mksigtab.sh libgo: add configury and sysinfo support for hurd 2019-02-01 22:46:39 +00:00
mksysinfo.sh mksysinfo: remove incorrect quotes in st_fsid handling for Hurd 2019-02-12 00:15:34 +00:00
mvifdiff.sh
sysinfo.c syscall: remove Ustat 2018-06-22 14:25:52 +00:00

README

See ../README.

This is the runtime support library for the Go programming language.
This library is intended for use with the Go frontend.

This library should not be stripped when it is installed.  Go code
relies on being able to look up file/line information, which comes
from the debugging info using the libbacktrace library.

The library has only been tested on GNU/Linux using glibc, and on
Solaris.  It should not be difficult to port to other operating
systems.

Directories:

go
  A copy of the Go library from http://golang.org/, with several
  changes for gccgo.

runtime
  Runtime functions, written in C, which are called directly by the
  compiler or by the library.

Contributing
============

To contribute patches to the files in this directory, please see
http://golang.org/doc/gccgo_contribute.html .

The master copy of these files is hosted at
http://code.google.com/p/gofrontend .  Changes to these files require
signing a Google contributor license agreement.  If you are the
copyright holder, you will need to agree to the individual contributor
license agreement at
http://code.google.com/legal/individual-cla-v1.0.html.  This agreement
can be completed online.

If your organization is the copyright holder, the organization will
need to agree to the corporate contributor license agreement at
http://code.google.com/legal/corporate-cla-v1.0.html.

If the copyright holder for your code has already completed the
agreement in connection with another Google open source project, it
does not need to be completed again.