diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-01-31 08:48:32 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-01-31 08:48:32 +0000 |
commit | 4b5b7c78dc8cb2a350676d9ed8b49b4255cb0658 (patch) | |
tree | 08b117fe039c9bf45aaa4f6b12626de8910b563f /gas | |
parent | 3c7e2498898ff71a454b16f2c1f603e00849528b (diff) | |
download | binutils-redhat-4b5b7c78dc8cb2a350676d9ed8b49b4255cb0658.tar.gz |
gas/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (parse_operands): Also handle alloc without first
input being ar.pfs.
gas/testsuite/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* gas/ia64/pseudo.[ds]: New.
* gas/ia64/ia64.exp: Run new test.
opcodes/
2005-01-31 Jan Beulich <jbeulich@novell.com>
* ia64-gen.c (NELEMS): Define.
(shrink): Generate alias with missing second predicate register when
opcode has two outputs and these are both predicates.
* ia64-opc-i.c (FULL17): Define.
(ia64_opcodes_i): Add mov-to-pr alias without second input. Use FULL17
here to generate output template.
(TBITCM, TNATCM): Undefine after use.
* ia64-opc-m.c (ia64_opcodes_i): Add alloc alias without ar.pfs as
first input. Add ld16 aliases without ar.csd as second output. Add
st16 aliases without ar.csd as second input. Add cmpxchg aliases
without ar.ccv as third input. Add cmp8xchg16 aliases without ar.csd/
ar.ccv as third/fourth inputs. Consolidate through...
(CMPXCHG_acq, CMPXCHG_rel, CMPXCHG_1, CMPXCHG_2, CMPXCHG_4, CMPXCHG_8,
CMPXCHGn, CMP8XCHG16, CMPXCHG_ALL): Define.
* ia64-asmtab.c: Regenerate.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-ia64.c | 36 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/ia64/ia64.exp | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/ia64/pseudo.d | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/ia64/pseudo.s | 15 |
6 files changed, 72 insertions, 16 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0a5118d8a7..c109bd6732 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-01-31 Jan Beulich <jbeulich@novell.com> + + * config/tc-ia64.c (parse_operands): Also handle alloc without first + input being ar.pfs. + 2005-01-28 Christian Groessler <chris@groessler.org> * config/tc-z8k.c (md_assemble): Improve error detection. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 21b62fb132..64156474da 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -5782,7 +5782,8 @@ parse_operands (idesc) assert (strlen (idesc->name) <= 128); strcpy (mnemonic, idesc->name); - if (idesc->operands[2] == IA64_OPND_SOF) + if (idesc->operands[2] == IA64_OPND_SOF + || idesc->operands[1] == IA64_OPND_SOF) { /* To make the common idiom "alloc loc?=ar.pfs,0,1,0,0" work, we can't parse the first operand until we have parsed the @@ -5825,20 +5826,23 @@ parse_operands (idesc) return 0; } - if (idesc->operands[2] == IA64_OPND_SOF) + if (idesc->operands[2] == IA64_OPND_SOF + || idesc->operands[1] == IA64_OPND_SOF) { /* map alloc r1=ar.pfs,i,l,o,r to alloc r1=ar.pfs,(i+l+o),(i+l),r */ know (strcmp (idesc->name, "alloc") == 0); - if (num_operands == 5 /* first_arg not included in this count! */ - && CURR_SLOT.opnd[2].X_op == O_constant - && CURR_SLOT.opnd[3].X_op == O_constant - && CURR_SLOT.opnd[4].X_op == O_constant - && CURR_SLOT.opnd[5].X_op == O_constant) - { - sof = set_regstack (CURR_SLOT.opnd[2].X_add_number, - CURR_SLOT.opnd[3].X_add_number, - CURR_SLOT.opnd[4].X_add_number, - CURR_SLOT.opnd[5].X_add_number); + i = (CURR_SLOT.opnd[1].X_op == O_register + && CURR_SLOT.opnd[1].X_add_number == REG_AR + AR_PFS) ? 2 : 1; + if (num_operands == i + 3 /* first_arg not included in this count! */ + && CURR_SLOT.opnd[i].X_op == O_constant + && CURR_SLOT.opnd[i + 1].X_op == O_constant + && CURR_SLOT.opnd[i + 2].X_op == O_constant + && CURR_SLOT.opnd[i + 3].X_op == O_constant) + { + sof = set_regstack (CURR_SLOT.opnd[i].X_add_number, + CURR_SLOT.opnd[i + 1].X_add_number, + CURR_SLOT.opnd[i + 2].X_add_number, + CURR_SLOT.opnd[i + 3].X_add_number); /* now we can parse the first arg: */ saved_input_pointer = input_line_pointer; @@ -5848,10 +5852,10 @@ parse_operands (idesc) --num_outputs; /* force error */ input_line_pointer = saved_input_pointer; - CURR_SLOT.opnd[2].X_add_number = sof; - CURR_SLOT.opnd[3].X_add_number - = sof - CURR_SLOT.opnd[4].X_add_number; - CURR_SLOT.opnd[4] = CURR_SLOT.opnd[5]; + CURR_SLOT.opnd[i].X_add_number = sof; + CURR_SLOT.opnd[i + 1].X_add_number + = sof - CURR_SLOT.opnd[i + 2].X_add_number; + CURR_SLOT.opnd[i + 2] = CURR_SLOT.opnd[i + 3]; } } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 0e63736575..004ed44f6e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-01-31 Jan Beulich <jbeulich@novell.com> + + * gas/ia64/pseudo.[ds]: New. + * gas/ia64/ia64.exp: Run new test. + 2005-01-27 Jan Beulich <jbeulich@novell.com> * gas/ia64/nop_x.[ds]: New. diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp index d004bc2cf8..84194104a0 100644 --- a/gas/testsuite/gas/ia64/ia64.exp +++ b/gas/testsuite/gas/ia64/ia64.exp @@ -24,6 +24,7 @@ if [istarget "ia64-*"] then { run_dump_test "opc-i" run_dump_test "opc-m" run_dump_test "opc-x" + run_dump_test "pseudo" run_dump_test "nop_x" run_dump_test "mov-ar" diff --git a/gas/testsuite/gas/ia64/pseudo.d b/gas/testsuite/gas/ia64/pseudo.d new file mode 100644 index 0000000000..c636e5010c --- /dev/null +++ b/gas/testsuite/gas/ia64/pseudo.d @@ -0,0 +1,26 @@ +# objdump: -d +# name: ia64 pseudo-ops + +.*: +file format .* + +Disassembly of section \.text: + +0+0 <_start>: +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+alloc r8=ar\.pfs,0,0,0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmp\.eq p6,p0=r0,r0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmp\.eq p7,p0=0,r0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmp4\.eq p8,p0=r0,r0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+nop\.. 0x0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmp4\.eq p9,p0=0,r0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmp8xchg16\.acq r9=\[r0\],r0,ar\.csd,ar\.ccv +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+cmpxchg4\.acq r10=\[r0\],r0,ar\.ccv +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+fclass\.m p10,p0=f0,0x1 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+nop\.. 0x0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+fcmp\.eq\.s0 p11,p0=f0,f0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+nop\.. 0x0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+ld16 r11,ar\.csd=\[r0\] +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+nop\.. 0x0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+mov pr=r0,0xfffffffffffffffe +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+st16 \[r0\]=r0,ar\.csd +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+tbit\.z p0,p12=r0,0 +[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+(\[[[:upper:]]+\])?[[:space:]]+tnat\.z p0,p13=r0(;;)? diff --git a/gas/testsuite/gas/ia64/pseudo.s b/gas/testsuite/gas/ia64/pseudo.s new file mode 100644 index 0000000000..5c7f66f582 --- /dev/null +++ b/gas/testsuite/gas/ia64/pseudo.s @@ -0,0 +1,15 @@ +_start: + alloc r8 = 0, 0, 0, 0 + cmp.eq p6 = r0, r0 + cmp.eq p7 = 0, r0 + cmp4.eq p8 = r0, r0 + cmp4.eq p9 = 0, r0 + cmp8xchg16.acq r9 = [r0], r0 + cmpxchg4.acq r10 = [r0], r0 + fclass.m p10 = f0, @pos + fcmp.eq p11 = f0, f0 + ld16 r11 = [r0] + mov pr = r0 + st16 [r0] = r0 + tbit.nz p12 = r0, 0 + tnat.nz p13 = r0 |