Commit 44e57700 by Richard Stallman

*** empty log message ***

From-SVN: r1386
parent 5d55ba75
...@@ -209,14 +209,26 @@ half_pic_encode (decl) ...@@ -209,14 +209,26 @@ half_pic_encode (decl)
if (code != VAR_DECL && code != FUNCTION_DECL) if (code != VAR_DECL && code != FUNCTION_DECL)
return; return;
/* If this is not an external reference, it can't be half-pic. */
if (!TREE_EXTERNAL (decl))
return;
asm_name = DECL_ASSEMBLER_NAME (decl); asm_name = DECL_ASSEMBLER_NAME (decl);
if (!asm_name) if (!asm_name)
return; return;
#ifdef HALF_PIC_DEBUG
if (HALF_PIC_DEBUG)
{
if (HALF_PIC_DEBUG)
fprintf (stderr, "\n========== Half_pic_encode %.*s\n",
IDENTIFIER_LENGTH (asm_name),
IDENTIFIER_POINTER (asm_name));
debug_tree (decl);
}
#endif
/* If this is not an external reference, it can't be half-pic. */
if (!TREE_EXTERNAL (decl) && (code != VAR_DECL || !TREE_PUBLIC (decl)))
return;
ptr = half_pic_hash (IDENTIFIER_POINTER (asm_name), ptr = half_pic_hash (IDENTIFIER_POINTER (asm_name),
IDENTIFIER_LENGTH (asm_name), IDENTIFIER_LENGTH (asm_name),
TRUE); TRUE);
...@@ -225,7 +237,7 @@ half_pic_encode (decl) ...@@ -225,7 +237,7 @@ half_pic_encode (decl)
#ifdef HALF_PIC_DEBUG #ifdef HALF_PIC_DEBUG
if (HALF_PIC_DEBUG) if (HALF_PIC_DEBUG)
fprintf (stderr, "\n========== Half_pic_encode %.*s\n", fprintf (stderr, "\n%.*s is half-pic\n",
IDENTIFIER_LENGTH (asm_name), IDENTIFIER_LENGTH (asm_name),
IDENTIFIER_POINTER (asm_name)); IDENTIFIER_POINTER (asm_name));
#endif #endif
...@@ -277,7 +289,7 @@ half_pic_address_p (addr) ...@@ -277,7 +289,7 @@ half_pic_address_p (addr)
case CONST: case CONST:
{ {
rtx offset = const0_rtx; rtx offset = const0_rtx;
addr = eliminate_constant_term (addr, &offset); addr = eliminate_constant_term (XEXP (addr, 0), &offset);
if (GET_CODE (addr) != SYMBOL_REF) if (GET_CODE (addr) != SYMBOL_REF)
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment