From: Jeff Law Date: Wed, 14 Aug 1996 22:17:25 +0000 (-0600) Subject: pa.c (override_options): Treat TARGET_FAST_INDIRECT_CALLS just like TARGET_NO_SPACE_REGS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3aba034bf009e4590f14aa2c00a1107dd229e391;p=gcc.git pa.c (override_options): Treat TARGET_FAST_INDIRECT_CALLS just like TARGET_NO_SPACE_REGS. * pa/pa.c (override_options): Treat TARGET_FAST_INDIRECT_CALLS just like TARGET_NO_SPACE_REGS. (output_millicode_call): Likewise. * pa/pa.h (TARGET_FAST_INDIRECT_CALLS): Define. (TARGET_SWITCHES): Add "fast-indirect-calls". * pa/pa.md: Treat TARGET_FAST_INDIRECT_CALLS just like TARGET_NO_SPACE_REGS in various call/millicode call patterns. From-SVN: r12640 --- diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 861efb32580..8adf58625f0 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -116,7 +116,7 @@ override_options () warning ("PIC code generation is not supported in the portable runtime model\n"); } - if (flag_pic && TARGET_NO_SPACE_REGS) + if (flag_pic && (TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS)) { warning ("PIC code generation is not compatable with fast indirect calls\n"); } @@ -4550,7 +4550,7 @@ output_millicode_call (insn, call_dest) /* If we're allowed to use be/ble instructions, then this is the best sequence to use for a long millicode call. */ - if (TARGET_NO_SPACE_REGS + if (TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS || ! (flag_pic || TARGET_PORTABLE_RUNTIME)) { xoperands[0] = call_dest; diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 81ea53a62e7..f76468eef29 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -109,6 +109,9 @@ extern int target_flags; in shared libraries on hpux10. */ #define TARGET_LONG_LOAD_STORE (target_flags & 512) +/* Use a faster sequence for indirect calls. */ +#define TARGET_FAST_INDIRECT_CALLS (target_flags & 1024) + /* Macro to define tables used to set the flags. This is a list in braces of pairs in braces, each pair being { "NAME", VALUE } @@ -138,6 +141,8 @@ extern int target_flags; {"no-soft-float", -256}, \ {"long-load-store", 512}, \ {"no-long-load-store", -512},\ + {"fast-indirect-calls", 1024},\ + {"no-fast-indirect-calls", -1024},\ {"linker-opt", 0}, \ { "", TARGET_DEFAULT | TARGET_CPU_DEFAULT}} diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 2890be1ece4..7a2dd8f1655 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -3123,7 +3123,7 @@ (const_int 4) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -3177,7 +3177,7 @@ (const_int 4) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -3230,7 +3230,7 @@ (const_int 4) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -3280,7 +3280,7 @@ (const_int 4) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -3330,7 +3330,7 @@ (const_int 4) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -4145,7 +4145,7 @@ rtx xoperands[2]; /* First the special case for kernels, level 0 systems, etc. */ - if (TARGET_NO_SPACE_REGS) + if (TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS) return \"ble 0(%%sr4,%%r22)\;copy %%r31,%%r2\"; /* Now the normal case -- we can reach $$dyncall directly or @@ -4181,7 +4181,7 @@ (set (attr "length") (cond [ ;; First NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -4305,7 +4305,7 @@ rtx xoperands[2]; /* First the special case for kernels, level 0 systems, etc. */ - if (TARGET_NO_SPACE_REGS) + if (TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS) return \"ble 0(%%sr4,%%r22)\;copy %%r31,%%r2\"; /* Now the normal case -- we can reach $$dyncall directly or @@ -4341,7 +4341,7 @@ (set (attr "length") (cond [ ;; First NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 8) @@ -5214,7 +5214,7 @@ (const_int 28) ;; NO_SPACE_REGS - (ne (symbol_ref "TARGET_NO_SPACE_REGS") + (ne (symbol_ref "TARGET_NO_SPACE_REGS || TARGET_FAST_INDIRECT_CALLS") (const_int 0)) (const_int 32)