This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Clear out /s field when deleting label
- To: NIIBE Yutaka <gniibe at chroot dot org>
- Subject: Re: Clear out /s field when deleting label
- From: Richard Henderson <rth at cygnus dot com>
- Date: Sun, 28 May 2000 05:01:56 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- References: <E12vzu4-00028C-00@pwd.chroot.org>
On Sun, May 28, 2000 at 07:02:40PM +0900, NIIBE Yutaka wrote:
> mov.l .L2, $r1
> .L1:
> bsrf $r1
> nop
> ...
> .L2: .long function@PLT+.-4-.L1
>
> To do so, we emit the code_label for .L1. This label may be deleted
> by the flow analysis, it will become note insn.
This isn't going to work. Once the label is deleted, it is
no longer anchored to one spot, and may float around. When
it does, your pc-relative offsets will break.
I'd suggest something a bit more magic.
(parallel [(call (...))
(use (const_int 45))])
emits
bsrf $r1
.LPLT45:
nop
The use in the const pool could be a symbol ref, or whatever,
so long as it knows that `45' is the magic number for that call.
> * flow.c (flow_delete_insn_chain): Clear out /s field so that
> haifa-sched.c:add_dependence doesn't get confused.
Haifa shouldn't have been looking at LABEL_PRESERVE_P to begin with.
r~