public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: [RFC/RFA] Proper mnemonics for VIA PadLock (i386) instructions
@ 2005-04-13 12:29 Jan Beulich
  0 siblings, 0 replies; 15+ messages in thread
From: Jan Beulich @ 2005-04-13 12:29 UTC (permalink / raw)
  To: tg, binutils

>>> Thorsten Glaser <tg@66h.42h.de> 13.04.05 12:42:35 >>>
>Alan Modra dixit:
>
>>a high likelihood of breaking other valid assembly.  The gas app.c code
>>has a nasty habit of completely removing whitespace once past the
>>mnemonic of an instruction, and it can get confused.  Something like
>>
>> addr16 mov -2,%eax
>>
>>might fail if '-' is a valid mnemonic char.
>
>Can't gas be fixed, then? Sounds like the "obvious" thing to do to me.
>
>Alternatively, we'd need to make a way for a dash to be only
>recognised as part of a mnemonic if followed by a letter.

That wouldn't help either:

	.equiv two, 2
	movl -two(%ebx), %eax

would still fail.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [RFC/RFA] Proper mnemonics for VIA PadLock (i386) instructions
@ 2005-04-13 23:35 Marc Espie
  0 siblings, 0 replies; 15+ messages in thread
From: Marc Espie @ 2005-04-13 23:35 UTC (permalink / raw)
  To: binutils

H.J.Lu wrote:
> have the same concern as Alan. Unless ALL x86 assembly codes, open
> source or otherwise, not just those on OpenBSD, have been assembled
> correctly with the modified assembler, I don't think it should go into
> the FSF assembler.

We have something like >4G of source code between source, X, and ports
in OpenBSD. If that's not sufficient coverage, then I don't know what is.

Guys, OpenBSD is not a niche OS.  We compile a heck of a lot of stuff.

