aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-hppa.c
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2010-12-27 02:05:14 +0000
committerDave Anglin <dave.anglin@nrc.ca>2010-12-27 02:05:14 +0000
commita64718d3b10db2e9c52e14df4e221b5f127edbff (patch)
tree8f46709e2b46767144d07316badadcbe122a1bd1 /gas/config/tc-hppa.c
parent53e6a1dd44e692b7ca258b325776a4cfd8af11f3 (diff)
downloadgdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.zip
gdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.tar.gz
gdb-a64718d3b10db2e9c52e14df4e221b5f127edbff.tar.bz2
PR gas/11395
* config/tc-hppa.c (pa_ip): Set doubleword carry/borrow bit when a doubleword completer or doubleword condition is found in an add/sub instruction. Reject match for 'A'/'S' only if there is no condition and d bit is not set. * gas/hppa/basic/add2.s: Add test for a simple doubleword carry instruction. * gas/hppa/basic/sub2.s: Add tests for simple word and doubleword borrow instructions. * gas/hppa/basic/basic.exp: Update regexps for above. * opcode/hppa.h: Clear "d" bit in "add" and "sub" patterns.
Diffstat (limited to 'gas/config/tc-hppa.c')
-rw-r--r--gas/config/tc-hppa.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index e55b2b4..b2c5076 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -3758,6 +3758,8 @@ pa_ip (char *str)
else
break;
+ /* Set doubleword carry bit. */
+ opcode |= 0x20;
INSERT_FIELD_AND_CONTINUE (opcode, flag, 11);
/* Handle 32 bit carry for ADD. */
@@ -3826,6 +3828,8 @@ pa_ip (char *str)
else
break;
+ /* Set doubleword borrow bit. */
+ opcode |= 0x20;
INSERT_FIELD_AND_CONTINUE (opcode, flag, 11);
/* Handle 32 bit borrow for SUB. */
@@ -3970,11 +3974,13 @@ pa_ip (char *str)
/* Handle an add condition. */
case 'A':
/* PR gas/11395
- If we are looking for 64-bit add conditions and we
- do not have the ",*" prefix, then we have no match. */
- if (*s != ',')
+ If we don't have a ",*" condition or "dc" completer,
+ then we have a doubleword carry match failure. */
+ if (*s != ',' && !(opcode & 0x20))
break;
+ opcode |= 0x20;
/* Fall through. */
+
case 'a':
cmpltr = 0;
flag = 0;
@@ -4142,6 +4148,14 @@ pa_ip (char *str)
/* Handle a compare/subtract condition. */
case 'S':
+ /* PR gas/11395
+ If we don't have a ",*" condition or "dc" completer,
+ then we have a doubleword carry match failure. */
+ if (*s != ',' && !(opcode & 0x20))
+ break;
+ opcode |= 0x20;
+ /* Fall through. */
+
case 's':
cmpltr = 0;
flag = 0;