From c10d9d8fc3e815f9cbbf3be2188ddb94e4635ac9 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 5 Dec 2002 02:08:02 +0000 Subject: Patch to update IA-64 port to SDM 2.1. bfd/ChangeLog * cpu-ia64-opc.c: Add operand constant "ar.csd". gas/ChangeLog * config/tc-ia64.c (pseudo_func): Add "@pause" constant for "hint" instruction. (emit_one_bundle): Handle "hint" instruction. (operand_match): Match IA64_OPND_AR_CSD. gas/testsuite/ChangeLog * gas/ia64/opc-b.d: Update for instructions added by SDM2.1. * gas/ia64/opc-b.s: Ditto. * gas/ia64/opc-f.d: Ditto. * gas/ia64/opc-f.s: Ditto. * gas/ia64/opc-i.d: Ditto. * gas/ia64/opc-i.s: Ditto. * gas/ia64/opc-m.d: Ditto. * gas/ia64/opc-m.s: Ditto. * gas/ia64/opc-x.d: Ditto. * gas/ia64/opc-x.s: Ditto. include/opcode/ChangeLog * ia64.h: Fix copyright message. (IA64_OPND_AR_CSD): New operand kind. opcodes/ChangeLog * ia64-opc-d.c (ia64_opcodes_d): Add "hint" instruction. * ia64-opc-b.c: Add "hint.b" instruction. * ia64-opc-f.c: Add "hint.f" instruction. * ia64-opc-i.c: Add "hint.i" instruction. * ia64-opc-m.c: Add "hint.m", "fc.i", "ld16", "st16", and "cmp8xchg16" instructions. * ia64-opc-x.c: Add "hint.x" instruction. * ia64-opc.h (AR_CSD): New macro. * ia64-ic.tbl: Update according to SDM2.1. * ia64-raw.tbl: Ditto. * ia64-waw.tbl: Ditto. * ia64-gen.c (in_iclass): Handle "hint" like "nop". (lookup_regindex): Recognize AR[FCR], AR[EFLAG], AR[CSD], AR[SSD], AR[CFLG], AR[FSR], AR[FIR], and AR[FDR]. * ia64-asmtab.c: Regenerate. --- gas/ChangeLog | 7 +++++++ gas/config/tc-ia64.c | 11 ++++++++++- gas/testsuite/ChangeLog | 13 +++++++++++++ gas/testsuite/gas/ia64/opc-b.d | 6 ++++++ gas/testsuite/gas/ia64/opc-b.s | 7 +++++++ gas/testsuite/gas/ia64/opc-f.d | 9 +++++++++ gas/testsuite/gas/ia64/opc-f.s | 5 +++++ gas/testsuite/gas/ia64/opc-i.d | 6 ++++++ gas/testsuite/gas/ia64/opc-i.s | 6 ++++++ gas/testsuite/gas/ia64/opc-m.d | 36 +++++++++++++++++++++++++++++++++--- gas/testsuite/gas/ia64/opc-m.s | 32 ++++++++++++++++++++++++++++++-- gas/testsuite/gas/ia64/opc-x.d | 15 ++++++++++++--- gas/testsuite/gas/ia64/opc-x.s | 7 ++++++- 13 files changed, 150 insertions(+), 10 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index af5c5f7..abf40ea 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2002-12-04 David Mosberger + + * config/tc-ia64.c (pseudo_func): Add "@pause" constant for "hint" + instruction. + (emit_one_bundle): Handle "hint" instruction. + (operand_match): Match IA64_OPND_AR_CSD. + 2002-12-04 Alan Modra * dwarf2dbg.c (scale_addr_delta): Correct parameter. Move prototype diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 1e8542d..cd14e31 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -519,6 +519,9 @@ pseudo_func[] = { "natval", PSEUDO_FUNC_CONST, { 0x100 } }, /* old usage */ + /* hint constants: */ + { "pause", PSEUDO_FUNC_CONST, { 0x0 } }, + /* unwind-related constants: */ { "svr4", PSEUDO_FUNC_CONST, { 0 } }, { "hpux", PSEUDO_FUNC_CONST, { 1 } }, @@ -5032,6 +5035,11 @@ operand_match (idesc, index, e) return OPERAND_MATCH; break; + case IA64_OPND_AR_CSD: + if (e->X_op == O_register && e->X_add_number == REG_AR + 25) + return OPERAND_MATCH; + break; + case IA64_OPND_AR_PFS: if (e->X_op == O_register && e->X_add_number == REG_AR + 64) return OPERAND_MATCH; @@ -6156,10 +6164,11 @@ emit_one_bundle () } required_unit = ia64_templ_desc[template].exec_unit[i]; - /* resolve dynamic opcodes such as "break" and "nop": */ + /* resolve dynamic opcodes such as "break", "hint", and "nop": */ if (idesc->type == IA64_TYPE_DYN) { if ((strcmp (idesc->name, "nop") == 0) + || (strcmp (idesc->name, "hint") == 0) || (strcmp (idesc->name, "break") == 0)) insn_unit = required_unit; else if (strcmp (idesc->name, "chk.s") == 0) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 266b690..fe04795 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2002-12-04 David Mosberger + + * gas/ia64/opc-b.d: Update for instructions added by SDM2.1. + * gas/ia64/opc-b.s: Ditto. + * gas/ia64/opc-f.d: Ditto. + * gas/ia64/opc-f.s: Ditto. + * gas/ia64/opc-i.d: Ditto. + * gas/ia64/opc-i.s: Ditto. + * gas/ia64/opc-m.d: Ditto. + * gas/ia64/opc-m.s: Ditto. + * gas/ia64/opc-x.d: Ditto. + * gas/ia64/opc-x.s: Ditto. + 2002-12-03 Richard Henderson * gas/ia64/ldxmov-1.[ds]: New. diff --git a/gas/testsuite/gas/ia64/opc-b.d b/gas/testsuite/gas/ia64/opc-b.d index 77f735c..0cf8d2b 100644 --- a/gas/testsuite/gas/ia64/opc-b.d +++ b/gas/testsuite/gas/ia64/opc-b.d @@ -1012,3 +1012,9 @@ Disassembly of section .text: 2be0: 17 00 00 00 00 08 \[BBB\] nop\.b 0x0 2be6: 00 00 00 00 10 00 nop\.b 0x0 2bec: 00 00 40 00 epc;; + 2bf0: 16 f8 ff 0f 00 00 \[BBB\] break\.b 0x1ffff + 2bf6: 00 00 00 02 10 e0 hint\.b 0x0 + 2bfc: ff 3f 04 20 hint\.b 0x1ffff + 2c00: 1d 00 00 00 01 00 \[MFB\] nop\.m 0x0 + 2c06: 00 00 00 02 00 e0 nop\.f 0x0 + 2c0c: ff 3f 00 20 nop\.b 0x1ffff;; diff --git a/gas/testsuite/gas/ia64/opc-b.s b/gas/testsuite/gas/ia64/opc-b.s index 00c7769..e688184 100644 --- a/gas/testsuite/gas/ia64/opc-b.s +++ b/gas/testsuite/gas/ia64/opc-b.s @@ -824,3 +824,10 @@ { .bbb; nop.b 0; nop.b 0; epc ;; } .L1: + + # instructions added by SDM2.1: + + break.b 0x1ffff + hint.b @pause + hint.b 0x1ffff + nop.b 0x1ffff diff --git a/gas/testsuite/gas/ia64/opc-f.d b/gas/testsuite/gas/ia64/opc-f.d index 22ff252..77dcc05 100644 --- a/gas/testsuite/gas/ia64/opc-f.d +++ b/gas/testsuite/gas/ia64/opc-f.d @@ -1560,3 +1560,12 @@ Disassembly of section \.text: 2050: 1d 00 00 00 01 00 \[MFB\] nop\.m 0x0 2056: 00 00 00 02 00 00 nop\.f 0x0 205c: 00 00 00 20 nop\.b 0x0;; + 2060: 1c 00 00 00 01 00 \[MFB\] nop\.m 0x0 + 2066: 00 00 00 03 00 00 hint\.f 0x0 + 206c: 00 00 00 20 nop\.b 0x0 + 2070: 1c 00 00 00 01 00 \[MFB\] nop\.m 0x0 + 2076: 00 00 00 03 00 00 hint\.f 0x0 + 207c: 00 00 00 20 nop\.b 0x0 + 2080: 1d 00 00 00 01 00 \[MFB\] nop\.m 0x0 + 2086: f0 ff 1f 03 00 00 hint\.f 0x1ffff + 208c: 00 00 00 20 nop\.b 0x0;; diff --git a/gas/testsuite/gas/ia64/opc-f.s b/gas/testsuite/gas/ia64/opc-f.s index 010b086..4e6f51d 100644 --- a/gas/testsuite/gas/ia64/opc-f.s +++ b/gas/testsuite/gas/ia64/opc-f.s @@ -605,3 +605,8 @@ _start: break.f 0 nop.f 0;; + # instructions added by SDM2.1: + + hint.f 0 + hint.f @pause + hint.f 0x1ffff diff --git a/gas/testsuite/gas/ia64/opc-i.d b/gas/testsuite/gas/ia64/opc-i.d index be43674..9c3d921 100644 --- a/gas/testsuite/gas/ia64/opc-i.d +++ b/gas/testsuite/gas/ia64/opc-i.d @@ -243,3 +243,9 @@ Disassembly of section \.text: 976: 30 20 18 84 03 60 mov\.ret\.dptk b3=r4,a70 <_start\+0xa70> 97c: 40 70 08 07 mov\.ret\.dptk\.imp b3=r4,a70 <_start\+0xa70>;; \.\.\. + a70: 00 00 00 80 01 00 \[MII\] hint\.m 0x0 + a76: 00 00 00 03 00 00 hint\.i 0x0 + a7c: 00 00 06 00 hint\.i 0x0 + a80: 0d 00 00 00 01 00 \[MFI\] nop\.m 0x0 + a86: 00 00 00 02 00 e0 nop\.f 0x0 + a8c: ff ff 07 08 hint\.i 0x1fffff;; diff --git a/gas/testsuite/gas/ia64/opc-i.s b/gas/testsuite/gas/ia64/opc-i.s index a9529f2..d06c2c0 100644 --- a/gas/testsuite/gas/ia64/opc-i.s +++ b/gas/testsuite/gas/ia64/opc-i.s @@ -206,3 +206,9 @@ _start: .space 240 .L6: + # instructions added by SDM2.1: + + hint @pause + hint.i 0 + hint.i @pause + hint.i 0x1fffff diff --git a/gas/testsuite/gas/ia64/opc-m.d b/gas/testsuite/gas/ia64/opc-m.d index 3549b2e..127776b 100644 --- a/gas/testsuite/gas/ia64/opc-m.d +++ b/gas/testsuite/gas/ia64/opc-m.d @@ -1285,7 +1285,7 @@ Disassembly of section \.text: 1a96: f0 ff 1f 00 00 00 break\.m 0x1ffff 1a9c: 00 00 00 20 nop\.b 0x0 1aa0: 18 00 00 00 01 00 \[MMB\] nop\.m 0x0 - 1aa6: f0 ff 1f 00 00 00 break\.m 0x1ffff + 1aa6: f0 ff 1f 02 00 00 nop\.m 0x1ffff 1aac: 00 00 00 20 nop\.b 0x0 1ab0: 18 20 18 0a 38 04 \[MMB\] probe\.r r4=r5,r6 1ab6: 40 30 14 72 08 00 probe\.w r4=r5,r6 @@ -1323,6 +1323,36 @@ Disassembly of section \.text: 1b60: 18 20 00 0a 1a 04 \[MMB\] thash r4=r5 1b66: 40 00 14 36 08 00 ttag r4=r5 1b6c: 00 00 00 20 nop\.b 0x0 - 1b70: 19 20 00 0a 1e 04 \[MMB\] tpa r4=r5 + 1b70: 18 20 00 0a 1e 04 \[MMB\] tpa r4=r5 1b76: 40 00 14 3e 08 00 tak r4=r5 - 1b7c: 00 00 00 20 nop\.b 0x0;; + 1b7c: 00 00 00 20 nop\.b 0x0 + 1b80: 18 00 00 80 01 00 \[MMB\] hint\.m 0x0 + 1b86: 00 00 00 03 00 00 hint\.m 0x0 + 1b8c: 00 00 00 20 nop\.b 0x0 + 1b90: 18 f8 ff 8f 01 00 \[MMB\] hint\.m 0x1ffff + 1b96: 40 30 14 02 22 00 cmp8xchg16\.acq r4=\[r5\],r6,ar\.csd,ar\.ccv + 1b9c: 00 00 00 20 nop\.b 0x0 + 1ba0: 18 20 18 0a 03 11 \[MMB\] cmp8xchg16\.acq\.nt1 r4=\[r5\],r6,ar\.csd,ar\.ccv + 1ba6: 40 30 14 0e 22 00 cmp8xchg16\.acq\.nta r4=\[r5\],r6,ar\.csd,ar\.ccv + 1bac: 00 00 00 20 nop\.b 0x0 + 1bb0: 18 20 18 0a 21 11 \[MMB\] cmp8xchg16\.rel r4=\[r5\],r6,ar\.csd,ar\.ccv + 1bb6: 40 30 14 46 22 00 cmp8xchg16\.rel\.nt1 r4=\[r5\],r6,ar\.csd,ar\.ccv + 1bbc: 00 00 00 20 nop\.b 0x0 + 1bc0: 18 20 18 0a 27 11 \[MMB\] cmp8xchg16\.rel\.nta r4=\[r5\],r6,ar\.csd,ar\.ccv + 1bc6: 00 00 10 60 0c 00 fc\.i r4 + 1bcc: 00 00 00 20 nop\.b 0x0 + 1bd0: 18 20 00 0a 41 11 \[MMB\] ld16 r4,ar\.csd=\[r5\] + 1bd6: 40 00 14 86 22 00 ld16\.nt1 r4,ar\.csd=\[r5\] + 1bdc: 00 00 00 20 nop\.b 0x0 + 1be0: 18 20 00 0a 47 11 \[MMB\] ld16\.nta r4,ar\.csd=\[r5\] + 1be6: 40 00 14 c2 22 00 ld16\.acq r4,ar\.csd=\[r5\] + 1bec: 00 00 00 20 nop\.b 0x0 + 1bf0: 18 20 00 0a 63 11 \[MMB\] ld16\.acq\.nt1 r4,ar\.csd=\[r5\] + 1bf6: 40 00 14 ce 22 00 ld16\.acq\.nta r4,ar\.csd=\[r5\] + 1bfc: 00 00 00 20 nop\.b 0x0 + 1c00: 18 00 14 08 81 11 \[MMB\] st16 \[r4\]=r5,ar\.csd + 1c06: 00 28 10 0e 23 00 st16\.nta \[r4\]=r5,ar\.csd + 1c0c: 00 00 00 20 nop\.b 0x0 + 1c10: 19 00 14 08 a1 11 \[MMB\] st16\.rel \[r4\]=r5,ar\.csd + 1c16: 00 28 10 4e 23 00 st16\.rel\.nta \[r4\]=r5,ar\.csd + 1c1c: 00 00 00 20 nop\.b 0x0;; diff --git a/gas/testsuite/gas/ia64/opc-m.s b/gas/testsuite/gas/ia64/opc-m.s index fa6e66a..a8e5061 100644 --- a/gas/testsuite/gas/ia64/opc-m.s +++ b/gas/testsuite/gas/ia64/opc-m.s @@ -1,7 +1,6 @@ .text .type _start,@function _start: - ld1 r4 = [r5] ld1 r4 = [r5], r6 ld1 r4 = [r5], -256 @@ -976,7 +975,7 @@ _start: break.m 0x1ffff nop.m 0 - break.m 0x1ffff + nop.m 0x1ffff probe.r r4 = r5, r6 probe.w r4 = r5, r6 @@ -1007,3 +1006,32 @@ _start: tpa r4 = r5 tak r4 = r5 + # instructions added by SDM2.1: + + hint.m 0 + hint.m @pause + hint.m 0x1ffff + + cmp8xchg16.acq r4 = [r5], r6, ar25, ar.ccv + cmp8xchg16.acq.nt1 r4 = [r5], r6, ar.csd, ar.ccv + cmp8xchg16.acq.nta r4 = [r5], r6, ar.csd, ar.ccv + + cmp8xchg16.rel r4 = [r5], r6, ar.csd, ar.ccv + cmp8xchg16.rel.nt1 r4 = [r5], r6, ar.csd, ar.ccv + cmp8xchg16.rel.nta r4 = [r5], r6, ar.csd, ar.ccv + + fc.i r4 + + ld16 r4, ar25 = [r5] + ld16.nt1 r4, ar.csd = [r5] + ld16.nta r4, ar.csd = [r5] + + ld16.acq r4, ar25 = [r5] + ld16.acq.nt1 r4, ar.csd = [r5] + ld16.acq.nta r4, ar.csd = [r5] + + st16 [r4] = r5, ar25 + st16.nta [r4] = r5, ar.csd + + st16.rel [r4] = r5, ar.csd + st16.rel.nta [r4] = r5, ar.csd diff --git a/gas/testsuite/gas/ia64/opc-x.d b/gas/testsuite/gas/ia64/opc-x.d index 10d82fd..66e9fcc 100644 --- a/gas/testsuite/gas/ia64/opc-x.d +++ b/gas/testsuite/gas/ia64/opc-x.d @@ -23,7 +23,16 @@ Disassembly of section .text: 4e: 00 60 04 00 52: 00 00 01 c0 ff ff \[MLX\] nop\.m 0x0 58: ff ff 7f 80 f0 f7 movl r4=0xffffffffffffffff - 5e: ff 6f 05 00 + 5e: ff 6f 04 00 62: 00 00 01 80 90 78 \[MLX\] nop\.m 0x0 - 68: 56 34 12 80 f0 76 movl r4=0x1234567890abcdef;; - 6e: 6d 66 00 00 + 68: 56 34 12 80 f0 76 movl r4=0x1234567890abcdef + 6e: 6d 66 04 00 + 72: 00 00 01 00 00 00 \[MLX\] nop\.m 0x0 + 78: 00 00 00 00 00 00 hint\.x 0x0 + 7e: 06 00 04 00 + 82: 00 00 01 00 00 00 \[MLX\] nop\.m 0x0 + 88: 00 00 00 00 00 00 hint\.x 0x0 + 8e: 06 00 05 00 + 92: 00 00 01 c0 ff ff \[MLX\] nop\.m 0x0 + 98: ff ff 7f e0 ff ff hint\.x 0x3fffffffffffffff;; + 9e: 07 08 00 00 diff --git a/gas/testsuite/gas/ia64/opc-x.s b/gas/testsuite/gas/ia64/opc-x.s index ec1f5f2..4332d51 100644 --- a/gas/testsuite/gas/ia64/opc-x.s +++ b/gas/testsuite/gas/ia64/opc-x.s @@ -4,7 +4,7 @@ _start: break.x 0 break.x 0x3fffffffffffffff - + nop.x 0 nop.x 0x3fffffffffffffff @@ -12,3 +12,8 @@ _start: movl r4 = 0xffffffffffffffff movl r4 = 0x1234567890abcdef + # instructions added by SDM2.1: + + hint.x 0 + hint.x @pause + hint.x 0x3fffffffffffffff -- cgit v1.1