Commit 989b3e72 by Richard Kenner

Add -mhimem to support linking above 0x20000000 boundary.

Fix meaning of BASE_REG_NEEDED.
(print_operand): Removed dead code.

From-SVN: r8560
parent 2d33065a
...@@ -451,21 +451,7 @@ print_operand (file, x, code) ...@@ -451,21 +451,7 @@ print_operand (file, x, code)
else if (GET_CODE (x) == MEM) else if (GET_CODE (x) == MEM)
{ {
rtx tmp = XEXP (x, 0); rtx tmp = XEXP (x, 0);
#if ! (defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC)) output_address (XEXP (x, 0));
if (GET_CODE (tmp) != CONST_INT)
{
char *out = XSTR (tmp, 0);
if (out[0] == '*')
{
PUT_ABSOLUTE_PREFIX (file);
fprintf (file, "%s", &out[1]);
}
else
ASM_OUTPUT_LABELREF (file, out);
}
else
#endif
output_address (XEXP (x, 0));
} }
else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode) else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) != VOIDmode)
{ {
...@@ -615,7 +601,7 @@ print_operand_address (file, addr) ...@@ -615,7 +601,7 @@ print_operand_address (file, addr)
rtx sym, off, tmp1; rtx sym, off, tmp1;
tmp1 = XEXP (tmp,0); tmp1 = XEXP (tmp,0);
if (GET_CODE (tmp1) != PLUS) if (GET_CODE (tmp1) != PLUS)
abort (); abort ();
sym = XEXP (tmp1,0); sym = XEXP (tmp1,0);
if (GET_CODE (sym) != SYMBOL_REF) if (GET_CODE (sym) != SYMBOL_REF)
...@@ -670,7 +656,7 @@ print_operand_address (file, addr) ...@@ -670,7 +656,7 @@ print_operand_address (file, addr)
if (base if (base
#ifndef INDEX_RATHER_THAN_BASE #ifndef INDEX_RATHER_THAN_BASE
&& flag_pic && (flag_pic || TARGET_HIMEM)
&& GET_CODE (base) != SYMBOL_REF && GET_CODE (base) != SYMBOL_REF
&& GET_CODE (offset) != CONST_INT && GET_CODE (offset) != CONST_INT
#else #else
...@@ -684,15 +670,15 @@ print_operand_address (file, addr) ...@@ -684,15 +670,15 @@ print_operand_address (file, addr)
} }
/* now, offset, base and indexexp are set */ /* now, offset, base and indexexp are set */
#ifndef BASE_REG_NEEDED
if (! base) if (! base)
{ {
#if defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC) #if defined (PC_RELATIVE) || defined (NO_ABSOLUTE_PREFIX_IF_SYMBOLIC)
if (GET_CODE (offset) == CONST_INT) if (GET_CODE (offset) == CONST_INT)
/* if (! (GET_CODE (offset) == LABEL_REF
|| GET_CODE (offset) == SYMBOL_REF)) */
#endif #endif
PUT_ABSOLUTE_PREFIX (file); PUT_ABSOLUTE_PREFIX (file);
} }
#endif
output_addr_const (file, offset); output_addr_const (file, offset);
if (base) /* base can be (REG ...) or (MEM ...) */ if (base) /* base can be (REG ...) or (MEM ...) */
...@@ -711,8 +697,8 @@ print_operand_address (file, addr) ...@@ -711,8 +697,8 @@ print_operand_address (file, addr)
fprintf (file, "(%s)", reg_names[REGNO (base)]); fprintf (file, "(%s)", reg_names[REGNO (base)]);
break; break;
case SYMBOL_REF: case SYMBOL_REF:
if (! flag_pic) if (! flag_pic)
abort (); abort ();
fprintf (file, "("); fprintf (file, "(");
output_addr_const (file, base); output_addr_const (file, base);
...@@ -766,45 +752,26 @@ print_operand_address (file, addr) ...@@ -766,45 +752,26 @@ print_operand_address (file, addr)
output_addr_const (file, offset); output_addr_const (file, offset);
if (base) if (base)
fprintf (file, "(%s)", reg_names[REGNO (base)]); fprintf (file, "(%s)", reg_names[REGNO (base)]);
#ifdef BASE_REG_NEEDED
else if (TARGET_SB) else if (TARGET_SB)
fprintf (file, "(sb)"); fprintf (file, "(sb)");
else else
abort (); abort ();
#endif
fprintf (file, ")"); fprintf (file, ")");
break; break;
default: default:
abort (); abort ();
} }
#ifdef PC_RELATIVE #ifdef PC_RELATIVE
else if (GET_CODE (offset) == LABEL_REF else if (GET_CODE (offset) != CONST_INT)
|| GET_CODE (offset) == SYMBOL_REF
|| GET_CODE (offset) == CONST
|| GET_CODE (offset) == PLUS)
fprintf (file, "(pc)"); fprintf (file, "(pc)");
#endif
#ifdef BASE_REG_NEEDED #ifdef BASE_REG_NEEDED
else else if (TARGET_SB)
{ fprintf (file, "(sb)");
/* Abs. addresses don't need a base (I think). */ else
if (GET_CODE (offset) != CONST_INT abort ();
#ifndef PC_RELATIVE
&& GET_CODE (offset) != LABEL_REF
&& GET_CODE (offset) != SYMBOL_REF
&& GET_CODE (offset) != CONST
&& GET_CODE (offset) != PLUS
#endif
)
{
if (TARGET_SB)
fprintf (file, "(sb)");
else
abort ();
}
}
#endif #endif
#endif /* PC_RELATIVE */
/* now print index if we have one */ /* now print index if we have one */
if (indexexp) if (indexexp)
{ {
......
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