solaris 2.9 sun assembler warnings
Jan Hubicka
jh@suse.cz
Thu Jun 12 18:49:00 GMT 2003
> Jan Hubicka wrote:
>
> >Hmm, so we are getting close. Does these warnings stil reproduce on
> >testcase I have? Or can I get new one?
>
> The one in errors.o is gone. But the one Kaveh sent is getting these
> errors here as well. Though bootstrap finished and I take it from stage2.
>
> Attached the i and the s files
>
> Andreas
>
>
> stage2/cc1 -fpreprocessed c-lang.i -quiet -dumpbase c-lang.c -mcpu=v7
> -auxbase-strip c-lang.o -g -O2 -W -Wall -Wwrite-strings
> -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
> -Werror -version -fno-common -o c-lang.s
> GNU C version 3.4 20030612 (experimental) (sparc-sun-solaris2.9)
> compiled by GNU C version 3.4 20030612 (experimental).
> GGC heuristics: --param ggc-min-expand=91 --param ggc-min-heapsize=114688
> /usr/ccs/bin/as -V -Qy -s -xarch=v8 -o c-lang.o c-lang.s
> /usr/ccs/bin/as: Sun WorkShop 6 update 2 Compiler Common 6.2
> Solaris_9_CBE 2001/04/02
> /usr/ccs/bin/as: "c-lang.s", line 1184: warning: label in delay slot
> (follows CTI)
> /usr/ccs/bin/as: "c-lang.s", line 1197: warning: label in delay slot
> (follows CTI)
> /usr/ccs/bin/as: "c-lang.s", line 1210: warning: label in delay slot
> (follows CTI)
> /usr/ccs/bin/as: "c-lang.s", line 1236: warning: label in delay slot
> (follows CTI)
> /usr/ccs/bin/as: "c-lang.s", line 1249: warning: label in delay slot
> (follows CTI)
> /usr/ccs/bin/as: "c-lang.s", line 1262: warning: label in delay slot
> (follows CTI)
Hi,
does the attached patch fix it? It recuresc old code that prevented
first line number information from being output. I didn't understand
why it is there and it seemed wrong. Still I guess there should be
better way to do that but I don't quite understand how the string
prologues/epilogues are output.
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.280
diff -c -3 -p -r1.280 final.c
*** final.c 8 Jun 2003 19:35:51 -0000 1.280
--- final.c 12 Jun 2003 18:40:48 -0000
*************** final_start_function (first, file, optim
*** 1342,1347 ****
--- 1342,1349 ----
FILE *file;
int optimize ATTRIBUTE_UNUSED;
{
+ rtx insn;
+
block_depth = 0;
this_is_asm_operands = 0;
*************** final_start_function (first, file, optim
*** 1361,1367 ****
last_linenum = 0;
last_filename = 0;
! high_block_linenum = high_function_linenum = last_linenum;
(*debug_hooks->begin_prologue) (last_linenum, last_filename);
--- 1363,1375 ----
last_linenum = 0;
last_filename = 0;
! for (insn = first; insn; insn = NEXT_INSN (insn))
! if (INSN_P (insn) && INSN_LOCATOR (insn))
! {
! last_filename = insn_file (insn);
! last_linenum = insn_line (insn);
! }
! high_function_linenum = last_linenum;
(*debug_hooks->begin_prologue) (last_linenum, last_filename);
Index: reorg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reorg.c,v
retrieving revision 1.84
diff -c -3 -p -r1.84 reorg.c
*** reorg.c 8 Apr 2003 20:16:54 -0000 1.84
--- reorg.c 12 Jun 2003 18:40:48 -0000
*************** emit_delay_sequence (insn, list, length)
*** 497,502 ****
--- 497,508 ----
PREV_INSN (tem) = XVECEXP (seq, 0, i - 1);
NEXT_INSN (XVECEXP (seq, 0, i - 1)) = tem;
+ /* SPARC assembler, for instance, emit warning when debug info is output
+ into the delay slot. */
+ if (INSN_LOCATOR (tem) && !INSN_LOCATOR (seq_insn))
+ INSN_LOCATOR (seq_insn) = INSN_LOCATOR (tem);
+ INSN_LOCATOR (tem) = 0;
+
for (note = REG_NOTES (tem); note; note = next)
{
next = XEXP (note, 1);
More information about the Gcc
mailing list