aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-02-12 16:42:49 +0000
committerJan Hubicka <jh@suse.cz>2001-02-12 16:42:49 +0000
commit76f227a511409df74d5e65573b7707970037b1ce (patch)
treeac1cca14057ac9815cd8b4e7c79768c76bc4a37c
parentb1e2e654ad11d228622a53657b21b9f153c223b9 (diff)
downloadgdb-76f227a511409df74d5e65573b7707970037b1ce.zip
gdb-76f227a511409df74d5e65573b7707970037b1ce.tar.gz
gdb-76f227a511409df74d5e65573b7707970037b1ce.tar.bz2
* i386.h (i386_optab): SSE integer converison instructions have
64bit versions on x86-64. * i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison instructions. (putop): Handle 'Y'
-rw-r--r--include/opcode/ChangeLog5
-rw-r--r--include/opcode/i386.h12
-rw-r--r--opcodes/ChangeLog8
-rw-r--r--opcodes/i386-dis.c22
4 files changed, 34 insertions, 13 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 798fd21..66c3875 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb 12 17:40:54 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (i386_optab): SSE integer converison instructions have
+ 64bit versions on x86-64.
+
2001-02-10 Nick Clifton <nickc@redhat.com>
* mips.h: Remove extraneous whitespace. Formating change to allow
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
index 07124c4..2ab783e 100644
--- a/include/opcode/i386.h
+++ b/include/opcode/i386.h
@@ -1112,10 +1112,10 @@ static const template i386_optab[] = {
{"comiss", 2, 0x0f2f, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
{"cvtpi2ps", 2, 0x0f2a, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
{"cvtps2pi", 2, 0x0f2d, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtsi2ss", 2, 0xf30f2a, X, CpuSSE, FP|Modrm, { Reg32|WordMem, RegXMM, 0 } },
-{"cvtss2si", 2, 0xf30f2d, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
+{"cvtsi2ss", 2, 0xf30f2a, X, CpuSSE, lq_Suf|IgnoreSize|Modrm,{ Reg32|Reg64|WordMem|LLongMem, RegXMM, 0 } },
+{"cvtss2si", 2, 0xf30f2d, X, CpuSSE, lq_Suf|IgnoreSize|Modrm,{ RegXMM|WordMem, Reg32|Reg64, 0 } },
{"cvttps2pi", 2, 0x0f2c, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttss2si", 2, 0xf30f2c, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
+{"cvttss2si", 2, 0xf30f2c, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegXMM|WordMem, Reg32|Reg64, 0 } },
{"divps", 2, 0x0f5e, X, CpuSSE, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"divss", 2, 0xf30f5e, X, CpuSSE, FP|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
{"ldmxcsr", 1, 0x0fae, 2, CpuSSE, FP|Modrm, { WordMem, 0, 0 } },
@@ -1212,7 +1212,7 @@ static const template i386_optab[] = {
{"cmpsd", 3, 0xf20fc2, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LongMem, RegXMM } },
{"comisd", 2, 0x660f2f, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
{"cvtpi2pd", 2, 0x660f2a, X, CpuSSE2, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtsi2sd", 2, 0xf20f2a, X, CpuSSE2, FP|Modrm, { Reg32|LongMem, RegXMM, 0 } },
+{"cvtsi2sd", 2, 0xf20f2a, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ Reg32|Reg64|WordMem|LLongMem, RegXMM, 0 } },
{"divpd", 2, 0x660f5e, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"divsd", 2, 0xf20f5e, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
{"maxpd", 2, 0x660f5f, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
@@ -1250,11 +1250,11 @@ static const template i386_optab[] = {
{"cvtpd2ps", 2, 0x660f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"cvtps2pd", 2, 0x0f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"cvtps2dq", 2, 0x660f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtsd2si", 2, 0xf20f2d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, Reg32, 0 } },
+{"cvtsd2si", 2, 0xf20f2d, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|LLongMem, Reg32|Reg64, 0 } },
{"cvtsd2ss", 2, 0xf20f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"cvtss2sd", 2, 0xf30f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"cvttpd2pi", 2, 0x660f2c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttsd2si", 2, 0xf20f2c, X, CpuSSE2, FP|Modrm, { RegXMM|WordMem, Reg32, 0 } },
+{"cvttsd2si", 2, 0xf20f2c, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|WordMem, Reg32|Reg64, 0 } },
{"cvttpd2dq", 2, 0x660fe6, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"cvttps2dq", 2, 0xf30f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
{"maskmovdqu",2, 0x660ff7, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM, 0 } },
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index dfca2e9..ddb55e2 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,9 @@
+Mon Feb 12 17:41:26 CET 2001 Jan Hubicka <jh@suse.cz>
+
+ * i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison
+ instructions.
+ (putop): Handle 'Y'
+
2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* mips-dis.c (print_insn_arg): Use top four bits of the address of
@@ -33,7 +39,7 @@
Thu Feb 1 16:29:06 MET 2001 Jan Hubicka <jh@suse.cz>
- * (dis386_att, grps): Use 'T' for push/pop
+ * i386-dis.c (dis386_att, grps): Use 'T' for push/pop
(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
2001-01-14 Alan Modra <alan@linuxcare.com.au>
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 90794c0..c3f33bc 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -439,6 +439,7 @@ struct dis386 {
'T' => print 'q' in 64bit mode and behave as 'I' otherwise
'X' => print 's', 'd' depending on data16 prefix (for XMM)
'W' => print 'b' or 'w' ("w" or "de" in intel mode)
+ 'Y' => 'q' if instruction has an REX 64bit overwrite prefix
*/
static const struct dis386 dis386_att[] = {
@@ -2578,23 +2579,23 @@ static const struct dis386 prefix_user_table[][4] = {
/* PREGRP2 */
{
{ "cvtpi2ps", XM, EM, XX },
- { "cvtsi2ss", XM, Ev, XX },
+ { "cvtsi2ssY", XM, Ev, XX },
{ "cvtpi2pd", XM, EM, XX },
- { "cvtsi2sd", XM, Ev, XX },
+ { "cvtsi2sdY", XM, Ev, XX },
},
/* PREGRP3 */
{
{ "cvtps2pi", MX, EX, XX },
- { "cvtss2si", Gv, EX, XX },
+ { "cvtss2siY", Gv, EX, XX },
{ "cvtpd2pi", MX, EX, XX },
- { "cvtsd2si", Gv, EX, XX },
+ { "cvtsd2siY", Gv, EX, XX },
},
/* PREGRP4 */
{
{ "cvttps2pi", MX, EX, XX },
- { "cvttss2si", Gv, EX, XX },
+ { "cvttss2siY", Gv, EX, XX },
{ "cvttpd2pi", MX, EX, XX },
- { "cvttsd2si", Gv, EX, XX },
+ { "cvttsd2siY", Gv, EX, XX },
},
/* PREGRP5 */
{
@@ -3850,6 +3851,15 @@ putop (template, sizeflag)
*obufp++ = 's';
used_prefixes |= (prefixes & PREFIX_DATA);
break;
+ case 'Y':
+ if (intel_syntax)
+ break;
+ if (rex & REX_MODE64)
+ {
+ USED_REX (REX_MODE64);
+ *obufp++ = 'q';
+ }
+ break;
/* implicit operand size 'l' for i386 or 'q' for x86-64 */
case 'W':
/* operand size flag for cwtl, cbtw */