This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Commit: MSP430: Update hardware bug restrictions
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Tue, 25 Jun 2013 09:20:06 +0100
- Subject: Commit: MSP430: Update hardware bug restrictions
Hi Guys,
I am checking in the patch below to update the encoding restrictions
for hardware bugs found in the MSP430Xv2 hardware.
Cheers
Nick
gas/ChangeLog
2013-06-25 Nick Clifton <nickc@redhat.com>
* config/tc-msp430.c (msp430_srcoperand): Do not allow the use of
the PC in indirect addressing on 430xv2 parts.
(msp430_operands): Add version test to hardware bug encoding
restrictions.
Index: gas/config/tc-msp430.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-msp430.c,v
retrieving revision 1.36
diff -u -3 -p -r1.36 tc-msp430.c
--- gas/config/tc-msp430.c 16 May 2013 13:19:40 -0000 1.36
+++ gas/config/tc-msp430.c 25 Jun 2013 08:10:10 -0000
@@ -1215,7 +1215,6 @@ md_parse_option (int c, char * arg)
return 0;
}
-
const pseudo_typeS md_pseudo_table[] =
{
{"arch", msp430_set_arch, OPTION_MMCU},
@@ -1649,6 +1648,12 @@ msp430_srcoperand (struct msp430_operand
op->am = m ? 3 : 2;
op->ol = 0;
+ /* PC cannot be used in indirect addressing. */
+ if (target_is_430xv2 () && op->reg == 0)
+ {
+ as_bad (_("cannot use indirect addressing with the PC"));
+ return 1;
+ }
return 0;
}
@@ -2301,7 +2306,8 @@ msp430_operands (struct msp430_opcode_s
where = frag - frag_now->fr_literal;
/* Issue 3831743. */
- if (op1.mode == OP_REG
+ if (target_is_430xv2 ()
+ && op1.mode == OP_REG
&& op1.reg == 0
&& (is_opcode ("rlax")
|| is_opcode ("rlcx")
@@ -2580,8 +2586,8 @@ msp430_operands (struct msp430_opcode_s
return 0;
}
- /* Issue 3831713: CPU21 parts cannot use POPM to restore the SR register. */
- if (target_is_430x ()
+ /* CPU21 parts cannot use POPM to restore the SR register. */
+ if (target_is_430xv2 ()
&& (reg - n + 1 < 3)
&& reg >= 2
&& is_opcode ("popm"))
@@ -2640,8 +2646,7 @@ msp430_operands (struct msp430_opcode_s
return 0;
}
- /* Issue 3831743. */
- if (reg == 0)
+ if (target_is_430xv2 () && reg == 0)
{
as_bad (_("%s: attempt to rotate the PC register"), opcode->name);
return 0;
@@ -2681,8 +2686,7 @@ msp430_operands (struct msp430_opcode_s
return 0;
}
- /* Issue 3831743. */
- if (reg == 0)
+ if (target_is_430xv2 () && reg == 0)
{
as_bad (_("%s: attempt to rotate the PC register"), opcode->name);
return 0;
@@ -3060,8 +3064,8 @@ msp430_operands (struct msp430_opcode_s
if (res)
break; /* Error in operand. */
- /* Issue 3831743. */
- if (op1.mode == OP_REG
+ if (target_is_430xv2 ()
+ && op1.mode == OP_REG
&& op1.reg == 0
&& (is_opcode ("rrax")
|| is_opcode ("rrcx")