• Cherry Zhang's avatar
    cmd/compile: simplify div/mod on ARM · 38cd7988
    Cherry Zhang authored
    On ARM, DIV, DIVU, MOD, MODU are pseudo instructions that makes
    runtime calls _div/_udiv/_mod/_umod, which themselves are wrappers
    of udiv. The udiv function does the real thing.
    
    Instead of generating these pseudo instructions, call to udiv
    directly. This removes one layer of wrappers (which has an awkward
    way of passing argument), and also allows combining DIV and MOD
    if both results are needed.
    
    Change-Id: I118afc3986db3a1daabb5c1e6e57430888c91817
    Reviewed-on: https://go-review.googlesource.com/29390Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    38cd7988
ssa.go 25.9 KB