• Miran.Karic's avatar
    MIPS: Fix Subu and add optimization · de14ba9f
    Miran.Karic authored
    For int16 imm values Subu would emit addiu with -imm value, but doing
    this with min_int16 would overflow and produce incorrect result. This is
    fixed by checking if -imm is int16. A test for this case is created.
    
    An optimization is also added for values imm where we cannot just emit
    addiu and loading -imm to a register takes one instruction using ori.
    Then instead of loading imm with lui;ori and subtracting with subu, we
    can load -imm with ori and add with addu.
    
    BUG=
    TEST=cctest/test-assembler-mips/Subu
    
    Review-Url: https://codereview.chromium.org/2845043002
    Cr-Commit-Position: refs/heads/master@{#44932}
    de14ba9f
Name
Last commit
Last update
..
OWNERS Loading commit data...
assembler-mips-inl.h Loading commit data...
assembler-mips.cc Loading commit data...
assembler-mips.h Loading commit data...
code-stubs-mips.cc Loading commit data...
code-stubs-mips.h Loading commit data...
codegen-mips.cc Loading commit data...
codegen-mips.h Loading commit data...
constants-mips.cc Loading commit data...
constants-mips.h Loading commit data...
cpu-mips.cc Loading commit data...
deoptimizer-mips.cc Loading commit data...
disasm-mips.cc Loading commit data...
frames-mips.cc Loading commit data...
frames-mips.h Loading commit data...
interface-descriptors-mips.cc Loading commit data...
macro-assembler-mips.cc Loading commit data...
macro-assembler-mips.h Loading commit data...
simulator-mips.cc Loading commit data...
simulator-mips.h Loading commit data...