TMSC320C6x port: return label is being deleted
Adrian Strätling
adrian.straetling@cs.tu-chemnitz.de
Thu Sep 16 18:03:00 GMT 2004
Hi,
Graham Stott wrote:
>You only need a label to appear in the generated .s file so your call
>pattern can take care of making one up when the time comes to output your
>call fragment.
>
>
Ok,
can I somehow attach the label to the call insn, so that the output
function can get the label number and print it?
I tried:
"
insn = gen_rtx_CALL (VOIDmode, mem, const0_rtx);
emit_call_insn(insn);
emit_label(ret_label);
REG_NOTES (insn) = gen_rtx_INSN_LIST (REG_LABEL, ret_label,
REG_NOTES(insn));
LABEL_NUSES(ret_label)++;
"
which results in RTL:
"
(insn 17 15 18 2 (set (mem:SI (pre_dec:SI (reg/f:SI 47 b15)) [0 S4 A32])
(label_ref:SI 19)) -1 (nil)
(insn_list:REG_LABEL 19 (nil)))
(call_insn 18 17 19 2 (call (mem:QI (symbol_ref:SI ("nop") [flags 0x3]
<function_decl 0x401d45e4 nop>) [0 S1 A8])
(const_int 0 [0x0])) -1 (nil)
(expr_list:REG_EH_REGION (const_int 0 [0x0])
(nil))
(nil))
(code_label 19 18 34 3 5 "" [1 uses])
"
It seems I have to emit the label to get the REFs right.
However, I miss the the "REG_LABEL 19" in the insn list of the call insn.
Another approach would be to walk the dependency list at the time of
output, but I'd rather prefer the first one.
Thanks,
Adrian
More information about the Gcc
mailing list