summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-22 06:02:31 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-22 06:02:31 +0000
commit4d8bc811506292938ab66120e51c9810e1d21c3d (patch)
treeee5b509cccc686ac5f95cdebd4afa599bdb71cf8
parentc911d5c907edcaf80792be1abac0262439fd9082 (diff)
downloadelfutils-4d8bc811506292938ab66120e51c9810e1d21c3d.tar.gz
propagate from branch 'com.redhat.elfutils.roland.pending' (head 6b4ecd4bacd23aaea4922adc10aab7908c45d23e)
to branch 'com.redhat.elfutils' (head 80a9de86977a1031c60888fe4072688434a961be)
-rw-r--r--libcpu/ChangeLog3
-rw-r--r--libcpu/defs/i3862
-rw-r--r--libcpu/i386_disasm.c10
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/testfile45.S.bz2bin22739 -> 22725 bytes
-rw-r--r--tests/testfile45.expect.bz2bin75022 -> 75086 bytes
6 files changed, 19 insertions, 1 deletions
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 4b225af8..ff642de1 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,5 +1,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
+ * defs/i386: Fix typo in comment.
+ * i386_disasm.c (i386_disasm): Handle cltq, cqto.
+
* i386_parse.y: Add sanity check for NMNES macro value.
* Makefile.am (i386_parse.o): Fix target in dependency rule.
(i386_parse.h): New target with empty commands.
diff --git a/libcpu/defs/i386 b/libcpu/defs/i386
index 1b4bbb4a..4abbc261 100644
--- a/libcpu/defs/i386
+++ b/libcpu/defs/i386
@@ -116,7 +116,7 @@ ifdef(`i386',
11111111,{mod}011{64r_m}:lcall{W} *{mod}{64r_m}
# SPECIAL 10011000:[{rex.w}?cltq:{dpfx}?cbtw:cwtl]
10011000:INVALID
-# SPECIAL 10011001:[{rew.w}?cqto:{dpfx}?cltd:cwtd]
+# SPECIAL 10011001:[{rex.w}?cqto:{dpfx}?cltd:cwtd]
10011001:INVALID
11111000:clc
11111100:cld
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
index d8bcf9b3..9024571c 100644
--- a/libcpu/i386_disasm.c
+++ b/libcpu/i386_disasm.c
@@ -589,12 +589,22 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
#endif
case 0x98:
+ if (prefixes == (has_rex_w | has_rex))
+ {
+ str = "cltq";
+ break;
+ }
if (prefixes & ~has_data16)
goto print_prefix;
str = prefixes & has_data16 ? "cbtw" : "cwtl";
break;
case 0x99:
+ if (prefixes == (has_rex_w | has_rex))
+ {
+ str = "cqto";
+ break;
+ }
if (prefixes & ~has_data16)
goto print_prefix;
str = prefixes & has_data16 ? "cwtd" : "cltd";
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 10417266..319b7849 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-21 Roland McGrath <roland@redhat.com>
+
+ * testfile45.S.bz2: Add tests for cltq, cqto.
+ * testfile45.expect.bz2: Adjust.
+
2008-01-14 Ulrich Drepper <drepper@redhat.com>
* testfile45.S.bz2: Add more tests.
diff --git a/tests/testfile45.S.bz2 b/tests/testfile45.S.bz2
index 2d44ed8f..91b47955 100644
--- a/tests/testfile45.S.bz2
+++ b/tests/testfile45.S.bz2
Binary files differ
diff --git a/tests/testfile45.expect.bz2 b/tests/testfile45.expect.bz2
index f571afd1..06b4d9bd 100644
--- a/tests/testfile45.expect.bz2
+++ b/tests/testfile45.expect.bz2
Binary files differ