• Austin Clements's avatar
    runtime: correct ABI information for all functions · af1bfe0a
    Austin Clements authored
    There are three cases where we don't currently have the visibility to
    get the ABIs of runtime symbols right, which this CL fixes:
    
    1. For Go functions referenced from non-Go code in other packages.
       This is runtime.morestackc (which is referenced from function
       prologues) and a few syscall symbols. For these we need to generate
       ABI0 wrappers, so this CL adds dummy calls in the assembly code to
       force wrapper generation. There are many other cross-package
       references to runtime and runtime/internal/atomic, but these are
       handled specially by cmd/go.
    
    2. For calls generated by the compiler to runtime Go functions, there
       are a few symbols that aren't declared in builtins.go because we've
       never needed their type information before. Now we at least need
       their ABI information, so these are added to builtins.go.
    
    3. For calls generated by the compiler to runtime assembly functions,
       the compiler is going to assume the internal ABI is available, so
       we add Go stubs to the runtime to trigger wrapper generation. For
       these we're probably going to want to provide internal ABI
       definitions directly in the assembly for performance, but for now
       the ABIs are the same so it doesn't matter.
    
    For #27539.
    
    Change-Id: I9c224e7408d2ef4dd9b0e4c9d7e962ddfe111245
    Reviewed-on: https://go-review.googlesource.com/c/146822
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    Reviewed-by: 's avatarMichael Knyszek <mknyszek@google.com>
    af1bfe0a
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...