summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/sysv4.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-15 20:12:18 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-15 20:12:18 +0000
commitcac0aa5ae50ff1c27722586c2febc15e44b9752e (patch)
treea84df7bde0c5ff1655a8977c33d2322032e68bcf /gcc/config/rs6000/sysv4.h
parentc6445d04c290fc50703fafd19f3c608cb91bc29c (diff)
downloadgcc-cac0aa5ae50ff1c27722586c2febc15e44b9752e.tar.gz
PR target/41175
PR target/40677 * config/rs6000/rs6000.c (no_global_regs_above): Fix precedence problem. (SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): New strategy bits. (rs6000_savres_strategy): Always save FP registers inline if the target doesn't support hardware double-precision. Set the above bits in return value when needed. (rs6000_savres_routine_sym): Fix computation for cache selector. Mark the generated symbol as a function. Rename exitp argument to lr. Move code for determining the name of the symbol... (rs6000_savres_routine_name): ...here. New function. Add cases for getting the names right on AIX and 64-bit Linux. (savres_routine_name): New variable. (rs6000_make_savres_rtx): Rename exitp argument to lr. Don't assert lr isn't set when savep. Use r12 resp. r1 instead of r11 depending on what the target routine uses as a base register. If savep && lr describe saving of r0 into memory slot. (rs6000_emit_prologue): Correct use of call_used_regs. Fix out of line calls for AIX ABI. (rs6000_output_function_prologue): Use rs6000_savres_routine_name to determine FP save/restore functions. (rs6000_emit_stack_reset): Handle savres if sp_offset != 0 and frame_reg_rtx != sp_reg_rtx. Use gen_add3_insn instead of gen_addsi3. (rs6000_emit_epilogue): Adjust computation of restore_lr. Duplicate restoration of LR and execute the appropriate one depending on whether GPRs are being restored inline. Set r11 from offsetted frame_reg_rtx instead of sp_reg_rtx; if frame_reg_rtx is r11, adjust sp_offset. Use gen_add3_insn instead of gen_addsi3. Fix out of line calls for AIX ABI. * config/rs6000/rs6000.md (*return_and_restore_fpregs_aix_<mode>): New insn. * config/rs6000/spe.md (*save_gpregs_spe): Use explicit match for register 11. (*restore_gpregs_spe): Likewise. (*return_and_restore_gpregs_spe): Likewise. * config/rs6000/linux64.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX): Define to empty string unconditionally. * config/rs6000/sysv4.h (SAVE_FP_SUFFIX, RESTORE_FP_SUFFIX): Define to empty string unconditionally. (GP_SAVE_INLINE, FP_SAVE_INLINE): Handle TARGET_64BIT the same as !TARGET_64BIT. * gcc.target/powerpc/pr41175.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/sysv4.h')
-rw-r--r--gcc/config/rs6000/sysv4.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 4d28e375363..5377b474da5 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -272,27 +272,25 @@ do { \
#endif
/* Define cutoff for using external functions to save floating point.
- Currently on 64-bit V.4, always use inline stores. When optimizing
- for size on 32-bit targets, use external functions when
- profitable. */
-#define FP_SAVE_INLINE(FIRST_REG) (optimize_size && !TARGET_64BIT \
+ When optimizing for size, use external functions when profitable. */
+#define FP_SAVE_INLINE(FIRST_REG) (optimize_size \
? ((FIRST_REG) == 62 \
|| (FIRST_REG) == 63) \
: (FIRST_REG) < 64)
/* And similarly for general purpose registers. */
#define GP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 32 \
- && (TARGET_64BIT || !optimize_size))
+ && !optimize_size)
/* Put jump tables in read-only memory, rather than in .text. */
#define JUMP_TABLES_IN_TEXT_SECTION 0
/* Prefix and suffix to use to saving floating point. */
#define SAVE_FP_PREFIX "_savefpr_"
-#define SAVE_FP_SUFFIX (TARGET_64BIT ? "_l" : "")
+#define SAVE_FP_SUFFIX ""
/* Prefix and suffix to use to restoring floating point. */
#define RESTORE_FP_PREFIX "_restfpr_"
-#define RESTORE_FP_SUFFIX (TARGET_64BIT ? "_l" : "")
+#define RESTORE_FP_SUFFIX ""
/* Type used for ptrdiff_t, as a string used in a declaration. */
#define PTRDIFF_TYPE "int"