2012-06-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* config/pa/pa.h (MAX_PCREL17F_OFFSET): Define.
* config/pa/pa.c (pa_attr_length_millicode_call): Use
MAX_PCREL17F_OFFSET instead of fixed offset.
(pa_attr_length_call): Likewise.
(pa_attr_length_indirect_call): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188697
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-06-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ Backport from mainline:
+ 2012-06-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * config/pa/pa.h (MAX_PCREL17F_OFFSET): Define.
+ * config/pa/pa.c (pa_attr_length_millicode_call): Use
+ MAX_PCREL17F_OFFSET instead of fixed offset.
+ (pa_attr_length_call): Likewise.
+ (pa_attr_length_indirect_call): Likewise.
+
2012-06-15 Walter Lee <walt@tilera.com>
Backport from mainline:
return 24;
else
{
- if (!TARGET_LONG_CALLS && distance < 240000)
+ if (!TARGET_LONG_CALLS && distance < MAX_PCREL17F_OFFSET)
return 8;
if (TARGET_LONG_ABS_CALL && !flag_pic)
/* pc-relative branch. */
if (!TARGET_LONG_CALLS
&& ((TARGET_PA_20 && !sibcall && distance < 7600000)
- || distance < 240000))
+ || distance < MAX_PCREL17F_OFFSET))
length += 8;
/* 64-bit plabel sequence. */
if (TARGET_FAST_INDIRECT_CALLS
|| (!TARGET_PORTABLE_RUNTIME
&& ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000)
- || distance < 240000)))
+ || distance < MAX_PCREL17F_OFFSET)))
return 8;
if (flag_pic)
#undef TARGET_HAVE_TLS
#define TARGET_HAVE_TLS true
#endif
+
+/* The maximum offset in bytes for a PA 1.X pc-relative call to the
+ head of the preceding stub table. The selected offsets have been
+ chosen so that approximately one call stub is allocated for every
+ 86.7 instructions. A long branch stub is two instructions when
+ not generating PIC code. For HP-UX and ELF targets, PIC stubs are
+ seven and four instructions, respectively. */
+#define MAX_PCREL17F_OFFSET \
+ (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)