+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>
* config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR
{
if (c != S_EX_LO)
{
- if (imm_expr.X_op == O_constant)
- imm_expr.X_add_number =
- (imm_expr.X_add_number >> 16) & 0xffff;
+ if (c == S_EX_HI)
+ {
+ *imm_reloc = BFD_RELOC_HI16_S;
+ imm_unmatched_hi = true;
+ }
#ifdef OBJ_ELF
else if (c == S_EX_HIGHEST)
*imm_reloc = BFD_RELOC_MIPS_HIGHEST;
}
}
#endif
- else if (c == S_EX_HI)
- {
- *imm_reloc = BFD_RELOC_HI16_S;
- imm_unmatched_hi = true;
- }
else
*imm_reloc = BFD_RELOC_HI16;
}
{
if (c != S_EX_LO)
{
- if (imm_expr.X_op == O_constant)
- imm_expr.X_add_number =
- (imm_expr.X_add_number >> 16) & 0xffff;
- else if (c == S_EX_HI)
+ if (c == S_EX_HI)
{
*imm_reloc = BFD_RELOC_HI16_S;
imm_unmatched_hi = true;
else if (imm_expr.X_op == O_constant)
imm_expr.X_add_number &= 0xffff;
}
- if (imm_expr.X_op == O_constant
- && (imm_expr.X_add_number < 0
- || imm_expr.X_add_number >= 0x10000))
+ else if (imm_expr.X_op == O_constant
+ && (imm_expr.X_add_number < 0
+ || imm_expr.X_add_number >= 0x10000))
as_bad (_("lui expression not in range 0..65535"));
s = expr_end;
continue;
+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>
* gas/mips/empic.d: Treat "addiu" and "daddiu" as equivalent when
--- /dev/null
+#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