------- Comment #15 from hp at gcc dot gnu dot org 2008-05-10 06:59 ------- (In reply to comment #14) > If there is no CONST wrapping the difference of symbols, does the CRIS port > continue to believe the address is legitimate?
As I said, for the failure on CRIS, it's not passed as an *address*, just an ordinary operand. > In other words, Paolo's patch > without the CONST? The CONST changes the world, so hopefully the right thing would happen. > Separate from the specific grouping satisfying legitimate_address, the RTL > does > contain a difference of SYMBOL_REFs from different sections. If it is not a > valid address, valid instruction, valid relocation, GCC will generate the > difference as an explicit subtraction across multiple instructions because it > is trying to calculate that operation. Correct. > I do not understand how the operation > GCC is trying to perform in the CRIS port is valid using multiple > instructions. Maybe it'll help if I just quote the faulty assembly code: ... move.d $r12,$r13 add.d .LC6-__ZN...mangling elided...rep_storageE-12,$r13 ba .L98 nop ... (The add.d does what you think; adds the offset to register $r13). The ".LC6-__ZN...mangling elided...rep_storageE-12" (wrapped in a CONST) is just passed to LEGITIMATE_CONSTANT_P at replacement time. No MEM in sight, hence no GO_IF_LEGITIMATE_ADDRESS call. brgds, H-P -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36182