• Ben Shi's avatar
    cmd/internal/obj/arm: fix constant decomposition · c8ab8c1f
    Ben Shi authored
    There are two issues in constant decomposition.
    
    1. A typo in "func immrot2s" blocks "case 107" of []optab be triggered.
    
    2. Though "ADD $0xffff, R0, R0" is decomposed to "ADD $0xff00, R0, R0" and
       "ADD $0x00ff, R0, R0" as expected, "ADD $0xffff, R0" still uses the
       constant pool, which should be the same as "ADD $0xffff, R0, R0".
    
    This patch fixes them and adds more instruction encoding tests.
    
    fix #20516
    
    Change-Id: Icd7bdfa1946b29db15580dcb429111266f1384c6
    Reviewed-on: https://go-review.googlesource.com/44335
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
    c8ab8c1f
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...