aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-12-09 22:17:27 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-12-09 22:17:27 +0000
commitbbea7ebcc5c5ef8102fe45775c95cba5b854d4c1 (patch)
tree7541c15ce5f4835cc8f33b3cc121142e9863c7b7
parentc80c840e30b903ca562c7a02c71ca6da3f844a4e (diff)
downloadgdb-bbea7ebcc5c5ef8102fe45775c95cba5b854d4c1.zip
gdb-bbea7ebcc5c5ef8102fe45775c95cba5b854d4c1.tar.gz
gdb-bbea7ebcc5c5ef8102fe45775c95cba5b854d4c1.tar.bz2
* config/tc-mips.c (macro): Use EXTRACT_OPERAND to get register
numbers.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5816b66..d8feb68 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+ * config/tc-mips.c (macro): Use EXTRACT_OPERAND to get register
+ numbers.
+
+2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+
* config/tc-mips.c (macro): Replace 0 with ZERO in macro_build
and move_register calls referring to $0.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index eeee3dc..8a7456a 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -4823,9 +4823,9 @@ macro (struct mips_cl_insn *ip)
gas_assert (! mips_opts.mips16);
- treg = (ip->insn_opcode >> 16) & 0x1f;
- dreg = (ip->insn_opcode >> 11) & 0x1f;
- sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
+ treg = EXTRACT_OPERAND (RT, *ip);
+ dreg = EXTRACT_OPERAND (RD, *ip);
+ sreg = breg = EXTRACT_OPERAND (RS, *ip);
mask = ip->insn_mo->mask;
expr1.X_op = O_constant;