pa.c (override_options): Treat TARGET_FAST_INDIRECT_CALLS just like TARGET_NO_SPACE_REGS.
authorJeff Law <law@gcc.gnu.org>
Wed, 14 Aug 1996 22:17:25 +0000 (16:17 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 14 Aug 1996 22:17:25 +0000 (16:17 -0600)
        * 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

gcc/config/pa/pa.c
gcc/config/pa/pa.h
gcc/config/pa/pa.md

index 861efb32580d3ae7f4a2687685058f3665b6afd8..8adf58625f017fccde7f68fbb02cdd47840d62a1 100644 (file)
@@ -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;
index 81ea53a62e7acfb049d10b39444eb131cd792eb0..f76468eef29aecbe71d1a93352ad47c7bd342970 100644 (file)
@@ -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}}
 
index 2890be1ece410ac07ef4486a1fdf6c97fce65d6d..7a2dd8f1655ef6853019ec62db4f2630799b191a 100644 (file)
             (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)
 
             (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)
 
             (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)
 
             (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)
 
             (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)
 
   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
    (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)
 
   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
    (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)
 
             (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)