mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
(load_expression): Parenthesize operations in range checking, to avoid
precedence questions. (addr32): New static variable. (md_parse_option): Set it for "-32addr". (load_symbol_address): If addr32 is set, use ldl instead of ldq.
This commit is contained in:
@ -87,6 +87,12 @@ unsigned long alpha_gprmask, alpha_fprmask;
|
|||||||
/* Used for LITUSE relocations. */
|
/* Used for LITUSE relocations. */
|
||||||
static expressionS lituse_basereg, lituse_byteoff, lituse_jsr;
|
static expressionS lituse_basereg, lituse_byteoff, lituse_jsr;
|
||||||
|
|
||||||
|
/* Address size: In OSF/1 1.3, an undocumented "-32addr" option will
|
||||||
|
cause all addresses to be treated as 32-bit values in memory. (The
|
||||||
|
in-register versions are all sign-extended to 64 bits, of course.)
|
||||||
|
Some other systems may want this option too. */
|
||||||
|
static int addr32;
|
||||||
|
|
||||||
/* Imported functions -- they should be defined in header files somewhere. */
|
/* Imported functions -- they should be defined in header files somewhere. */
|
||||||
extern segT subseg_get ();
|
extern segT subseg_get ();
|
||||||
extern PTR bfd_alloc_by_size_t ();
|
extern PTR bfd_alloc_by_size_t ();
|
||||||
@ -713,6 +719,12 @@ load_symbol_address (reg, insn)
|
|||||||
/* Overflow? */
|
/* Overflow? */
|
||||||
as_fatal ("overflow in literal (.lita) table");
|
as_fatal ("overflow in literal (.lita) table");
|
||||||
x = retval;
|
x = retval;
|
||||||
|
if (addr32)
|
||||||
|
insn->opcode = (0xa0000000 /* ldl */
|
||||||
|
| (reg << SA)
|
||||||
|
| (base_register << SB)
|
||||||
|
| (x & 0xffff));
|
||||||
|
else
|
||||||
insn->opcode = (0xa4000000 /* ldq */
|
insn->opcode = (0xa4000000 /* ldq */
|
||||||
| (reg << SA)
|
| (reg << SA)
|
||||||
| (base_register << SB)
|
| (base_register << SB)
|
||||||
@ -748,7 +760,7 @@ load_expression (reg, insn)
|
|||||||
num_insns++;
|
num_insns++;
|
||||||
{
|
{
|
||||||
valueT x = addend;
|
valueT x = addend;
|
||||||
if (x & ~0x7fff != 0
|
if ((x & ~0x7fff) != 0
|
||||||
&& (x & ~0x7fff) + 0x8000 != 0)
|
&& (x & ~0x7fff) + 0x8000 != 0)
|
||||||
{
|
{
|
||||||
as_bad ("assembler not prepared to handle constants >16 bits yet");
|
as_bad ("assembler not prepared to handle constants >16 bits yet");
|
||||||
@ -1612,6 +1624,12 @@ md_parse_option (argP, cntP, vecP)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (!strcmp (*argP, "32addr"))
|
||||||
|
{
|
||||||
|
addr32 = 1;
|
||||||
|
*argP += 6;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (!strcmp (*argP, "nocpp"))
|
if (!strcmp (*argP, "nocpp"))
|
||||||
{
|
{
|
||||||
*argP += 5;
|
*argP += 5;
|
||||||
|
Reference in New Issue
Block a user