This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PA move_operand
- To: Jeffrey A Law <law at redhat dot com>
- Subject: PA move_operand
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Thu, 22 Mar 2001 15:20:06 +1100 (EST)
- cc: gcc-bugs at gcc dot gnu dot org
Hi Jeff,
This change has a hole in it. :-(
Mon Feb 19 20:24:50 2001 Jeffrey A Law (law@cygnus.com)
* pa.c (move_operand): Accept code to load the address of a
symbol out of the DLT as a valid move operand.
(print_operand, case 'A'): New to handle generating a DLT
reference for a LO_SUM expression.
* pa.h (EXTRA_CONSTRAINT): Handle 'A' for DLT LO_SUM references.
* pa.md (movsi, movdi patterns): Allow DLT LO_SUM references.
The problem being that there is nothing to prohibit global_alloc doing
things like the following:
(insn 313 311 315 (set (reg/v/f:SI 50 %fr13 [186])
(mem/u:SI (lo_sum:SI (reg:SI 1 %r1 [187])
(unspec:SI[
(symbol_ref/v:SI ("*.LC92"))
] 0)) 0)) 68 {*pa.md:2088} (insn_list 311 (insn_list 311 (nil)))
(expr_list:REG_DEAD (reg:SI 1 %r1 [187])
(nil)))
which leads to an abort in output_operand. For cpus < PA2.0 we can't do
more than a -32..+31 offset anyway, so the above needs to be split into
(set (reg %r1) (lo_sum (reg %r1) (symbol_ref ("*.LC92"))))
(set (reg %fr13) (mem (reg %r1)))
How and where this should happen, I'm not too sure. Which is why I'm
asking here instead of spending a day or so that I can ill afford at the
moment learning more about gcc.
Alan Modra
--
Linuxcare