* [PATCH] ia64 segfault on nop in X-slot of MLX bundle
@ 2005-01-24 10:35 Jan Beulich
2005-01-27 3:39 ` James E Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2005-01-24 10:35 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 2233 bytes --]
Using the nop alias insn as the second one in an MLX bundle caused the
assembler to segfault; the Intel assembler accepts this.
Built and tested on ia64-unknown-linux-gnu.
Jan
gas/
2005-01-24 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (emit_one_bundle): Allow .x suffix when
resolving
dynamic insns.
gas/testsuite/
2005-01-24 Jan Beulich <jbeulich@novell.com>
* gas/ia64/nop_x[.ds]: New.
* gas/ia64/ia64.exp: Run new test.
---
/home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-18
10:43:33.000000000 +0100
+++ 2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-24
11:26:38.029985594 +0100
@@ -6383,7 +6383,7 @@ emit_one_bundle ()
else
as_fatal ("emit_one_bundle: unexpected dynamic op");
- sprintf (mnemonic, "%s.%c", idesc->name,
"?imbf??"[insn_unit]);
+ sprintf (mnemonic, "%s.%c", idesc->name,
"?imbfxx"[insn_unit]);
ia64_free_opcode (idesc);
md.slot[curr].idesc = idesc = ia64_find_opcode (mnemonic);
#if 0
---
/home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2004-07-02
08:26:34.000000000 +0200
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2005-01-24
11:26:38.031938719 +0100
@@ -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 "nop_x"
run_list_test "dv-raw-err" ""
run_list_test "dv-waw-err" ""
---
/home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.d 1970-01-01
01:00:00.000000000 +0100
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.d 2005-01-21
15:57:23.000000000 +0100
@@ -0,0 +1,11 @@
+# objdump: -d
+# name: ia64 nop.x pseudo
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+0 <_start>:
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MLX][[:space:]]+nop.m
0x0
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+nop.x 0x0;;
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+
---
/home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.s 1970-01-01
01:00:00.000000000 +0100
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.s 2005-01-21
15:56:11.000000000 +0100
@@ -0,0 +1,5 @@
+_start:
+{.mlx
+ nop 0
+ nop 0
+} ;;
[-- Attachment #2: binutils-mainline-ia64-nop_x.patch --]
[-- Type: text/plain, Size: 2232 bytes --]
Using the nop alias insn as the second one in an MLX bundle caused the
assembler to segfault; the Intel assembler accepts this.
Built and tested on ia64-unknown-linux-gnu.
Jan
gas/
2005-01-24 Jan Beulich <jbeulich@novell.com>
* config/tc-ia64.c (emit_one_bundle): Allow .x suffix when resolving
dynamic insns.
gas/testsuite/
2005-01-24 Jan Beulich <jbeulich@novell.com>
* gas/ia64/nop_x[.ds]: New.
* gas/ia64/ia64.exp: Run new test.
--- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-18 10:43:33.000000000 +0100
+++ 2005-01-24.08.40/gas/config/tc-ia64.c 2005-01-24 11:26:38.029985594 +0100
@@ -6383,7 +6383,7 @@ emit_one_bundle ()
else
as_fatal ("emit_one_bundle: unexpected dynamic op");
- sprintf (mnemonic, "%s.%c", idesc->name, "?imbf??"[insn_unit]);
+ sprintf (mnemonic, "%s.%c", idesc->name, "?imbfxx"[insn_unit]);
ia64_free_opcode (idesc);
md.slot[curr].idesc = idesc = ia64_find_opcode (mnemonic);
#if 0
--- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2004-07-02 08:26:34.000000000 +0200
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/ia64.exp 2005-01-24 11:26:38.031938719 +0100
@@ -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 "nop_x"
run_list_test "dv-raw-err" ""
run_list_test "dv-waw-err" ""
--- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.d 1970-01-01 01:00:00.000000000 +0100
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.d 2005-01-21 15:57:23.000000000 +0100
@@ -0,0 +1,11 @@
+# objdump: -d
+# name: ia64 nop.x pseudo
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+0 <_start>:
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+\[MLX][[:space:]]+nop.m 0x0
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+nop.x 0x0;;
+[[:space:]]*[[:xdigit:]]*:[[:space:][:xdigit:]]+
--- /home/jbeulich/src/binutils/mainline/2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.s 1970-01-01 01:00:00.000000000 +0100
+++ 2005-01-24.08.40/gas/testsuite/gas/ia64/nop_x.s 2005-01-21 15:56:11.000000000 +0100
@@ -0,0 +1,5 @@
+_start:
+{.mlx
+ nop 0
+ nop 0
+} ;;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ia64 segfault on nop in X-slot of MLX bundle
2005-01-24 10:35 [PATCH] ia64 segfault on nop in X-slot of MLX bundle Jan Beulich
@ 2005-01-27 3:39 ` James E Wilson
2005-01-27 19:55 ` James E Wilson
0 siblings, 1 reply; 3+ messages in thread
From: James E Wilson @ 2005-01-27 3:39 UTC (permalink / raw)
To: Jan Beulich; +Cc: binutils
On Mon, 2005-01-24 at 02:35, Jan Beulich wrote:
> * config/tc-ia64.c (emit_one_bundle): Allow .x suffix when
> resolving
> dynamic insns.
OK.
nop.x wasn't in the original architecture. My recollection is that brl
was added first, and then nop.x was added later, and when that happened,
we missed the fact that this string needed to change to also allow x
unit instructions.
I'd write the ChangeLog entry more like
Change "?imbf??" to "?ibmfxx".
which describes what changed, instead of why it was changed.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ia64 segfault on nop in X-slot of MLX bundle
2005-01-27 3:39 ` James E Wilson
@ 2005-01-27 19:55 ` James E Wilson
0 siblings, 0 replies; 3+ messages in thread
From: James E Wilson @ 2005-01-27 19:55 UTC (permalink / raw)
To: Jan Beulich; +Cc: binutils
On Wed, 2005-01-26 at 19:39, James E Wilson wrote:
> nop.x wasn't in the original architecture. My recollection is that brl
> was added first, and then nop.x was added later, and when that happened,
> we missed the fact that this string needed to change to also allow x
> unit instructions.
Actually, ignore this, I think it is wrong. It is true though that brl
wasn't in the original specification (and isn't implemented in hardware
on the Itanium1), but we did have movl and thus probably had nop.x from
the beginning. Anyways, the point here is that we never tried to
prevent nop.x from working, this was just a simple oversight.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-27 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24 10:35 [PATCH] ia64 segfault on nop in X-slot of MLX bundle Jan Beulich
2005-01-27 3:39 ` James E Wilson
2005-01-27 19:55 ` James E Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).