diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-09 03:15:56 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-09 03:15:56 +0000 |
commit | a7f32c2d3230637c5b84d23856d210a39b1aa3ba (patch) | |
tree | 400944d2621fe7713aa8157ecec43db3d5e7860b | |
parent | 8cc2e82455f265d2664f4aa786e85bce34195919 (diff) | |
download | gcc-a7f32c2d3230637c5b84d23856d210a39b1aa3ba.tar.gz |
* config/rs6000/rs6000.c (output_toc): Allow 32-bit targets to
handle DImode constants. Use one TOC entry for SImode and smaller
constants, aligned properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39557 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 34 |
2 files changed, 33 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d2562aa40bc..654d2223db1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-02-05 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/rs6000.c (output_toc): Allow 32-bit targets to + handle DImode constants. Use one TOC entry for SImode and smaller + constants, aligned properly. + 2001-02-08 Jason Merrill <jason@redhat.com> * config/arm/arm.c (arm_expand_prologue): Do tell the dwarf2 backend diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d64d7772289..2640c60c120 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1783,6 +1783,7 @@ rs6000_emit_move (dest, source, mode) XEXP (operands[1], 0)); emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1])); + return; } /* Initialize a variable CUM of type CUMULATIVE_ARGS @@ -6910,10 +6911,15 @@ output_toc (file, x, labelno, mode) integer constants in the TOC we have to pad them. (This is still a win over putting the constants in a separate constant pool, because then we'd have - to have both a TOC entry _and_ the actual constant.) */ - if (POINTER_SIZE < GET_MODE_BITSIZE (mode)) + to have both a TOC entry _and_ the actual constant.) + + For a 32-bit target, CONST_INT values are loaded and shifted + entirely within `low' and can be stored in one TOC entry. */ + + if (TARGET_64BIT && POINTER_SIZE < GET_MODE_BITSIZE (mode)) abort ();/* It would be easy to make this work, but it doesn't now. */ - if (mode != Pmode) + + if (POINTER_SIZE > GET_MODE_BITSIZE (mode)) lshift_double (low, high, POINTER_SIZE - GET_MODE_BITSIZE (mode), POINTER_SIZE, &low, &high, 0); @@ -6928,12 +6934,24 @@ output_toc (file, x, labelno, mode) } else { - if (TARGET_MINIMAL_TOC) - fprintf (file, "\t.long 0x%lx\n\t.long 0x%lx\n", - (long)high, (long)low); + if (POINTER_SIZE < GET_MODE_BITSIZE (mode)) + { + if (TARGET_MINIMAL_TOC) + fprintf (file, "\t.long 0x%lx\n\t.long 0x%lx\n", + (long)high, (long)low); + else + fprintf (file, "\t.tc ID_%lx_%lx[TC],0x%lx,0x%lx\n", + (long)high, (long)low, (long)high, (long)low); + } else - fprintf (file, "\t.tc ID_%lx_%lx[TC],0x%lx,0x%lx\n", - (long)high, (long)low, (long)high, (long)low); + { + if (TARGET_MINIMAL_TOC) + fprintf (file, "\t.long 0x%lx\n", + (long)low); + else + fprintf (file, "\t.tc IS_%lx[TC],0x%lx\n", + (long)low, (long)low); + } return; } } |