This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: VIA PadLock support


Alan Modra told me that:
On Thu, Mar 11, 2004 at 06:05:07PM +0100, Michal Ludvig wrote:

	* gas/config/tc-i386.c (output_insn): Handle PadLock instructions.
	* gas/config/tc-i386.h (CpuPadLock): New define.
	(CpuUnknownFlags): Added CpuPadLock.
	* include/opcode/i386.h (i386_optab): Added xstore/xcrypt insns.
	* opcodes/i386-dis.c (PADLOCK_SPECIAL, PADLOCK_0): New defines.
	(dis386_twobyte): Opcode 0xa7 is PADLOCK_0.
	(padlock_table): New struct with PadLock instructions.
	(print_insn): Handle PADLOCK_SPECIAL.


OK, with one or two more formatting/style fixes.  OK for 2.15 branch
too.

Thanks! Fixed the style and comitted.


I have two more bits for approval: add 'xstore' insn as an alias for 'xstorerng' and a testsuite for these new instructions.

Both are attached. OK to apply?

Michal Ludvig
--
SUSE Labs                    mludvig@suse.cz | Cray is the only computer
(+420) 296.545.373        http://www.suse.cz | that runs an endless loop
Personal homepage http://www.logix.cz/michal | in just four hours.
Index: include/opcode/ChangeLog
===================================================================
RCS file: /cvs/src/src/include/opcode/ChangeLog,v
retrieving revision 1.233
diff -u -p -r1.233 ChangeLog
--- include/opcode/ChangeLog	12 Mar 2004 10:14:29 -0000	1.233
+++ include/opcode/ChangeLog	12 Mar 2004 10:30:50 -0000
@@ -1,5 +1,9 @@
 2004-03-12  Michal Ludvig  <mludvig@suse.cz>
 
+	* i386.h (i386_optab): Added xstore as an alias for xstorerng.
+
+2004-03-12  Michal Ludvig  <mludvig@suse.cz>
+
 	* i386.h (i386_optab): Added xstore/xcrypt insns.
 
 2004-02-09  Anil Paranjpe  <anilp1@KPITCummins.com>
Index: include/opcode/i386.h
===================================================================
RCS file: /cvs/src/src/include/opcode/i386.h,v
retrieving revision 1.41
diff -u -p -r1.41 i386.h
--- include/opcode/i386.h	12 Mar 2004 10:14:29 -0000	1.41
+++ include/opcode/i386.h	12 Mar 2004 10:30:51 -0000
@@ -1367,6 +1367,8 @@ static const template i386_optab[] = {
 {"xcryptcbc", 0, 0xf30fa7d0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
 {"xcryptcfb", 0, 0xf30fa7e0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
 {"xcryptofb", 0, 0xf30fa7e8, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
+/* alias for xstorerng */
+{"xstore", 0, 0x0fa7c0, X, Cpu686|CpuPadLock, NoSuf|IsString, { 0, 0, 0} },
 
 /* sentinel */
 {NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
Index: gas/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/testsuite/ChangeLog,v
retrieving revision 1.615
diff -u -p -r1.615 ChangeLog
--- gas/testsuite/ChangeLog	12 Mar 2004 07:01:36 -0000	1.615
+++ gas/testsuite/ChangeLog	12 Mar 2004 10:29:03 -0000
@@ -1,3 +1,9 @@
+2004-03-12  Michal Ludvig  <mludvig@suse.cz>
+
+	* gas/i386/padlock.s, gas/i386/padlock.d: New tests for 
+	VIA PadLock instructions.
+	* gas/i386/i386.exp: Run padlock tests.
+
 2004-03-12  Alan Modra  <amodra@bigpond.net.au>
 
 	* gas/i386/katmai.d: Adjust for clflush change.
Index: gas/testsuite/gas/i386/i386.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/i386/i386.exp,v
retrieving revision 1.20
diff -u -p -r1.20 i386.exp
--- gas/testsuite/gas/i386/i386.exp	22 Nov 2003 04:47:17 -0000	1.20
+++ gas/testsuite/gas/i386/i386.exp	12 Mar 2004 10:29:04 -0000
@@ -58,6 +58,7 @@ if [expr ([istarget "i*86-*-*"] ||  [ist
     run_dump_test "sub"
     run_dump_test "prescott"
     run_dump_test "divide"
+    run_dump_test "padlock"
 
     # PIC is only supported on ELF targets.
     if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"] )
Index: gas/testsuite/gas/i386/padlock.d
===================================================================
RCS file: gas/testsuite/gas/i386/padlock.d
diff -N gas/testsuite/gas/i386/padlock.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/i386/padlock.d	12 Mar 2004 10:29:04 -0000
@@ -0,0 +1,20 @@
+#objdump: -dw
+#name: i386 padlock
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <foo>:
+   0:[	 ]*0f a7 c0 [	 ]*xstorerng 
+   3:[	 ]*f3 0f a7 c0 [	 ]*repz xstorerng 
+   7:[	 ]*f3 0f a7 c8 [	 ]*repz xcryptecb 
+   b:[	 ]*f3 0f a7 c8 [	 ]*repz xcryptecb 
+   f:[	 ]*f3 0f a7 d0 [	 ]*repz xcryptcbc 
+  13:[	 ]*f3 0f a7 d0 [	 ]*repz xcryptcbc 
+  17:[	 ]*f3 0f a7 e0 [	 ]*repz xcryptcfb 
+  1b:[	 ]*f3 0f a7 e0 [	 ]*repz xcryptcfb 
+  1f:[	 ]*f3 0f a7 e8 [	 ]*repz xcryptofb 
+  23:[	 ]*f3 0f a7 e8 [	 ]*repz xcryptofb 
+  27:[	 ]*0f a7 c0 [	 ]*xstorerng 
+  2a:[	 ]*f3 0f a7 c0 [	 ]*repz xstorerng 
Index: gas/testsuite/gas/i386/padlock.s
===================================================================
RCS file: gas/testsuite/gas/i386/padlock.s
diff -N gas/testsuite/gas/i386/padlock.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/i386/padlock.s	12 Mar 2004 10:29:04 -0000
@@ -0,0 +1,16 @@
+# VIA Nehemiah PadLock instructions
+
+	.text
+foo:
+	xstorerng
+	rep xstorerng
+	xcryptecb
+	rep xcryptecb
+	xcryptcbc
+	rep xcryptcbc
+	xcryptcfb
+	rep xcryptcfb
+	xcryptofb
+	rep xcryptofb
+	xstore
+	rep xstore

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]