Module Name: src Committed By: matt Date: Fri May 23 13:35:26 UTC 2014
Modified Files: src/external/gpl3/gcc/dist/gcc/config/vax: vax-protos.h vax.c vax.h Log Message: Add LEGITIMATE_PIC_OPERAND_P(X) to prevent global symbol + offset from being a legitimate pic operand (because it's not). To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/config/vax/vax.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h:1.1.1.2 src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h:1.2 --- src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h:1.1.1.2 Sat Mar 1 08:43:34 2014 +++ src/external/gpl3/gcc/dist/gcc/config/vax/vax-protos.h Fri May 23 13:35:26 2014 @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. <http://www.gnu.org/licenses/>. */ extern bool legitimate_constant_address_p (rtx); +extern bool legitimate_pic_operand_p (rtx); extern void vax_expand_prologue (void); #ifdef RTX_CODE Index: src/external/gpl3/gcc/dist/gcc/config/vax/vax.c diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.5 src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.6 --- src/external/gpl3/gcc/dist/gcc/config/vax/vax.c:1.5 Thu Mar 20 16:53:55 2014 +++ src/external/gpl3/gcc/dist/gcc/config/vax/vax.c Fri May 23 13:35:26 2014 @@ -572,6 +572,11 @@ print_operand (FILE *file, rtx x, int co sizeof (dstr), 0, 1); fprintf (file, "$0%c%s", ASM_DOUBLE_CHAR, dstr); } + else if (GET_CODE (x) == SUBREG) + { + debug_rtx (x); + output_operand_lossage ("SUBREG operand"); + } else { if (flag_pic > 1 && symbolic_operand (x, SImode)) @@ -1777,6 +1782,19 @@ legitimate_constant_address_p (rtx x) return true; } +bool +legitimate_pic_operand_p (rtx x) +{ +#ifdef NO_EXTERNAL_INDIRECT_ADDRESS + if (GET_CODE (x) != CONST) + return true; + if (GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF + && !SYMBOL_REF_LOCAL_P (XEXP (XEXP (x, 0), 0))) + return false; +#endif + return true; +} + /* The other macros defined here are used only in legitimate_address_p (). */ /* Nonzero if X is a hard reg that can be used as an index Index: src/external/gpl3/gcc/dist/gcc/config/vax/vax.h diff -u src/external/gpl3/gcc/dist/gcc/config/vax/vax.h:1.2 src/external/gpl3/gcc/dist/gcc/config/vax/vax.h:1.3 --- src/external/gpl3/gcc/dist/gcc/config/vax/vax.h:1.2 Thu Mar 20 16:53:55 2014 +++ src/external/gpl3/gcc/dist/gcc/config/vax/vax.h Fri May 23 13:35:26 2014 @@ -373,6 +373,10 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_ RETURN_ADDRESS_OFFSET)) \ : (rtx) 0) +/* A C expression that is nonzero if X is a legitimate immediate operand + on the target machine when generating position independent code. */ + +#define LEGITIMATE_PIC_OPERAND_P(X) legitimate_pic_operand_p (X) /* Addressing modes, and classification of registers for them. */