summaryrefslogtreecommitdiff
path: root/gcc/config/pa/pa-linux.h
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-31 03:13:44 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-31 03:13:44 +0000
commitece8882131d54884edc90a37d43a8588fab2c7a3 (patch)
treef47286e288d980615f8a9fbf886fb3a2f0dffa4e /gcc/config/pa/pa-linux.h
parent981a251cec2130deed33ce9eac028501a47343c7 (diff)
downloadgcc-ece8882131d54884edc90a37d43a8588fab2c7a3.tar.gz
* pa-linux.h (ASM_OUTPUT_EXTERNAL_LIBCALL): Define.
* pa-protos.h (attr_length_millicode_call, attr_length_call, pa_init_machine_status): Declare new global functions. * pa.c (void copy_fp_args, length_fp_args, get_plabel): Declare and implement new functions. (attr_length_millicode_call, attr_length_call): Implement. (total_code_bytes): Change type to long. (pa_output_function_prologue): Compute total_code_bytes on TARGET_64BIT. Reset counter if flag_function_sections. (output_deferred_plabels): Set output alignment to 3 for TARGET_64BIT. (output_cbranch): Move call to gen_label_rtx. (output_millicode_call): Rewrite adding long TARGET_64BIT call, expose delay slot in all variants, shorten pc-relative calls. (output_call): Rewrite adding long TARGET_64BIT call, improved delay slot usage and exposure, various new call variants, and shortened sequences for some variants on TARGET_PA_20. Miscellaneous format changes. * pa.h (total_code_bytes): Change type to long. (MASK_LONG_CALLS, TARGET_LONG_CALLS, TARGET_LONG_ABS_CALL, TARGET_LONG_PIC_SDIFF_CALL, TARGET_LONG_PIC_PCREL_CALL): Define. (TARGET_SWITCHES): Add "-mlong-calls" and "-mno-long-calls" options. (EXTRA_CONSTRAINT, GO_IF_LEGITIMATE_ADDRESS, LEGITIMIZE_RELOAD_ADDRESS): Don't use long floating point loads and stores on TARGET_ELF32. *pa.md (define_delay): Allow insns in delay on TARGET_PORTABLE_RUNTIME. (unnamed patterns for mulsi3, divsi3, udivsi3, modsi3, umodsi3 and canonicalize_funcptr_for_compare expanders): Calculate attribute length attr_length_millicode_call(). (call_internal_symref, call_value_internal_symref): Clobber register 1. Calculate attribute length using attr_length_call(). (call_internal_reg_64bit, call_value_internal_reg_64bit): Move gp load to delay slot. (sibcall, sibcall_value): Rewrite. (sibcall_internal_symref, sibcall_value_internal_symref): Clobber register 1. Use attr_length_call(). (sibcall_internal_symref_64bit, sibcall_value_internal_symref_64bit): New patterns. (unamed pattern for canonicalize_funcptr_for_compare): Rewrite. * som.h (MEMBER_TYPE_FORCES_BLK): Define. * t-pa64 (TARGET_LIBGCC2_CFLAGS): Add "-mlong-calls". * doc/invoke.texi (mlong-calls): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa/pa-linux.h')
-rw-r--r--gcc/config/pa/pa-linux.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h
index cdc201d5f59..7f372faa8d3 100644
--- a/gcc/config/pa/pa-linux.h
+++ b/gcc/config/pa/pa-linux.h
@@ -196,6 +196,19 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
+/* As well as globalizing the label, we need to encode the label
+ to ensure a plabel is generated in an indirect call. */
+
+#undef ASM_OUTPUT_EXTERNAL_LIBCALL
+#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
+ do \
+ { \
+ if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
+ hppa_encode_label (FUN); \
+ (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
+ } \
+ while (0)
+
/* Linux always uses gas. */
#undef TARGET_GAS
#define TARGET_GAS 1