diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-04-07 14:32:04 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@redhat.com> | 2003-04-07 14:32:04 +0000 |
commit | 4377418b58129d9b9fc9f72fe831b6acba153728 (patch) | |
tree | 546c9d65390c50643244c13b38c0815027621549 | |
parent | 6fea3a7136fcb15b8d0ad9e19a5dd9d8a9c9f98f (diff) |
* config/mips/mips.c (mips_classify_symbol): Add catch-all case formips-3_4-rewrite-branch
handling local labels when TARGET_ABICALLS.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/mips-3_4-rewrite-branch@65331 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.rewrite | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog.rewrite b/gcc/ChangeLog.rewrite index 63c51d44bd6..685354c1c58 100644 --- a/gcc/ChangeLog.rewrite +++ b/gcc/ChangeLog.rewrite @@ -1,3 +1,8 @@ +2003-04-07 Richard Sandiford <rsandifo@redhat.com> + + * config/mips/mips.c (mips_classify_symbol): Add catch-all case for + handling local labels when TARGET_ABICALLS. + 2003-04-04 Richard Sandiford <rsandifo@redhat.com> * config/mips/mips-protos.h (mips_expand_epilogue): Add an diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index f923ef44ca5..d94604e00d8 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -919,14 +919,19 @@ mips_classify_symbol (x) return SYMBOL_GENERAL; } - /* SYMBOL_REF_FLAG is overloaded for mips16 code: it can indicate a - string constant or a GP-relative access. Check for strings here. */ - if (TARGET_MIPS16 - && SYMBOL_REF_FLAG (x) - && XSTR (x, 0)[0] == '*' + if (XSTR (x, 0)[0] == '*' && strncmp (XSTR (x, 0) + 1, LOCAL_LABEL_PREFIX, sizeof LOCAL_LABEL_PREFIX - 1) == 0) - return SYMBOL_CONSTANT_POOL; + { + /* The symbol is a local label. For TARGET_MIPS16, SYMBOL_REF_FLAG + will be set if the symbol refers to a string in the current + function's constant pool. */ + if (TARGET_MIPS16 && SYMBOL_REF_FLAG (x)) + return SYMBOL_CONSTANT_POOL; + + if (TARGET_ABICALLS) + return SYMBOL_GOT_LOCAL; + } if (TARGET_ABICALLS) return (SYMBOL_REF_FLAG (x) ? SYMBOL_GOT_LOCAL : SYMBOL_GOT_GLOBAL); |