OSDN Git Service

* pa.md (MAX_12BIT_OFFSET, MAX_17BIT_OFFSET): Define and use new
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Apr 2006 18:29:16 +0000 (18:29 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Apr 2006 18:29:16 +0000 (18:29 +0000)
symbolic constants in branch patterns.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112864 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/pa/pa.md

index eb23497..b03e660 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-11  John David Anglin  <dava.anglin@nrc-cnrc.gc.ca>
+
+       * pa.md (MAX_12BIT_OFFSET, MAX_17BIT_OFFSET): Define and use new
+       symbolic constants in branch patterns.
+
 2006-04-11  Roger Sayle  <roger@eyesopen.com>
 
        * caller-save.c: #include "addresses.h" after #include "tm_p.h".
index e8acd9a..0853bb8 100644 (file)
@@ -1,6 +1,6 @@
 ;;- Machine description for HP PA-RISC architecture for GCC compiler
 ;;   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-;;   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;;   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 ;;   Contributed by the Center for Software Science at the University
 ;;   of Utah.
 
    (UNSPECV_LONGJMP    5)      ; builtin_longjmp
   ])
 
+;; Maximum pc-relative branch offsets.
+
+;; These numbers are a bit smaller than the maximum allowable offsets
+;; so that a few instructions may be inserted before the actual branch.
+
+(define_constants
+  [(MAX_12BIT_OFFSET     8184) ; 12-bit branch
+   (MAX_17BIT_OFFSET   262100) ; 17-bit branch
+  ])
+
 ;; Insn type.  Used to default other attribute values.
 
 ;; type "unary" insns have one input operand (1) and one output operand (0)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "cbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
 [(set_attr "type" "fbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 32)
 [(set_attr "type" "fbranch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 12)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 28)
     (cond [(eq (symbol_ref "jump_in_call_delay (insn)") (const_int 1))
           (if_then_else (lt (abs (minus (match_dup 0)
                                         (plus (pc) (const_int 8))))
-                            (const_int 8184))
+                            (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (const_int 8))
           (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 4)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 20)
@@ -9007,10 +9017,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Short branch has length of 4
 ;; Long branch has length of 8, 20, 24 or 28
        (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9023,10 +9033,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
        (if_then_else (eq_attr "alternative" "1")
          (if_then_else (lt (match_dup 3) (pc))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 24))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 24)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 24))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 28)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 44)
@@ -9034,10 +9044,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
                    (const_int 40)]
                  (const_int 48))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 24)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 28)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 44)
@@ -9049,10 +9059,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Extra goo to deal with additional reload insns.
        (if_then_else (lt (match_dup 3) (pc))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9060,10 +9070,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
                    (const_int 28)]
                  (const_int 36))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9090,10 +9100,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Short branch has length of 4
 ;; Long branch has length of 8, 20, 24 or 28
         (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9106,10 +9116,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
        (if_then_else (eq_attr "alternative" "1")
          (if_then_else (lt (match_dup 3) (pc))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9117,10 +9127,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
                    (const_int 28)]
                  (const_int 36))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9131,10 +9141,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Loop counter in memory or sar case.
 ;; Extra goo to deal with additional reload insns.
        (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                  (const_int 8184))
+                  (const_int MAX_12BIT_OFFSET))
                (const_int 8)
                (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                 (const_int 262100))
+                 (const_int MAX_17BIT_OFFSET))
                (const_int 12)
                (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                (const_int 28)
@@ -9162,10 +9172,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Short branch has length of 4
 ;; Long branch has length of 8
         (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9178,10 +9188,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
        (if_then_else (eq_attr "alternative" "1")
          (if_then_else (lt (match_dup 3) (pc))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9189,10 +9199,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
                    (const_int 28)]
                  (const_int 36))
             (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 8184))
+                     (const_int MAX_12BIT_OFFSET))
                    (const_int 12)
                    (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                     (const_int 262100))
+                     (const_int MAX_17BIT_OFFSET))
                    (const_int 16)
                    (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                    (const_int 32)
@@ -9203,10 +9213,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 ;; Loop counter in memory or SAR case.
 ;; Extra goo to deal with additional reload insns.
        (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                  (const_int 8184))
+                  (const_int MAX_12BIT_OFFSET))
                (const_int 8)
                (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-                 (const_int 262100))
+                 (const_int MAX_17BIT_OFFSET))
                (const_int 12)
                (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
                (const_int 28)
@@ -9227,10 +9237,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 [(set_attr "type" "parallel_branch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9250,10 +9260,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 [(set_attr "type" "parallel_branch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9273,10 +9283,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 [(set_attr "type" "parallel_branch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9296,10 +9306,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 [(set_attr "type" "parallel_branch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)
@@ -9319,10 +9329,10 @@ add,l %2,%3,%3\;bv,n %%r0(%3)"
 [(set_attr "type" "parallel_branch")
  (set (attr "length")
     (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 8184))
+              (const_int MAX_12BIT_OFFSET))
           (const_int 4)
           (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
-              (const_int 262100))
+              (const_int MAX_17BIT_OFFSET))
           (const_int 8)
           (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
           (const_int 24)