Ensure sum from SDA is 16-bit
From-SVN: r18631
This commit is contained in:
parent
e29ef9202e
commit
dbf55e5349
2 changed files with 16 additions and 1 deletions
|
@ -3,6 +3,10 @@ Mon Mar 16 15:57:17 1998 Michael Meissner <meissner@cygnus.com>
|
|||
* gcc.c (default_arg): Don't wander off the end of allocated
|
||||
memory.
|
||||
|
||||
(From Geoffrey Keating <geoffk@ozemail.com.au>)
|
||||
* rs6000.c (small_data_operand): Ensure that any address
|
||||
referenced relative to the small data area is inside the SDA.
|
||||
|
||||
Mon Mar 16 12:55:15 1998 Jim Wilson <wilson@cygnus.com>
|
||||
|
||||
* config/m68k/netbsd.h (ASM_SPEC): Add %{m68060}.
|
||||
|
|
|
@ -1080,7 +1080,18 @@ small_data_operand (op, mode)
|
|||
return 0;
|
||||
|
||||
else
|
||||
sym_ref = XEXP (XEXP (op, 0), 0);
|
||||
{
|
||||
rtx sum = XEXP (op, 0);
|
||||
HOST_WIDE_INT summand;
|
||||
|
||||
/* We have to be careful here, because it is the referenced address
|
||||
that must be 32k from _SDA_BASE_, not just the symbol. */
|
||||
summand = INTVAL (XEXP (sum, 1));
|
||||
if (summand < 0 || summand > g_switch_value)
|
||||
return 0;
|
||||
|
||||
sym_ref = XEXP (sum, 0);
|
||||
}
|
||||
|
||||
if (*XSTR (sym_ref, 0) != '@')
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue