diff mbox

[RS6000] LE SFmode constants in toc

Message ID 20130604130527.GA6878@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra June 4, 2013, 1:05 p.m. UTC
ppc64 SFmode constants in the TOC occupy the first word of a dword.
For little-endian, we don't need to shift left.  Bootstrapped etc. and
committed as obvious revision 199646.

	* config/rs6000/rs6000.c (output_toc): Correct little-endian float
	constant output.

Comments

David Edelsohn June 4, 2013, 1:56 p.m. UTC | #1
On Tue, Jun 4, 2013 at 9:05 AM, Alan Modra <amodra@gmail.com> wrote:
> ppc64 SFmode constants in the TOC occupy the first word of a dword.
> For little-endian, we don't need to shift left.  Bootstrapped etc. and
> committed as obvious revision 199646.
>
>         * config/rs6000/rs6000.c (output_toc): Correct little-endian float
>         constant output.

Okay.

Thanks, David
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 199644)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -22574,7 +22574,10 @@  output_toc (FILE *file, rtx x, int labelno, enum m
 	    fputs (DOUBLE_INT_ASM_OP, file);
 	  else
 	    fprintf (file, "\t.tc FS_%lx[TC],", l & 0xffffffff);
-	  fprintf (file, "0x%lx00000000\n", l & 0xffffffff);
+	  if (WORDS_BIG_ENDIAN)
+	    fprintf (file, "0x%lx00000000\n", l & 0xffffffff);
+	  else
+	    fprintf (file, "0x%lx\n", l & 0xffffffff);
 	  return;
 	}
       else