• Keith Randall's avatar
    [dev.ssa] cmd/compile: simplify 386+PIC+globals a bit · 94c8e59a
    Keith Randall authored
    We shouldn't issue instructions like MOVL foo(SB), AX directly from the
    SSA backend.  Instead we should do LEAL foo(SB), AX; MOVL (AX), AX.
    
    This simplifies obj logic because now only LEAL needs to be treated
    specially.  The register allocator uses the LEAL to in effect allocate
    the temporary register required for the shared library thunk calls.
    
    Also, the LEALs can now be CSEd.  So code like
        var g int
        func f() { g += 5 }
    Requires only one thunk call instead of 2.
    
    Change-Id: Ib87d465f617f73af437445871d0ea91a630b2355
    Reviewed-on: https://go-review.googlesource.com/26814
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    94c8e59a
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...