diff options
author | dlindsay <dlindsay@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-17 15:09:47 +0000 |
---|---|---|
committer | dlindsay <dlindsay@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-17 15:09:47 +0000 |
commit | f0ecff584eea2b1cf0463c929409499270151192 (patch) | |
tree | 2dcfc57a63ac1ac16c4f9a4c78bb79ef0a1a5b64 /gcc/config/m68k/m68kelf.h | |
parent | f8104c54ba283ad91a55fac9c991ae6692972ebe (diff) |
h
Added -mpcrel flag, and underlying support for PC-relative addressing
on m68k. Patch is tested, and approved by Jim Wilson.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27576 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k/m68kelf.h')
-rw-r--r-- | gcc/config/m68k/m68kelf.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/m68k/m68kelf.h b/gcc/config/m68k/m68kelf.h index 476692db31d..88dfc3db9a2 100644 --- a/gcc/config/m68k/m68kelf.h +++ b/gcc/config/m68k/m68kelf.h @@ -246,9 +246,11 @@ extern int switch_table_difference_label_flag; /* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an operand of a function call. */ #undef LEGITIMATE_PIC_OPERAND_P -#define LEGITIMATE_PIC_OPERAND_P(X) \ - (! symbolic_operand (X, VOIDmode) \ - || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X))) + +#define LEGITIMATE_PIC_OPERAND_P(X) \ + (! symbolic_operand (X, VOIDmode) \ + || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X)) \ + || PCREL_GENERAL_OPERAND_OK) /* Turn off function cse if we are doing PIC. We always want function call to be done as `bsr foo@PLTPC', so it will force the assembler to create @@ -261,6 +263,8 @@ extern int switch_table_difference_label_flag; if (flag_pic) flag_no_function_cse = 1; \ if (! TARGET_68020 && flag_pic == 2) \ error("-fPIC is not currently supported on the 68000 or 68010\n"); \ + if (TARGET_PCREL && flag_pic == 0) \ + flag_pic = 1; \ } /* end of stuff from m68kv4.h */ |