egcs 980315 bug on powerpc-unknown-linux-gnulibc1

Jeffrey A Law law@cygnus.com
Tue May 19 15:14:00 GMT 1998


  In message < 9805191704.AA28390@rios1.watson.ibm.com >you write:
  > >>>>> Franz Sirl writes:
  > 
  > Franz> @@ -4523,7 +4542,7 @@
  > Franz> #endif
  > Franz> else if (TARGET_NEW_MNEMONICS)
  > Franz> {
  > Franz> -	  fprintf (file, "\taddis %s,%s,", reg_names[11], reg_names[11]
  > );
  > Franz> +	  fprintf (file, "\tlis %s,", reg_names[11]);
  > Franz> assemble_name (file, buf);
  > Franz> fprintf (file, "@ha\n");
  > Franz> fprintf (file, "\tstw %s,4(%s)\n", reg_names[0], reg_names[1]);
  > 
  > 	Are you trying to increment r11 or replace its value?  I thought
  > that you were saying that this was a bug.  And this patch only replaces
  > the new mnemonic version.  Since there doesn't seem to be agreement on
  > this patch and the patch is incomplete and inconsistent, I will skip it.
  > This sort of confusion makes it very difficult to address SVR4 PowerPC
  > reports.
Ironically we've got someone looking at this code for a Cygnus
customer right now.  It didn't register until a few minutes ago
that his analysis of a bug in the profiling code was referring to
the code mentioned above.

This isn't just a change in mnemonic, it's a change in operation.

The old code does

addis 11,11,<label>

Which I would guess adds the value in r11 to the label's address
and stores the value in r11.

The new code does

lis 11,<label>

Which would just load the address of the label into r11.

r11 is a call clobbered register which has no known value at the
start of most functions (the exception would be a function called
with a static chain pointer since r11 is the static chain register).

jeff





More information about the Gcc-bugs mailing list