You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(20) |
2
(19) |
3
(7) |
|
4
(13) |
5
(24) |
6
(9) |
7
(12) |
8
(8) |
9
(34) |
10
(28) |
|
11
(20) |
12
(23) |
13
(12) |
14
(10) |
15
(15) |
16
(24) |
17
(26) |
|
18
(17) |
19
(14) |
20
(14) |
21
(8) |
22
(12) |
23
(22) |
24
(10) |
|
25
(21) |
26
(21) |
27
(18) |
28
(8) |
29
(13) |
30
(15) |
|
|
From: Dirk M. <dm...@gm...> - 2007-11-06 23:37:05
|
On Tuesday 06 November 2007, sv...@va... wrote: > +/* Note there are a whole bunch of ugly double casts of the form > + (Word*)(void*)&p. These placate gcc at -O2. The obvious form > + (Word*)&p causes gcc to complain that 'dereferencing a type-punned > + pointer ill break strict-aliasing rules'. It stops complaining > + when the intermediate void* type is inserted. Is this a reasonable > + "fix"? I don't know. */ it is not... the only reasonable fix would be to fix that code or use -fno-strict-aliasing. the suppression of (Word*)(void*) is being fixed with newer gcc versions, so the issue is not really gone. and it *is* a real bug, gcc will exploit optimisation opportunities not in favour of the code in case it detects undefined behaviour. strict aliasing (basically) means that you're not allowed to access the same piece of memory via pointers that have a different type (except for the non-symmetrical char* exception). in this case I guess it is because Word* is not compatible with the pointer TC_(nextIterBag) expects. if you access the same memory once via Word* and once via some other pointer you're doomed to have random failure or gcc optimising the code in strange ways. a real workaround would be to copy the content into a new location (e.g. a local variable) and access that one via its type. Greetings, Dirk |
|
From: <sv...@va...> - 2007-11-06 22:47:43
|
Author: sewardj
Date: 2007-11-06 22:47:45 +0000 (Tue, 06 Nov 2007)
New Revision: 7105
Log:
Build at -O2, and insert lots of ugly casts to stop gcc complaining
about violations of strict aliasing rules. Whether these casts are
really a reasonable "solution" is another matter.
Modified:
branches/THRCHECK/thrcheck/Makefile.am
branches/THRCHECK/thrcheck/tc_main.c
branches/THRCHECK/thrcheck/tc_wordset.c
Modified: branches/THRCHECK/thrcheck/Makefile.am
===================================================================
--- branches/THRCHECK/thrcheck/Makefile.am 2007-11-06 22:00:35 UTC (rev 7104)
+++ branches/THRCHECK/thrcheck/Makefile.am 2007-11-06 22:47:45 UTC (rev 7105)
@@ -23,8 +23,7 @@
VGPRELOAD_THRCHECK_SOURCES_COMMON = tc_intercepts.c
vgpreload_thrcheck_x86_linux_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) \
- -fno-omit-frame-pointer
+vgpreload_thrcheck_x86_linux_so_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX) -O -g -fno-omit-frame-pointer
vgpreload_thrcheck_x86_linux_so_CFLAGS = $(AM_CFLAGS_X86_LINUX) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_x86_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_X86_LINUX)
vgpreload_thrcheck_x86_linux_so_LDFLAGS = \
@@ -32,7 +31,7 @@
$(LIBREPLACEMALLOC_LDFLAGS_X86_LINUX)
vgpreload_thrcheck_amd64_linux_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
+vgpreload_thrcheck_amd64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX) -O -g
vgpreload_thrcheck_amd64_linux_so_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_amd64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_AMD64_LINUX)
vgpreload_thrcheck_amd64_linux_so_LDFLAGS = \
@@ -40,7 +39,7 @@
$(LIBREPLACEMALLOC_LDFLAGS_AMD64_LINUX)
vgpreload_thrcheck_ppc32_linux_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
+vgpreload_thrcheck_ppc32_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX) -O -g
vgpreload_thrcheck_ppc32_linux_so_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_ppc32_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_LINUX)
vgpreload_thrcheck_ppc32_linux_so_LDFLAGS = \
@@ -48,7 +47,7 @@
$(LIBREPLACEMALLOC_LDFLAGS_PPC32_LINUX)
vgpreload_thrcheck_ppc64_linux_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
+vgpreload_thrcheck_ppc64_linux_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX) -O -g
vgpreload_thrcheck_ppc64_linux_so_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_ppc64_linux_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_LINUX)
vgpreload_thrcheck_ppc64_linux_so_LDFLAGS = \
@@ -56,7 +55,7 @@
$(LIBREPLACEMALLOC_LDFLAGS_PPC64_LINUX)
vgpreload_thrcheck_ppc32_aix5_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
+vgpreload_thrcheck_ppc32_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5) -O -g
vgpreload_thrcheck_ppc32_aix5_so_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_ppc32_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC32_AIX5)
vgpreload_thrcheck_ppc32_aix5_so_LDFLAGS = \
@@ -64,7 +63,7 @@
$(LIBREPLACEMALLOC_LDFLAGS_PPC32_AIX5)
vgpreload_thrcheck_ppc64_aix5_so_SOURCES = $(VGPRELOAD_THRCHECK_SOURCES_COMMON)
-vgpreload_thrcheck_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
+vgpreload_thrcheck_ppc64_aix5_so_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5) -O -g
vgpreload_thrcheck_ppc64_aix5_so_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) $(AM_CFLAGS_PIC)
vgpreload_thrcheck_ppc64_aix5_so_DEPENDENCIES = $(LIBREPLACEMALLOC_PPC64_AIX5)
vgpreload_thrcheck_ppc64_aix5_so_LDFLAGS = \
@@ -75,42 +74,42 @@
thrcheck_x86_linux_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
-thrcheck_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -fomit-frame-pointer
+thrcheck_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2
thrcheck_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
thrcheck_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
thrcheck_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
thrcheck_amd64_linux_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
-thrcheck_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX)
+thrcheck_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2
thrcheck_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
thrcheck_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
thrcheck_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
thrcheck_ppc32_linux_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
-thrcheck_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX)
+thrcheck_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2
thrcheck_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
thrcheck_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
thrcheck_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)
thrcheck_ppc64_linux_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
-thrcheck_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX)
+thrcheck_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2
thrcheck_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
thrcheck_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX)
thrcheck_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX)
thrcheck_ppc32_aix5_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
-thrcheck_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5)
+thrcheck_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2
thrcheck_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
thrcheck_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5)
thrcheck_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5)
thrcheck_ppc64_aix5_SOURCES = $(THRCHECK_SOURCES_COMMON)
thrcheck_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
-thrcheck_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5)
+thrcheck_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2
thrcheck_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
thrcheck_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5)
thrcheck_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5)
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-11-06 22:00:35 UTC (rev 7104)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-11-06 22:47:45 UTC (rev 7105)
@@ -59,6 +59,13 @@
/*--- ---*/
/*----------------------------------------------------------------*/
+/* Note there are a whole bunch of ugly double casts of the form
+ (Word*)(void*)&p. These placate gcc at -O2. The obvious form
+ (Word*)&p causes gcc to complain that 'dereferencing a type-punned
+ pointer ill break strict-aliasing rules'. It stops complaining
+ when the intermediate void* type is inserted. Is this a reasonable
+ "fix"? I don't know. */
+
// FIXME what is supposed to happen to locks in memory which
// is relocated as a result of client realloc?
@@ -623,7 +630,7 @@
Thread* thr;
Word count;
TC_(initIterBag)( bag );
- while (TC_(nextIterBag)( bag, (Word*)&thr, &count )) {
+ while (TC_(nextIterBag)( bag, (Word*)(void*)&thr, &count )) {
if (count < 1) return False;
if (!is_sane_Thread(thr)) return False;
}
@@ -818,7 +825,7 @@
}
/* for each thread that holds this lock do ... */
TC_(initIterBag)( lk->heldBy );
- while (TC_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) {
+ while (TC_(nextIterBag)( lk->heldBy, (Word*)(void*)&thr, NULL )) {
tl_assert(is_sane_Thread(thr));
tl_assert(TC_(elemWS)( univ_lsets,
thr->locksetA, (Word)lk ));
@@ -1100,7 +1107,7 @@
Word count;
VG_(printf)(" { ");
TC_(initIterBag)( lk->heldBy );
- while (TC_(nextIterBag)( lk->heldBy, (Word*)&thr, &count ))
+ while (TC_(nextIterBag)( lk->heldBy, (Word*)(void*)&thr, &count ))
VG_(printf)("%lu:%p ", count, thr);
TC_(doneIterBag)( lk->heldBy );
VG_(printf)("}");
@@ -1134,7 +1141,8 @@
space(d); VG_(printf)("map_locks (%d entries) {\n",
(Int)TC_(sizeFM)( map_locks ));
TC_(initIterFM)( map_locks );
- while (TC_(nextIterFM)( map_locks, (Word*)&gla, (Word*)&lk )) {
+ while (TC_(nextIterFM)( map_locks, (Word*)(void*)&gla,
+ (Word*)(void*)&lk )) {
space(d+3);
VG_(printf)("guest %p -> Lock %p\n", gla, lk);
}
@@ -1181,7 +1189,8 @@
space(d); VG_(printf)("map_segments (%d entries) {\n",
(Int)TC_(sizeFM)( map_segments ));
TC_(initIterFM)( map_segments );
- while (TC_(nextIterFM)( map_segments, (Word*)&segid, (Word*)&seg )) {
+ while (TC_(nextIterFM)( map_segments, (Word*)(void*)&segid,
+ (Word*)(void*)&seg )) {
space(d+3);
VG_(printf)("segid 0x%x -> Segment %p\n", (UInt)segid, seg);
}
@@ -1300,7 +1309,8 @@
SecMap* sm;
space(d); VG_(printf)("map_shmem_ShR_and_ShM_only {\n");
TC_(initIterFM)( map_shmem );
- while (TC_(nextIterFM)( map_shmem, (Word*)&ga, (Word*)&sm )) {
+ while (TC_(nextIterFM)( map_shmem, (Word*)(void*)&ga,
+ (Word*)(void*)&sm )) {
pp_SecMap_shared( d+3, sm, ga );
}
TC_(doneIterFM) ( map_shmem );
@@ -1511,7 +1521,8 @@
Bool found;
Lock* oldlock = NULL;
tl_assert(is_sane_ThreadId(tid));
- found = TC_(lookupFM)( map_locks, NULL, (Word*)&oldlock, (Word)ga );
+ found = TC_(lookupFM)( map_locks,
+ NULL, (Word*)(void*)&oldlock, (Word)ga );
if (!found) {
Lock* lock = mk_LockN(lkk, ga);
lock->appeared_at = VG_(record_ExeContext)( tid, 0 );
@@ -1535,7 +1546,7 @@
{
Bool found;
Lock* lk = NULL;
- found = TC_(lookupFM)( map_locks, NULL, (Word*)&lk, (Word)ga );
+ found = TC_(lookupFM)( map_locks, NULL, (Word*)(void*)&lk, (Word)ga );
tl_assert(found ? lk != NULL : lk == NULL);
if (found) {
// check the relevant secondary map has .mbHasLocks?
@@ -1548,7 +1559,8 @@
{
Addr ga2 = 0;
Lock* lk = NULL;
- TC_(delFromFM)( map_locks, (Word*)&ga2, (Word*)&lk, (Word)ga );
+ TC_(delFromFM)( map_locks,
+ (Word*)(void*)&ga2, (Word*)(void*)&lk, (Word)ga );
/* delFromFM produces the val which is being deleted, if it is
found. So assert it is non-null; that in effect asserts that we
are deleting a (ga, Lock) pair which actually exists. */
@@ -1571,7 +1583,8 @@
Bool found;
Segment* seg = NULL;
tl_assert( is_sane_SegmentID(segid) );
- found = TC_(lookupFM)( map_segments, NULL, (Word*)&seg, (Word)segid );
+ found = TC_(lookupFM)( map_segments,
+ NULL, (Word*)(void*)&seg, (Word)segid );
tl_assert(found);
tl_assert(seg != NULL);
return seg;
@@ -1582,7 +1595,8 @@
Bool found;
Segment* seg = NULL;
tl_assert( is_sane_SegmentID(segid) );
- found = TC_(lookupFM)( map_segments, NULL, (Word*)&seg, (Word)segid );
+ found = TC_(lookupFM)( map_segments,
+ NULL, (Word*)(void*)&seg, (Word)segid );
if (!found) tl_assert(seg == NULL);
return seg;
}
@@ -2332,7 +2346,7 @@
SecMap* sm = NULL;
Addr gaKey = shmem__round_to_SecMap_base(ga);
if (TC_(lookupFM)( map_shmem,
- NULL/*keyP*/, (Word*)&sm, (Word)gaKey )) {
+ NULL/*keyP*/, (Word*)(void*)&sm, (Word)gaKey )) {
/* Found; address of SecMap is in sm */
tl_assert(sm);
} else {
@@ -2353,7 +2367,8 @@
{
SecMap* sm;
Addr aKey = shmem__round_to_SecMap_base(a);
- if (TC_(lookupFM)( map_shmem, NULL/*keyP*/, (Word*)&sm, (Word)aKey )) {
+ if (TC_(lookupFM)( map_shmem,
+ NULL/*keyP*/, (Word*)(void*)&sm, (Word)aKey )) {
/* Found */
return sm->mbHasLocks;
} else {
@@ -2366,7 +2381,8 @@
SecMap* sm;
Addr aKey = shmem__round_to_SecMap_base(a);
tl_assert(b == False || b == True);
- if (TC_(lookupFM)( map_shmem, NULL/*keyP*/, (Word*)&sm, (Word)aKey )) {
+ if (TC_(lookupFM)( map_shmem,
+ NULL/*keyP*/, (Word*)(void*)&sm, (Word)aKey )) {
/* Found; address of SecMap is in sm */
} else {
/* create a new one */
@@ -2382,7 +2398,8 @@
SecMap* sm;
Addr aKey = shmem__round_to_SecMap_base(a);
tl_assert(b == False || b == True);
- if (TC_(lookupFM)( map_shmem, NULL/*keyP*/, (Word*)&sm, (Word)aKey )) {
+ if (TC_(lookupFM)( map_shmem,
+ NULL/*keyP*/, (Word*)(void*)&sm, (Word)aKey )) {
/* Found; address of SecMap is in sm */
} else {
/* create a new one */
@@ -2541,7 +2558,8 @@
// for each entry (gla, lk) in map_locks
// gla == lk->guest_addr
TC_(initIterFM)( map_locks );
- while (TC_(nextIterFM)( map_locks, (Word*)&gla, (Word*)&lk )) {
+ while (TC_(nextIterFM)( map_locks,
+ (Word*)(void*)&gla, (Word*)(void*)&lk )) {
if (lk->guestaddr != gla) BAD("2");
}
TC_(doneIterFM)( map_locks );
@@ -2563,7 +2581,8 @@
Thread* thr;
Word count;
TC_(initIterBag)( lk->heldBy );
- while (TC_(nextIterBag)( lk->heldBy, (Word*)&thr, &count )) {
+ while (TC_(nextIterBag)( lk->heldBy,
+ (Word*)(void*)&thr, &count )) {
// is_sane_LockN above ensures these
tl_assert(count >= 1);
tl_assert(is_sane_Thread(thr));
@@ -2653,7 +2672,8 @@
Addr* valid_tags;
TC_(initIterFM)( map_shmem );
// for sm in SecMaps {
- while (TC_(nextIterFM)( map_shmem, (Word*)&smga, (Word*)&sm )) {
+ while (TC_(nextIterFM)( map_shmem,
+ (Word*)(void*)&smga, (Word*)(void*)&sm )) {
SecMapIter itr;
UInt* w32p;
Bool mbHasShared = False;
@@ -2923,7 +2943,8 @@
{
ExeContext* ec_hint = NULL;
if (ga_to_lastlock != NULL
- && TC_(lookupFM)(ga_to_lastlock, NULL, (Word*)&ec_hint, ga)) {
+ && TC_(lookupFM)(ga_to_lastlock,
+ NULL, (Word*)(void*)&ec_hint, ga)) {
tl_assert(ec_hint != NULL);
return ec_hint;
} else {
@@ -4920,7 +4941,8 @@
/* FIXME: don't iterate over the complete lock set */
TC_(initIterFM)( map_locks );
- while (TC_(nextIterFM)( map_locks, (Word*)&gla, (Word*)&lk )) {
+ while (TC_(nextIterFM)( map_locks,
+ (Word*)(void*)&gla, (Word*)(void*)&lk )) {
tl_assert(is_sane_LockN(lk));
if (gla < firstA || gla > lastA)
continue;
@@ -4968,7 +4990,8 @@
UInt* w32p;
TC_(initIterFM)( map_shmem );
- while (TC_(nextIterFM)( map_shmem, (Word*)&ga, (Word*)&sm )) {
+ while (TC_(nextIterFM)( map_shmem,
+ (Word*)(void*)&ga, (Word*)(void*)&sm )) {
tl_assert(sm);
stats_SMs++;
/* Skip this SecMap if the summary bit indicates it is safe to
@@ -5631,7 +5654,8 @@
stats_SMs = stats_SMs_scanned = stats_reExcls = 0;
TC_(initIterFM)( map_shmem );
- while (TC_(nextIterFM)( map_shmem, (Word*)&ga, (Word*)&sm )) {
+ while (TC_(nextIterFM)( map_shmem,
+ (Word*)(void*)&ga, (Word*)(void*)&sm )) {
SecMapIter itr;
UInt* w32p;
tl_assert(sm);
@@ -6126,7 +6150,8 @@
edge back to it. */
signalling_seg = NULL;
found = TC_(lookupFM)( map_cond_to_Segment,
- NULL, (Word*)&signalling_seg, (Word)cond );
+ NULL, (Word*)(void*)&signalling_seg,
+ (Word)cond );
if (found) {
tl_assert(is_sane_Segment(signalling_seg));
tl_assert(new_seg->prev);
@@ -6321,7 +6346,7 @@
tl_assert(seg);
map_sem_to_Segment_stack_INIT();
if (TC_(lookupFM)( map_sem_to_Segment_stack,
- NULL, (Word*)&xa, (Word)sem )) {
+ NULL, (Word*)(void*)&xa, (Word)sem )) {
tl_assert(xa);
VG_(addToXA)( xa, &seg );
} else {
@@ -6336,7 +6361,7 @@
Segment* seg;
map_sem_to_Segment_stack_INIT();
if (TC_(lookupFM)( map_sem_to_Segment_stack,
- NULL, (Word*)&xa, (Word)sem )) {
+ NULL, (Word*)(void*)&xa, (Word)sem )) {
/* xa is the stack for this semaphore. */
Word sz = VG_(sizeXA)( xa );
tl_assert(sz >= 0);
@@ -6544,7 +6569,8 @@
TC_(initIterFM)( laog );
me = NULL;
links = NULL;
- while (TC_(nextIterFM)( laog, (Word*)&me, (Word*)&links )) {
+ while (TC_(nextIterFM)( laog, (Word*)(void*)&me,
+ (Word*)(void*)&links )) {
tl_assert(me);
tl_assert(links);
VG_(printf)(" node %p:\n", me);
@@ -6581,7 +6607,7 @@
/* Update the out edges for src */
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)src )) {
WordSetID outs_new;
tl_assert(links);
tl_assert(keyW == (Word)src);
@@ -6597,7 +6623,7 @@
/* Update the in edges for dst */
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)dst )) {
WordSetID inns_new;
tl_assert(links);
tl_assert(keyW == (Word)dst);
@@ -6648,7 +6674,7 @@
/* Update the out edges for src */
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)src )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)src )) {
tl_assert(links);
tl_assert(keyW == (Word)src);
links->outs = TC_(delFromWS)( univ_laog, links->outs, (Word)dst );
@@ -6656,7 +6682,7 @@
/* Update the in edges for dst */
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)dst )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)dst )) {
tl_assert(links);
tl_assert(keyW == (Word)dst);
links->inns = TC_(delFromWS)( univ_laog, links->inns, (Word)src );
@@ -6669,7 +6695,7 @@
LAOGLinks* links;
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)lk )) {
tl_assert(links);
tl_assert(keyW == (Word)lk);
return links->outs;
@@ -6684,7 +6710,7 @@
LAOGLinks* links;
keyW = 0;
links = NULL;
- if (TC_(lookupFM)( laog, &keyW, (Word*)&links, (Word)lk )) {
+ if (TC_(lookupFM)( laog, &keyW, (Word*)(void*)&links, (Word)lk )) {
tl_assert(links);
tl_assert(keyW == (Word)lk);
return links->inns;
@@ -6705,7 +6731,8 @@
me = NULL;
links = NULL;
if (0) VG_(printf)("laog sanity check\n");
- while (TC_(nextIterFM)( laog, (Word*)&me, (Word*)&links )) {
+ while (TC_(nextIterFM)( laog, (Word*)(void*)&me,
+ (Word*)(void*)&links )) {
tl_assert(me);
tl_assert(links);
TC_(getPayloadWS)( &ws_words, &ws_size, univ_laog, links->inns );
@@ -6838,7 +6865,8 @@
key.src_ec = NULL;
key.dst_ec = NULL;
found = NULL;
- if (TC_(lookupFM)( laog_exposition, (Word*)&found, NULL, (Word)&key )) {
+ if (TC_(lookupFM)( laog_exposition,
+ (Word*)(void*)&found, NULL, (Word)&key )) {
tl_assert(found != &key);
tl_assert(found->src_ga == key.src_ga);
tl_assert(found->dst_ga == key.dst_ga);
@@ -7463,7 +7491,7 @@
(void*)args[1]);
map_pthread_t_to_Thread_INIT();
found = TC_(lookupFM)( map_pthread_t_to_Thread,
- NULL, (Word*)&thr_q, (Word)args[1] );
+ NULL, (Word*)(void*)&thr_q, (Word)args[1] );
/* Can this fail? It would mean that our pthread_join
wrapper observed a successful join on args[1] yet that
thread never existed (or at least, it never lodged an
@@ -7614,7 +7642,8 @@
string_table = TC_(newFM)( tc_zalloc, tc_free, string_table_cmp );
tl_assert(string_table);
}
- if (TC_(lookupFM)( string_table, NULL, (Word*)©, (Word)str )) {
+ if (TC_(lookupFM)( string_table,
+ NULL, (Word*)(void*)©, (Word)str )) {
tl_assert(copy);
if (0) VG_(printf)("string_table_strdup: %p -> %p\n", str, copy );
return copy;
@@ -7648,7 +7677,7 @@
yaWFM = TC_(newFM)( tc_zalloc, tc_free, lock_unique_cmp );
tl_assert(yaWFM);
}
- if (!TC_(lookupFM)( yaWFM, NULL, (Word*)&lkp, (Word)lkn)) {
+ if (!TC_(lookupFM)( yaWFM, NULL, (Word*)(void*)&lkp, (Word)lkn)) {
lkp = tc_zalloc( sizeof(Lock) );
*lkp = *lkn;
lkp->admin = NULL;
Modified: branches/THRCHECK/thrcheck/tc_wordset.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_wordset.c 2007-11-06 22:00:35 UTC (rev 7104)
+++ branches/THRCHECK/thrcheck/tc_wordset.c 2007-11-06 22:47:45 UTC (rev 7105)
@@ -281,7 +281,8 @@
causes failures on a 64-bit platform. */
tl_assert(wv_new->owner == wsu);
have = TC_(lookupFM)( wsu->vec2ix,
- (Word*)&wv_old, (Word*)&ix_old, (Word)wv_new );
+ (Word*)(void*)&wv_old, (Word*)&ix_old,
+ (Word)wv_new );
if (have) {
tl_assert(wv_old != wv_new);
tl_assert(wv_old);
|
|
From: <sv...@va...> - 2007-11-06 22:00:36
|
Author: sewardj
Date: 2007-11-06 22:00:35 +0000 (Tue, 06 Nov 2007)
New Revision: 7104
Log:
Test for decoding of some instructions with redundant REX.W bits in
their prefix.
Added:
trunk/none/tests/amd64/redundantRexW.c
trunk/none/tests/amd64/redundantRexW.stderr.exp
trunk/none/tests/amd64/redundantRexW.stdout.exp
trunk/none/tests/amd64/redundantRexW.vgtest
Modified:
trunk/none/tests/amd64/Makefile.am
Modified: trunk/none/tests/amd64/Makefile.am
===================================================================
--- trunk/none/tests/amd64/Makefile.am 2007-11-05 13:31:58 UTC (rev 7103)
+++ trunk/none/tests/amd64/Makefile.am 2007-11-06 22:00:35 UTC (rev 7104)
@@ -31,6 +31,8 @@
nibz_bennee_mmap.stderr.exp nibz_bennee_mmap.stdout.exp \
nibz_bennee_mmap.vgtest \
rcl-amd64.vgtest rcl-amd64.stdout.exp rcl-amd64.stderr.exp \
+ redundantRexW.vgtest redundantRexW.stdout.exp \
+ redundantRexW.stderr.exp \
smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
shrld.stderr.exp shrld.stdout.exp shrld.vgtest \
slahf-amd64.stderr.exp slahf-amd64.stdout.exp \
@@ -41,7 +43,9 @@
bug127521-64 bug132813-amd64 bug137714-amd64 bug132918 \
clc \
faultstatus fcmovnu fxtract $(INSN_TESTS) looper jrcxz \
- rcl-amd64 smc1 shrld \
+ rcl-amd64 \
+ redundantRexW \
+ smc1 shrld \
nibz_bennee_mmap \
slahf-amd64
Added: trunk/none/tests/amd64/redundantRexW.c
===================================================================
--- trunk/none/tests/amd64/redundantRexW.c (rev 0)
+++ trunk/none/tests/amd64/redundantRexW.c 2007-11-06 22:00:35 UTC (rev 7104)
@@ -0,0 +1,606 @@
+
+/* Test for a number of SSE instructions which were seen in the wild
+ with a bogus (irrelevant) REX.W bit in their prefixes. Some just
+ have REX = 0x48 where REX.W is irrelevant, hence the whole REX
+ prefix is pointless. Probably related to #133962. */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h> /* for memalign */
+#include <assert.h>
+
+typedef unsigned char UChar;
+
+typedef
+ struct { __attribute__((aligned(16))) UChar b[16]; }
+ UWord128;
+
+typedef
+ struct { UWord128 reg[16]; }
+ XMMRegs;
+
+typedef
+ struct { UWord128 dqw[5]; }
+ Mem;
+
+void pp_UWord128 ( UWord128* w ) {
+ int i;
+ char buf[3];
+ for (i = 15; i >= 0; i--) {
+ buf[2] = 0;
+ sprintf(buf, "%02x", (unsigned int)w->b[i]);
+ assert(buf[2] == 0);
+ if (buf[0] == '0') buf[0] = '.';
+ if (buf[1] == '0') buf[1] = '.';
+ printf("%s", buf);
+ }
+}
+
+void pp_XMMRegs ( char* who, XMMRegs* regs ) {
+ int i;
+ printf ("%s (xmms in order [15..0]) {\n", who );
+ for (i = 0; i < 16; i++) {
+ printf(" %%xmm%2d ", i);
+ pp_UWord128( ®s->reg[i] );
+ printf("\n");
+ }
+ printf("}\n");
+}
+
+void pp_Mem ( char* who, Mem* mem ) {
+ int i;
+ printf ("%s (dqws in order [15 .. 0]) {\n", who );
+ for (i = 0; i < 5; i++) {
+ printf(" [%d] ", i);
+ pp_UWord128( &mem->dqw[i] );
+ printf("\n");
+ }
+ printf("}\n");
+}
+
+void xor_UWord128( UWord128* src, UWord128* dst ) {
+ int i;
+ for (i = 0; i < 16; i++)
+ dst->b[i] ^= src->b[i];
+}
+void xor_XMMRegs ( XMMRegs* src, XMMRegs* dst ) {
+ int i;
+ for (i = 0; i < 16; i++)
+ xor_UWord128( &src->reg[i], &dst->reg[i] );
+}
+
+void xor_Mem ( Mem* src, Mem* dst ) {
+ int i;
+ for (i = 0; i < 5; i++)
+ xor_UWord128( &src->dqw[i], &dst->dqw[i] );
+}
+
+void setup_regs_mem ( XMMRegs* regs, Mem* mem ) {
+ int ctr, i, j;
+ ctr = 0;
+ for (i = 0; i < 16; i++) {
+ for (j = 0; j < 16; j++)
+ regs->reg[i].b[j] = 0x51 + (ctr++ % 7);
+ }
+ for (i = 0; i < 5; i++) {
+ for (j = 0; j < 16; j++)
+ mem->dqw[i].b[j] = 0x52 + (ctr++ % 13);
+ }
+}
+
+void before_test ( XMMRegs* regs, Mem* mem ) {
+ setup_regs_mem( regs, mem );
+}
+
+void after_test ( char* who, XMMRegs* regs, Mem* mem ) {
+ XMMRegs rdiff;
+ Mem mdiff;
+ setup_regs_mem( &rdiff, &mdiff );
+ xor_XMMRegs( regs, &rdiff );
+ xor_Mem( mem, &mdiff );
+ char s[128];
+ sprintf(s, "after \"%s\"", who );
+ pp_Mem( s, &mdiff );
+ pp_XMMRegs( s, &rdiff );
+ printf("\n");
+}
+
+#define LOAD_XMMREGS_from_r14 \
+ "\tmovupd 0(%%r14), %%xmm0\n" \
+ "\tmovupd 16(%%r14), %%xmm1\n" \
+ "\tmovupd 32(%%r14), %%xmm2\n" \
+ "\tmovupd 48(%%r14), %%xmm3\n" \
+ "\tmovupd 64(%%r14), %%xmm4\n" \
+ "\tmovupd 80(%%r14), %%xmm5\n" \
+ "\tmovupd 96(%%r14), %%xmm6\n" \
+ "\tmovupd 112(%%r14), %%xmm7\n" \
+ "\tmovupd 128(%%r14), %%xmm8\n" \
+ "\tmovupd 144(%%r14), %%xmm9\n" \
+ "\tmovupd 160(%%r14), %%xmm10\n" \
+ "\tmovupd 176(%%r14), %%xmm11\n" \
+ "\tmovupd 192(%%r14), %%xmm12\n" \
+ "\tmovupd 208(%%r14), %%xmm13\n" \
+ "\tmovupd 224(%%r14), %%xmm14\n" \
+ "\tmovupd 240(%%r14), %%xmm15\n"
+
+#define SAVE_XMMREGS_to_r14 \
+ "\tmovupd %%xmm0, 0(%%r14)\n" \
+ "\tmovupd %%xmm1, 16(%%r14)\n" \
+ "\tmovupd %%xmm2, 32(%%r14)\n" \
+ "\tmovupd %%xmm3, 48(%%r14)\n" \
+ "\tmovupd %%xmm4, 64(%%r14)\n" \
+ "\tmovupd %%xmm5, 80(%%r14)\n" \
+ "\tmovupd %%xmm6, 96(%%r14)\n" \
+ "\tmovupd %%xmm7, 112(%%r14)\n" \
+ "\tmovupd %%xmm8, 128(%%r14)\n" \
+ "\tmovupd %%xmm9, 144(%%r14)\n" \
+ "\tmovupd %%xmm10, 160(%%r14)\n" \
+ "\tmovupd %%xmm11, 176(%%r14)\n" \
+ "\tmovupd %%xmm12, 192(%%r14)\n" \
+ "\tmovupd %%xmm13, 208(%%r14)\n" \
+ "\tmovupd %%xmm14, 224(%%r14)\n" \
+ "\tmovupd %%xmm15, 240(%%r14)"
+
+#define XMMREGS \
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", \
+ "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"
+
+#if 0
+ /* Boilerplate for test */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rx\n"
+ "\t.byte 0x\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -x + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "x"
+ );
+ after_test( "", regs, mem );
+ }
+#endif
+
+int main ( void )
+{
+ XMMRegs* regs;
+ Mem* mem;
+ regs = memalign(16, sizeof(XMMRegs)); assert(regs);
+ mem = memalign(16, sizeof(Mem)); assert(mem);
+
+ /* Both have to be 16-aligned so we can do movapd et al */
+ assert( 0 == (0xFL & (unsigned long int)regs) );
+ assert( 0 == (0xFL & (unsigned long int)mem) );
+
+ /* addpd mem, reg 66 49 0f 58 48 00 rex.WB addpd 0x0(%r8),%xmm1 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r8\n"
+ "\t.byte 0x66,0x49,0x0f,0x58,0x48,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r8"
+ );
+ after_test( "rex.WB addpd 0x0(%r8),%xmm1", regs, mem );
+ }
+
+ /* addsd mem, reg f2 48 0f 58 27 rex.W addsd (%rdi),%xmm4 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0xf2,0x48,0x0f,0x58,0x27\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W addsd (%rdi),%xmm4", regs, mem );
+ }
+
+ /* movapd mem, reg 66 48 0f 28 0a rex.W movapd (%rdx),%xmm1 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdx\n"
+ "\t.byte 0x66,0x48,0x0f,0x28,0x0a\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdx"
+ );
+ after_test( "rex.W movapd (%rdx),%xmm1", regs, mem );
+ }
+
+ /* movapd reg, mem 66 48 0f 29 0a rex.W movapd %xmm1,(%rdx) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdx\n"
+ "\t.byte 0x66,0x48,0x0f,0x29,0x0a\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdx"
+ );
+ after_test( "rex.W movapd %xmm1,(%rdx)", regs, mem );
+ }
+
+ /* movaps mem, reg 48 0f 28 42 30 rex.W movaps 0x30(%rdx),%xmm0 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdx\n"
+ "\t.byte 0x48,0x0f,0x28,0x42,0x30\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0x30 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdx"
+ );
+ after_test( "movaps 0x30(%rdx),%xmm0", regs, mem );
+ }
+
+ /* movaps reg, mem 49 0f 29 48 00 rex.WB movaps %xmm1,0x0(%r8) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r8\n"
+ "\t.byte 0x49,0x0f,0x29,0x48,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r8"
+ );
+ after_test( "rex.WB movaps %xmm1,0x0(%r8)", regs, mem );
+ }
+
+ /* movddup mem, reg f2 48 0f 12 2a rex.W movddup (%rdx),%xmm5 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdx\n"
+ "\t.byte 0xf2,0x48,0x0f,0x12,0x2a\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdx"
+ );
+ after_test( "movddup (%rdx),%xmm5", regs, mem );
+ }
+
+ /* movhpd mem, reg 66 48 0f 16 06 rex.W movhpd (%rsi),%xmm0 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rsi\n"
+ "\t.byte 0x66,0x48,0x0f,0x16,0x06\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rsi"
+ );
+ after_test( "rex.W movhpd (%rsi),%xmm0", regs, mem );
+ }
+
+ /* movhpd reg, mem 66 48 0f 17 07 rex.W movhpd %xmm0,(%rdi) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0x66,0x48,0x0f,0x17,0x07\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W movhpd %xmm0,(%rdi)", regs, mem );
+ }
+
+ /* movhps mem, reg 48 0f 16 36 rex.W movhps (%rsi),%xmm6 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rsi\n"
+ "\t.byte 0x48,0x0f,0x16,0x36\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rsi"
+ );
+ after_test( "rex.W movhps (%rsi),%xmm6", regs, mem );
+ }
+ /* movhps reg, mem 49 0f 17 03 rex.WB movhps %xmm0,(%r11) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r11\n"
+ "\t.byte 0x49,0x0F,0x17,0x03\n" /* rex.WB movhps %xmm0,(%r11) */
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( 0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r11"
+ );
+ after_test( "rex.WB movhps %xmm0,(%r11)", regs, mem );
+ }
+
+ /* movlpd mem, reg 66 48 0f 12 4a 00 rex.W movlpd 0x0(%rdx),%xmm1 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdx\n"
+ "\t.byte 0x66,0x48,0x0f,0x12,0x4a,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdx"
+ );
+ after_test( "rex.W movlpd 0x0(%rdx),%xmm1", regs, mem );
+ }
+
+ /* movlpd reg, mem 66 48 0f 13 30 rex.W movlpd %xmm6,(%rax) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rax\n"
+ "\t.byte 0x66,0x48,0x0f,0x13,0x30\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rax"
+ );
+ after_test( "rex.W movlpd %xmm6,(%rax)", regs, mem );
+ }
+
+ /* movlps mem, reg 48 0f 12 07 rex.W movlps (%rdi),%xmm0 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0x48,0x0f,0x12,0x07\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W movlps (%rdi),%xmm0", regs, mem );
+ }
+
+ /* movlps reg, mem 49 0f 13 02 rex.WB movlps %xmm0,(%r10) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r10\n"
+ "\t.byte 0x49,0x0f,0x13,0x02\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r10"
+ );
+ after_test( "rex.WB movlps %xmm0,(%r10)", regs, mem );
+ }
+
+ /* movq mem, reg f3 48 0f 7e 00 rex.W movq (%rax),%xmm0 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rax\n"
+ "\t.byte 0xf3,0x48,0x0f,0x7e,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rax"
+ );
+ after_test( "rex.W movq (%rax),%xmm0", regs, mem );
+ }
+
+ /* movq reg, mem 66 48 0f d6 00 rex.W movq %xmm0,(%rax) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rax\n"
+ "\t.byte 0x66,0x48,0x0f,0xd6,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rax"
+ );
+ after_test( "rex.W movq %xmm0,(%rax)", regs, mem );
+ }
+
+ /* movsd mem, reg f2 48 0f 10 11 rex.W movsd (%rcx),%xmm2 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rcx\n"
+ "\t.byte 0xf2,0x48,0x0f,0x10,0x11\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rcx"
+ );
+ after_test( "rex.W movsd (%rcx),%xmm2", regs, mem );
+ }
+
+ /* movsd reg, mem f2 48 0f 11 3f rex.W movsd %xmm7,(%rdi) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0xf2,0x48,0x0f,0x11,0x3f\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W movsd %xmm7,(%rdi)", regs, mem );
+ }
+
+ /* movss mem, reg f3 48 0f 10 5e 04 rex.W movss 0x4(%rsi),%xmm3 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rsi\n"
+ "\t.byte 0xf3,0x48,0x0f,0x10,0x5e,0x04\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0x4 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rsi"
+ );
+ after_test( "rex.W movss 0x4(%rsi),%xmm3", regs, mem );
+ }
+
+ /* movupd reg, mem 66 48 0f 11 07 rex.W movupd %xmm0,(%rdi) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0x66,0x48,0x0f,0x11,0x07\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W movupd %xmm0,(%rdi)", regs, mem );
+ }
+
+ /* mulpd mem, reg 66 48 0f 59 61 00 rex.W mulpd 0x0(%rcx),%xmm4 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rcx\n"
+ "\t.byte 0x66,0x48,0x0f,0x59,0x61,0x00\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rcx"
+ );
+ after_test( "rex.W mulpd 0x0(%rcx),%xmm4", regs, mem );
+ }
+
+ /* mulsd mem, reg f2 48 0f 59 1f rex.W mulsd (%rdi),%xmm3 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%rdi\n"
+ "\t.byte 0xf2,0x48,0x0f,0x59,0x1f\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "rdi"
+ );
+ after_test( "rex.W mulsd (%rdi),%xmm3", regs, mem );
+ }
+
+ /* prefetchnt0 49 0f 18 4c f2 a0 rex.WB prefetcht0 -0x60(%r10,%rsi,8) */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r10\n"
+ "\txorq %%rsi, %%rsi\n"
+ "\t.byte 0x49,0x0f,0x18,0x4c,0xf2,0xa0\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( - -0x60 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r10","rsi"
+ );
+ after_test( "rex.WB prefetcht0 -0x60(%r10,%rsi,8)", regs, mem );
+ }
+
+ /* subsd mem, reg f2 49 0f 5c 4d f8 rex.WB subsd -0x8(%r13),%xmm1 */
+ {
+ before_test( regs, mem );
+ __asm__ __volatile__(
+ "movq %0, %%r14\n"
+ "\tmovq %1, %%r15\n"
+ LOAD_XMMREGS_from_r14
+ "\tmovq %%r15, %%r13\n"
+ "\t.byte 0xf2,0x49,0x0f,0x5c,0x4d,0xf8\n"
+ SAVE_XMMREGS_to_r14
+ : /*out*/ : /*in*/ "r"(regs), "r"( - -0x8 + (char*)&mem->dqw[2] )
+ : /*trash*/ "r14","r15","memory", XMMREGS,
+ "r13"
+ );
+ after_test( "rex.WB subsd -0x8(%r13),%xmm1", regs, mem );
+ }
+
+ free(regs);
+ free(mem);
+ return 0;
+}
Added: trunk/none/tests/amd64/redundantRexW.stderr.exp
===================================================================
--- trunk/none/tests/amd64/redundantRexW.stderr.exp (rev 0)
+++ trunk/none/tests/amd64/redundantRexW.stderr.exp 2007-11-06 22:00:35 UTC (rev 7104)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/amd64/redundantRexW.stdout.exp
===================================================================
--- trunk/none/tests/amd64/redundantRexW.stdout.exp (rev 0)
+++ trunk/none/tests/amd64/redundantRexW.stdout.exp 2007-11-06 22:00:35 UTC (rev 7104)
@@ -0,0 +1,650 @@
+after "rex.WB addpd 0x0(%r8),%xmm1" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB addpd 0x0(%r8),%xmm1" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 .2.6.6.2.527faf9.8.8.8.f.1.3.1.7
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W addsd (%rdi),%xmm4" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W addsd (%rdi),%xmm4" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 .................9.b.e.e.2.2.6.6
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movapd (%rdx),%xmm1" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movapd (%rdx),%xmm1" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 .2.6.6.2.5.8.8.8.8.8.8.f.1.3.1.7
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movapd %xmm1,(%rdx)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .2.6.6.2.5.8.8.8.8.8.8.f.1.3.1.7
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movapd %xmm1,(%rdx)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "movaps 0x30(%rdx),%xmm0" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "movaps 0x30(%rdx),%xmm0" (xmms in order [15..0]) {
+ %xmm 0 .4.4.3.5.7.a.e.e.a.d.f.d.3.5.7.5
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.WB movaps %xmm1,0x0(%r8)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .2.6.6.2.5.8.8.8.8.8.8.f.1.3.1.7
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB movaps %xmm1,0x0(%r8)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "movddup (%rdx),%xmm5" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "movddup (%rdx),%xmm5" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 .e.e.a.a.6.1.3.1.f.9.b.9........
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movhpd (%rsi),%xmm0" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movhpd (%rsi),%xmm0" (xmms in order [15..0]) {
+ %xmm 0 .9.b.e.e.2.2.6.6................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movhpd %xmm0,(%rdi)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................9.b.e.e.2.2.6.6
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movhpd %xmm0,(%rdi)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movhps (%rsi),%xmm6" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movhps (%rsi),%xmm6" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 .c.c.c.c.4.4.4.3................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.WB movhps %xmm0,(%r11)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................9.b.e.e.2.2.6.6
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB movhps %xmm0,(%r11)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movlpd 0x0(%rdx),%xmm1" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movlpd 0x0(%rdx),%xmm1" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 .................8.8.8.f.1.3.1.7
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movlpd %xmm6,(%rax)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................d.f.d.b.5.7.2.2
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movlpd %xmm6,(%rax)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movlps (%rdi),%xmm0" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movlps (%rdi),%xmm0" (xmms in order [15..0]) {
+ %xmm 0 .................a.d.f.d.3.5.7.5
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.WB movlps %xmm0,(%r10)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................a.d.f.d.3.5.7.5
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB movlps %xmm0,(%r10)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movq (%rax),%xmm0" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movq (%rax),%xmm0" (xmms in order [15..0]) {
+ %xmm 0 5251575655545352.a.d.f.d.3.5.7.5
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movq %xmm0,(%rax)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................a.d.f.d.3.5.7.5
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movq %xmm0,(%rax)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movsd (%rcx),%xmm2" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movsd (%rcx),%xmm2" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 5655545352515756.e.e.a.a.6.1.3.1
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movsd %xmm7,(%rdi)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .................a.d.f.d.3.5.7.5
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movsd %xmm7,(%rdi)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movss 0x4(%rsi),%xmm3" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movss 0x4(%rsi),%xmm3" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 515756555453525157565554.4.4.4.3
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W movupd %xmm0,(%rdi)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] .4.4.3.5.7.a.e.e.a.d.f.d.3.5.7.5
+ [3] ................................
+ [4] ................................
+}
+after "rex.W movupd %xmm0,(%rdi)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W mulpd 0x0(%rcx),%xmm4" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W mulpd 0x0(%rcx),%xmm4" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 3aea3a1a464262b33fedd9978cb2aa72
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.W mulsd (%rdi),%xmm3" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.W mulsd (%rdi),%xmm3" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................259436fb2e849319
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.WB prefetcht0 -0x60(%r10,%rsi,8)" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB prefetcht0 -0x60(%r10,%rsi,8)" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................................
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
+after "rex.WB subsd -0x8(%r13),%xmm1" (dqws in order [15 .. 0]) {
+ [0] ................................
+ [1] ................................
+ [2] ................................
+ [3] ................................
+ [4] ................................
+}
+after "rex.WB subsd -0x8(%r13),%xmm1" (xmms in order [15..0]) {
+ %xmm 0 ................................
+ %xmm 1 ................88.8.8.f.1.3.1.7
+ %xmm 2 ................................
+ %xmm 3 ................................
+ %xmm 4 ................................
+ %xmm 5 ................................
+ %xmm 6 ................................
+ %xmm 7 ................................
+ %xmm 8 ................................
+ %xmm 9 ................................
+ %xmm10 ................................
+ %xmm11 ................................
+ %xmm12 ................................
+ %xmm13 ................................
+ %xmm14 ................................
+ %xmm15 ................................
+}
+
Added: trunk/none/tests/amd64/redundantRexW.vgtest
===================================================================
--- trunk/none/tests/amd64/redundantRexW.vgtest (rev 0)
+++ trunk/none/tests/amd64/redundantRexW.vgtest 2007-11-06 22:00:35 UTC (rev 7104)
@@ -0,0 +1 @@
+prog: redundantRexW
|
|
From: <sv...@va...> - 2007-11-06 20:39:21
|
Author: sewardj
Date: 2007-11-06 20:39:17 +0000 (Tue, 06 Nov 2007)
New Revision: 1792
Log:
Accept some apparently redundant REX.W prefixes seen on code in the
wild. Quite possibly fixes #133962.
Modified:
trunk/priv/guest-amd64/toIR.c
Modified: trunk/priv/guest-amd64/toIR.c
===================================================================
--- trunk/priv/guest-amd64/toIR.c 2007-09-26 22:50:27 UTC (rev 1791)
+++ trunk/priv/guest-amd64/toIR.c 2007-11-06 20:39:17 UTC (rev 1792)
@@ -8979,7 +8979,8 @@
/* 0F 28 = MOVAPS -- move from E (mem or xmm) to G (xmm). */
/* 0F 10 = MOVUPS -- move from E (mem or xmm) to G (xmm). */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && (insn[1] == 0x28 || insn[1] == 0x10)) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -9001,7 +9002,8 @@
/* 0F 29 = MOVAPS -- move from G (xmm) to E (mem or xmm). */
/* 0F 11 = MOVUPS -- move from G (xmm) to E (mem or xmm). */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && (insn[1] == 0x29 || insn[1] == 0x11)) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -9018,7 +9020,8 @@
/* 0F 16 = MOVHPS -- move from mem to high half of XMM. */
/* 0F 16 = MOVLHPS -- move from lo half to hi half of XMM. */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x16) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -9039,7 +9042,8 @@
}
/* 0F 17 = MOVHPS -- move from high half of XMM to mem. */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x17) {
if (!epartIsReg(insn[2])) {
delta += 2;
@@ -9057,7 +9061,8 @@
/* 0F 12 = MOVLPS -- move from mem to low half of XMM. */
/* OF 12 = MOVHLPS -- from from hi half to lo half of XMM. */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x12) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -9079,7 +9084,8 @@
}
/* 0F 13 = MOVLPS -- move from low half of XMM to mem. */
- if (haveNo66noF2noF3(pfx) && sz == 4
+ if (haveNo66noF2noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x13) {
if (!epartIsReg(insn[2])) {
delta += 2;
@@ -9101,8 +9107,22 @@
&& insn[0] == 0x0F && insn[1] == 0x50) {
/* sz == 8 is a kludge to handle insns with REX.W redundantly
set to 1, which has been known to happen:
+
4c 0f 50 d9 rex64X movmskps %xmm1,%r11d
- */
+
+ 20071106: Intel docs say that REX.W isn't redundant: when
+ present, a 64-bit register is written; when not present, only
+ the 32-bit half is written. However, testing on a Core2
+ machine suggests the entire 64 bit register is written
+ irrespective of the status of REX.W. That could be because
+ of the default rule that says "if the lower half of a 32-bit
+ register is written, the upper half is zeroed". By using
+ putIReg32 here we inadvertantly produce the same behaviour as
+ the Core2, for the same reason -- putIReg32 implements said
+ rule.
+
+ AMD docs give no indication that REX.W is even valid for this
+ insn. */
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
Int src;
@@ -9179,7 +9199,8 @@
/* F3 0F 10 = MOVSS -- move 32 bits from E (mem or lo 1/4 xmm) to G
(lo 1/4 xmm). If E is mem, upper 3/4 of G is zeroed out. */
- if (haveF3no66noF2(pfx) && sz == 4
+ if (haveF3no66noF2(pfx)
+ && (sz == 4|| /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x10) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -9703,15 +9724,17 @@
/* ---------------------------------------------------- */
/* 66 0F 58 = ADDPD -- add 32Fx4 from R/M to R */
- if (have66noF2noF3(pfx) && sz == 2
+ if (have66noF2noF3(pfx)
+ && (sz == 2 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x58) {
delta = dis_SSE_E_to_G_all( pfx, delta+2, "addpd", Iop_Add64Fx2 );
goto decode_success;
}
/* F2 0F 58 = ADDSD -- add 64F0x2 from R/M to R */
- if (haveF2no66noF3(pfx) && insn[0] == 0x0F && insn[1] == 0x58) {
- vassert(sz == 4);
+ if (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
+ && insn[0] == 0x0F && insn[1] == 0x58) {
delta = dis_SSE_E_to_G_lo64( pfx, delta+2, "addsd", Iop_Add64F0x2 );
goto decode_success;
}
@@ -10349,7 +10372,8 @@
/* 66 0F 28 = MOVAPD -- move from E (mem or xmm) to G (xmm). */
/* 66 0F 10 = MOVUPD -- move from E (mem or xmm) to G (xmm). */
/* 66 0F 6F = MOVDQA -- move from E (mem or xmm) to G (xmm). */
- if (have66noF2noF3(pfx) && sz == 2
+ if (have66noF2noF3(pfx)
+ && (sz == 2 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F
&& (insn[1] == 0x28 || insn[1] == 0x10 || insn[1] == 0x6F)) {
HChar* wot = insn[1]==0x28 ? "apd" :
@@ -10614,6 +10638,7 @@
/* sz == 8 is a kludge to handle insns with REX.W redundantly
set to 1, which has been known to happen:
66 4c 0f 50 d9 rex64X movmskpd %xmm1,%r11d
+ 20071106: see further comments on MOVMSKPS implementation above.
*/
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -10718,8 +10743,9 @@
/* 66 0F D6 = MOVQ -- move 64 bits from G (lo half xmm) to E (mem
or lo half xmm). */
- if (have66noF2noF3(pfx) && insn[0] == 0x0F && insn[1] == 0xD6) {
- vassert(sz == 2);
+ if (have66noF2noF3(pfx)
+ && (sz == 2 || /* ignore redundant REX.W */ sz == 8)
+ && insn[0] == 0x0F && insn[1] == 0xD6) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
/* fall through, awaiting test case */
@@ -10758,10 +10784,12 @@
/* F2 0F 10 = MOVSD -- move 64 bits from E (mem or lo half xmm) to
G (lo half xmm). If E is mem, upper half of G is zeroed out.
If E is reg, upper half of G is unchanged. */
- if ( (haveF2no66noF3(pfx) && sz == 4
+ if ( (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x10)
||
- (haveF3no66noF2(pfx) && sz == 4
+ (haveF3no66noF2(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x7E)
) {
modrm = getUChar(delta+2);
@@ -10789,7 +10817,8 @@
/* F2 0F 11 = MOVSD -- move 64 bits from G (lo half xmm) to E (mem
or lo half xmm). */
- if (haveF2no66noF3(pfx) && sz == 4
+ if (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x11) {
modrm = getUChar(delta+2);
if (epartIsReg(modrm)) {
@@ -10806,14 +10835,16 @@
}
/* 66 0F 59 = MULPD -- mul 64Fx2 from R/M to R */
- if (have66noF2noF3(pfx) && sz == 2
+ if (have66noF2noF3(pfx)
+ && (sz == 2 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x59) {
delta = dis_SSE_E_to_G_all( pfx, delta+2, "mulpd", Iop_Mul64Fx2 );
goto decode_success;
}
/* F2 0F 59 = MULSD -- mul 64F0x2 from R/M to R */
- if (haveF2no66noF3(pfx) && sz == 4
+ if (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x59) {
delta = dis_SSE_E_to_G_lo64( pfx, delta+2, "mulsd", Iop_Mul64F0x2 );
goto decode_success;
@@ -10900,8 +10931,9 @@
}
/* F2 0F 5C = SUBSD -- sub 64F0x2 from R/M to R */
- if (haveF2no66noF3(pfx) && insn[0] == 0x0F && insn[1] == 0x5C) {
- vassert(sz == 4);
+ if (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
+ && insn[0] == 0x0F && insn[1] == 0x5C) {
delta = dis_SSE_E_to_G_lo64( pfx, delta+2, "subsd", Iop_Sub64F0x2 );
goto decode_success;
}
@@ -12091,7 +12123,8 @@
/* F2 0F 12 = MOVDDUP -- move from E (mem or xmm) to G (xmm),
duplicating some lanes (0:1:0:1). */
- if (haveF2no66noF3(pfx) && sz == 4
+ if (haveF2no66noF3(pfx)
+ && (sz == 4 || /* ignore redundant REX.W */ sz == 8)
&& insn[0] == 0x0F && insn[1] == 0x12) {
IRTemp sV = newTemp(Ity_V128);
IRTemp d0 = newTemp(Ity_I64);
|
|
From: Tom H. <th...@cy...> - 2007-11-06 03:32:01
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-11-06 03:15:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 287 tests, 33 stderr failures, 1 stdout failure, 27 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-11-06 03:24:32
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-11-06 03:05:05 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 320 tests, 4 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-11-06 03:23:40
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-11-06 03:10:04 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 320 tests, 4 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_cvsimple (stdout) none/tests/pth_detached (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 320 tests, 4 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Nov 6 03:16:58 2007 --- new.short Tue Nov 6 03:23:40 2007 *************** *** 8,10 **** ! == 320 tests, 4 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 320 tests, 4 stderr failures, 4 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,16 **** --- 15,18 ---- none/tests/mremap2 (stdout) + none/tests/pth_cvsimple (stdout) + none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-11-06 03:10:59
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-11-06 03:00:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 322 tests, 6 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-11-06 01:17:13
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-11-06 02:00:01 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 255 tests, 11 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/deep-C (stderr) massif/tests/peak2 (stderr) massif/tests/realloc (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |