mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
[gas/]
* config/tc-mips.c (mips_ip): Don't work out the value of constant %hi()s here. [gas/testsuite/] * gas/mips/elf-consthilo.[sd]: New test. * gas/mips/mips.exp: Run it.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2002-08-12 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* config/tc-mips.c (mips_ip): Don't work out the value of
|
||||||
|
constant %hi()s here.
|
||||||
|
|
||||||
2002-08-10 Alan Modra <amodra@bigpond.net.au>
|
2002-08-10 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR
|
* config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR
|
||||||
|
@ -8525,9 +8525,11 @@ mips_ip (str, ip)
|
|||||||
{
|
{
|
||||||
if (c != S_EX_LO)
|
if (c != S_EX_LO)
|
||||||
{
|
{
|
||||||
if (imm_expr.X_op == O_constant)
|
if (c == S_EX_HI)
|
||||||
imm_expr.X_add_number =
|
{
|
||||||
(imm_expr.X_add_number >> 16) & 0xffff;
|
*imm_reloc = BFD_RELOC_HI16_S;
|
||||||
|
imm_unmatched_hi = true;
|
||||||
|
}
|
||||||
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
||||||
else if (c == S_EX_HIGHEST)
|
else if (c == S_EX_HIGHEST)
|
||||||
*imm_reloc = BFD_RELOC_MIPS_HIGHEST;
|
*imm_reloc = BFD_RELOC_MIPS_HIGHEST;
|
||||||
@ -8553,11 +8555,6 @@ mips_ip (str, ip)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (c == S_EX_HI)
|
|
||||||
{
|
|
||||||
*imm_reloc = BFD_RELOC_HI16_S;
|
|
||||||
imm_unmatched_hi = true;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
*imm_reloc = BFD_RELOC_HI16;
|
*imm_reloc = BFD_RELOC_HI16;
|
||||||
}
|
}
|
||||||
@ -8658,10 +8655,7 @@ mips_ip (str, ip)
|
|||||||
{
|
{
|
||||||
if (c != S_EX_LO)
|
if (c != S_EX_LO)
|
||||||
{
|
{
|
||||||
if (imm_expr.X_op == O_constant)
|
if (c == S_EX_HI)
|
||||||
imm_expr.X_add_number =
|
|
||||||
(imm_expr.X_add_number >> 16) & 0xffff;
|
|
||||||
else if (c == S_EX_HI)
|
|
||||||
{
|
{
|
||||||
*imm_reloc = BFD_RELOC_HI16_S;
|
*imm_reloc = BFD_RELOC_HI16_S;
|
||||||
imm_unmatched_hi = true;
|
imm_unmatched_hi = true;
|
||||||
@ -8695,7 +8689,7 @@ mips_ip (str, ip)
|
|||||||
else if (imm_expr.X_op == O_constant)
|
else if (imm_expr.X_op == O_constant)
|
||||||
imm_expr.X_add_number &= 0xffff;
|
imm_expr.X_add_number &= 0xffff;
|
||||||
}
|
}
|
||||||
if (imm_expr.X_op == O_constant
|
else if (imm_expr.X_op == O_constant
|
||||||
&& (imm_expr.X_add_number < 0
|
&& (imm_expr.X_add_number < 0
|
||||||
|| imm_expr.X_add_number >= 0x10000))
|
|| imm_expr.X_add_number >= 0x10000))
|
||||||
as_bad (_("lui expression not in range 0..65535"));
|
as_bad (_("lui expression not in range 0..65535"));
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-08-12 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* gas/mips/elf-consthilo.[sd]: New test.
|
||||||
|
* gas/mips/mips.exp: Run it.
|
||||||
|
|
||||||
2002-08-09 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
|
2002-08-09 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
|
||||||
|
|
||||||
* gas/mips/empic.d: Treat "addiu" and "daddiu" as equivalent when
|
* gas/mips/empic.d: Treat "addiu" and "daddiu" as equivalent when
|
||||||
|
10
gas/testsuite/gas/mips/elf-consthilo.d
Normal file
10
gas/testsuite/gas/mips/elf-consthilo.d
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#objdump: --prefix-addresses -dr
|
||||||
|
#name: MIPS constant hi/lo
|
||||||
|
|
||||||
|
.*: +file format elf.*mips.*
|
||||||
|
|
||||||
|
Disassembly of section \.text:
|
||||||
|
0+00 <.*> lui a0,0xdeae
|
||||||
|
0+04 <.*> jr ra
|
||||||
|
0+08 <.*> lb v0,-16657\(a0\)
|
||||||
|
#pass
|
12
gas/testsuite/gas/mips/elf-consthilo.s
Normal file
12
gas/testsuite/gas/mips/elf-consthilo.s
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
.set noreorder
|
||||||
|
.set nomacro
|
||||||
|
.set noat
|
||||||
|
.set nomips16
|
||||||
|
|
||||||
|
.equ addr, 0xdeadbeef
|
||||||
|
.ent foo
|
||||||
|
foo:
|
||||||
|
lui $4,%hi(addr)
|
||||||
|
jr $31
|
||||||
|
lb $2,%lo(addr)($4)
|
||||||
|
.end foo
|
@ -215,5 +215,6 @@ if { [istarget mips*-*-*] } then {
|
|||||||
run_dump_test "${tmips}mips${el}16-e"
|
run_dump_test "${tmips}mips${el}16-e"
|
||||||
run_dump_test "${tmips}mips${el}16-f"
|
run_dump_test "${tmips}mips${el}16-f"
|
||||||
}
|
}
|
||||||
|
run_dump_test "elf-consthilo"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user