H.J., I also have a problem taking your statement seriously, considering
how often your patches break stuff that is not linux. Should we demand
that you test your patches on ALL OSes that use i386 before committing
a 386 change ?

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <s25d1e96.084@emea1-mh.id2.novell.com>]
* [RFC/RFA] Proper mnemonics for VIA PadLock (i386) instructions
@ 2005-04-12 19:15 Mark Kettenis
  2005-04-12 20:32 ` Michal Ludvig
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Kettenis @ 2005-04-12 19:15 UTC (permalink / raw)
  To: binutils; +Cc: mludvig

This one is a bit nasty.  The OpenBSD in-tree gas has had support for
the VIA PadLock instructions for a while.  Unfortunately that support
was never submitted for inclusion into the FSF tree.  A little over a
year ago Michal Ludvig committed support for these instructions.
Unfortunately he used mnemonics that differ from the instruction names
as used in the VIA documentation; the VIA names include a hyphen that
Michal left out.  I presume Michal did this because gas doesn't accept
hyphens in mnemonics.  That can be fixed though.  This patch does
that, and adds back the missing hyphen.  It also adds a missing
instruction that's going to be in the VIA cpu.

This patch keeps hyphen-less aliases for the instructions.  The gas
testsuite still passes with this patch applied.

OK?

Mark


Index: gas/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* config/tc-i386.c (md_begin): Allow hyphens in mnemonics.

Index: include/opcode/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386.h: Insert hyphens into selected VIA PadLock extensions.
	Add xcrypt-ctr.  Provide aliases without hyphens.

Index: opcodes/ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386-dis.c: Insert hyphens into selected VIA PadLock extensions.
	Add xcrypt-ctr.

Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.173
diff -u -p -r1.173 tc-i386.c
--- gas/config/tc-i386.c 12 Apr 2005 17:12:33 -0000 1.173
+++ gas/config/tc-i386.c 12 Apr 2005 19:01:12 -0000
@@ -1008,6 +1008,7 @@ md_begin ()
     operand_chars['?'] = '?';
 #endif
     digit_chars['-'] = '-';
+    mnemonic_chars['-'] = '-';
     identifier_chars['_'] = '_';
     identifier_chars['.'] = '.';
Index: include/opcode/i386.h
===================================================================
RCS file: /cvs/src/src/include/opcode/i386.h,v
retrieving revision 1.56
diff -u -p -r1.56 i386.h
--- include/opcode/i386.h 12 Apr 2005 17:12:30 -0000 1.56
+++ include/opcode/i386.h 12 Apr 2005 19:01:16 -0000
@@ -1378,15 +1378,23 @@ static const template i386_optab[] =
 {"rdtscp",   0, 0x0f01, 0xf9, CpuSledgehammer,NoSuf|ImmExt,	{ 0, 0, 0} },
 
 /* VIA PadLock extensions.  */
+{"xstore-rng",0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcrypt-ecb",0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcrypt-cbc",0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcrypt-ctr",0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcrypt-cfb",0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcrypt-ofb",0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"montmul",   0, 0xf30fa6, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xsha1",     0, 0xf30fa6, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xsha256",   0, 0xf30fa6, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+/* Aliases without hyphens.  */
 {"xstorerng", 0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
 {"xcryptecb", 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
 {"xcryptcbc", 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+{"xcryptctr", 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
 {"xcryptcfb", 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
 {"xcryptofb", 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"montmul",   0, 0xf30fa6, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xsha1",     0, 0xf30fa6, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xsha256",   0, 0xf30fa6, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-/* Alias for xstorerng.  */
+/* Alias for xstore-rng.  */
 {"xstore",    0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
 
 /* sentinel */
Index: opcodes/i386-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/i386-dis.c,v
retrieving revision 1.58
diff -u -p -r1.58 i386-dis.c
--- opcodes/i386-dis.c 1 Apr 2005 16:06:40 -0000 1.58
+++ opcodes/i386-dis.c 12 Apr 2005 19:01:19 -0000
@@ -1469,14 +1469,14 @@ static const struct dis386 grps[][8] = {
   },
   /* GRPPADLCK1 */
   {
-    { "xstorerng", OP_0f07, 0, XX, XX },
-    { "xcryptecb", OP_0f07, 0, XX, XX },
-    { "xcryptcbc", OP_0f07, 0, XX, XX },
-    { "(bad)",	   OP_0f07, 0, XX, XX },
-    { "xcryptcfb", OP_0f07, 0, XX, XX },
-    { "xcryptofb", OP_0f07, 0, XX, XX },
-    { "(bad)",	   OP_0f07, 0, XX, XX },
-    { "(bad)",	   OP_0f07, 0, XX, XX },
+    { "xstore-rng", OP_0f07, 0, XX, XX },
+    { "xcrypt-ecb", OP_0f07, 0, XX, XX },
+    { "xcrypt-cbc", OP_0f07, 0, XX, XX },
+    { "xcrypt-ctr", OP_0f07, 0, XX, XX },
+    { "xcrypt-cfb", OP_0f07, 0, XX, XX },
+    { "xcrypt-ofb", OP_0f07, 0, XX, XX },
+    { "(bad)",	OP_0f07, 0, XX, XX },
+    { "(bad)",	OP_0f07, 0, XX, XX },
   },
   /* GRPPADLCK2 */
   {

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-04-18 21:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-13 12:29 [RFC/RFA] Proper mnemonics for VIA PadLock (i386) instructions Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2005-04-13 23:35 Marc Espie
     [not found] <s25d1e96.084@emea1-mh.id2.novell.com>
2005-04-13 15:20 ` Thorsten Glaser
2005-04-14  1:26   ` Alan Modra
2005-04-16 11:40     ` Mark Kettenis
2005-04-18  4:44       ` Alan Modra
2005-04-18 21:01         ` Mark Kettenis
2005-04-12 19:15 Mark Kettenis
2005-04-12 20:32 ` Michal Ludvig
2005-04-12 20:43   ` Mark Kettenis
2005-04-13  0:38     ` Alan Modra
2005-04-13 10:43       ` Thorsten Glaser
2005-04-13 18:55       ` Mark Kettenis
2005-04-13 19:29         ` H. J. Lu
2005-04-13 19:51           ` Mark Kettenis

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).