r246496 - in /trunk/gcc: ChangeLog config/arc/p...
claziss@gcc.gnu.org
claziss@gcc.gnu.org
Mon Mar 27 10:56:00 GMT 2017
Author: claziss
Date: Mon Mar 27 10:56:14 2017
New Revision: 246496
URL: https://gcc.gnu.org/viewcvs?rev=246496&root=gcc&view=rev
Log:
[ARC] Fix detection of long immediate for load/store operands.
ARC can use scaled offsets when loading (i.e. ld.as rA,[base,
offset]). Where base and offset can be a register or an immediate
operand. The scaling only applies on the offset part of the
instruction. The compiler can accept an address like this:
(plus:SI (mult:SI (reg:SI 2 r2 [orig:596 _2129 ] [596])
(const_int 4 [0x4]))
(const_int 60 [0x3c]))
Hence, to emit this instruction we place the (const_int 60) into base
and the register into offset to take advantage of the scaled offset
facility of the load instruction. As a result the length of the load
instruction is 8 bytes. However, the long_immediate_loadstore_operand
predicate used for calculating the length attribute doesn't recognize
this address and returns a wrong decision leading to a wrong length
computation for a load instruction using the above address.
gcc/
2017-03-27 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/predicates.md (long_immediate_loadstore_operand):
Consider scaled addresses cases.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arc/predicates.md
More information about the Gcc-cvs
mailing list