aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-10-22 16:52:46 +0000
committerIan Lance Taylor <ian@airs.com>1997-10-22 16:52:46 +0000
commit517640d9b5419a85812d316280b6948df4314c13 (patch)
tree50ae0704d5b25361e4a73c3e503e2dccb4ec4cdc /gas/config
parent34ed833edd902b2aea91f7ed1e090f297ea71eb3 (diff)
downloadgdb-517640d9b5419a85812d316280b6948df4314c13.zip
gdb-517640d9b5419a85812d316280b6948df4314c13.tar.gz
gdb-517640d9b5419a85812d316280b6948df4314c13.tar.bz2
* config/tc-mips.c (macro): Correct handling of constant in M_LI_D
case in little endian mode.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c33
1 files changed, 26 insertions, 7 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 567758d..6eecede 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -4976,16 +4976,35 @@ macro (ip)
or in offset_expr. */
if (imm_expr.X_op == O_constant || imm_expr.X_op == O_big)
{
- load_register (&icnt, treg, &imm_expr, mips_opts.isa >= 3);
- if (mips_opts.isa < 3 && treg != 31)
+ if (mips_opts.isa >= 3)
+ load_register (&icnt, treg, &imm_expr, 1);
+ else
{
- if (offset_expr.X_op == O_absent)
- macro_build ((char *) NULL, &icnt, NULL, "move", "d,s",
- treg + 1, 0);
+ int hreg, lreg;
+
+ if (target_big_endian)
+ {
+ hreg = treg;
+ lreg = treg + 1;
+ }
else
{
- assert (offset_expr.X_op == O_constant);
- load_register (&icnt, treg + 1, &offset_expr, 0);
+ hreg = treg + 1;
+ lreg = treg;
+ }
+
+ if (hreg <= 31)
+ load_register (&icnt, hreg, &imm_expr, 0);
+ if (lreg <= 31)
+ {
+ if (offset_expr.X_op == O_absent)
+ macro_build ((char *) NULL, &icnt, NULL, "move", "d,s",
+ lreg, 0);
+ else
+ {
+ assert (offset_expr.X_op == O_constant);
+ load_register (&icnt, lreg, &offset_expr, 0);
+ }
}
}
return;