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
(16) |
2
(22) |
3
(23) |
4
(12) |
5
(24) |
6
(28) |
7
(16) |
|
8
(3) |
9
(2) |
10
(9) |
11
(22) |
12
(19) |
13
(19) |
14
(15) |
|
15
(10) |
16
(23) |
17
(27) |
18
(31) |
19
(26) |
20
(19) |
21
(17) |
|
22
(6) |
23
(4) |
24
(3) |
25
(14) |
26
(1) |
27
(20) |
28
(14) |
|
29
(10) |
30
(26) |
|
|
|
|
|
|
From: <sv...@va...> - 2013-09-29 20:01:29
|
Author: sewardj
Date: Sun Sep 29 20:01:22 2013
New Revision: 13586
Log:
Enable sys_fanotify_init and sys_fanotify_mark on arm-linux.
Fixes #324421. (Heinrich Schuchardt, xyp...@gm...)
Modified:
trunk/coregrind/m_syswrap/syswrap-arm-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-arm-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-arm-linux.c Sun Sep 29 20:01:22 2013
@@ -1222,6 +1222,8 @@
LINXY(__NR_perf_event_open, sys_perf_event_open), // 364
LINXY(__NR_accept4, sys_accept4), // 366
+ LINXY(__NR_fanotify_init, sys_fanotify_init), // 367
+ LINX_(__NR_fanotify_mark, sys_fanotify_mark), // 368
LINXY(__NR_name_to_handle_at, sys_name_to_handle_at),// 370
LINXY(__NR_open_by_handle_at, sys_open_by_handle_at) // 371
|
|
From: <sv...@va...> - 2013-09-29 19:54:47
|
Author: sewardj
Date: Sun Sep 29 19:54:39 2013
New Revision: 13585
Log:
Update bug status.
Modified:
trunk/NEWS
trunk/docs/internals/3_8_BUGSTATUS.txt
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Sep 29 19:54:39 2013
@@ -586,6 +586,24 @@
== https://bugzilla.redhat.com/show_bug.cgi?id=730303
FIXED 13567
+321891 Unhandled instruction: LDRHT (Thumb)
+ FIXED 2777 13583
+
+323035 Unhandled instruction: LDRSHT(Thumb)
+ FIXED 2777 13583
+
+324047 Valgrind doesn't support [LDR,ST]{S}[B,H]T ARM instructions
+ FIXED 2777 13583
+
+323036 Unhandled instruction: SMMLS (ARM and Thumb)
+ FIXED 2778 13584
+
+323175 Unhandled instruction: SMLALD (ARM + Thumb)
+ FIXED 2778 13584
+
+323177 Unhandled instruction: SMLSLD (ARM + Thumb)
+ FIXED 2778 13584
+
Release 3.8.1 (19 September 2012)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/docs/internals/3_8_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_8_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_8_BUGSTATUS.txt Sun Sep 29 19:54:39 2013
@@ -459,10 +459,6 @@
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-321891 *Unhandled instruction: LDRHT (Thumb)
- Has patch; plausible (needs checking)
- FIX 3.9 (commit)
-
321892 *Unhandled instruction: LDRSH (Thumb)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
@@ -507,27 +503,11 @@
QUERIED
Severity: med Audience: low
-323035 *Unhandled instruction: LDRSHT(Thumb)
- Has patch; plausible (needs checking)
- FIX 3.9 (commit)
-
-323036 *Unhandled instruction: SMMLS (ARM and Thumb)
- Has patch; plausible (needs checking) (duplication?)
- FIX 3.9 (commit)
-
323046 Implement ANNOTATE_THREAD_NAME() Hellgrind annotation
Request for implementation
QUERIED .. is 322254 good enough?
Severity: low Audience: med
-323175 *Unhandled instruction: SMLALD (ARM + Thumb)
- Has patch; plausible (needs checking) (duplication?)
- FIX 3.9 (commit)
-
-323177 *Unhandled instruction: SMLSLD (ARM + Thumb)
- Has patch; plausible (needs checking) (duplication?)
- FIX 3.9 (commit)
-
323178 *Unhandled instruction: PLDW register (ARM)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
@@ -566,10 +546,6 @@
This is TM scheme 1 (immediate fail). Needs landing.
FIX 3.9 (?? queried Carl)
-324047 *Valgrind doesn't support [LDR,ST]{S}[B,H]T ARM instructions
- Has patch; plausible (needs checking) (aren't these done already?)
- FIX 3.9 (commit)
-
324050 Helgrind: SEGV because of unaligned stack when using movdqa
Needs to be looked at. Is this real, or some Gentoo-caused
breakage?
|
|
From: <sv...@va...> - 2013-09-29 19:49:55
|
Author: sewardj
Date: Sun Sep 29 19:49:43 2013
New Revision: 13584
Log:
Add test cases for SMMLS, SMLALD, SMLSLD (ARM and Thumb). Pertains to
323036, 323175, 323177. (vas...@gm...)
Modified:
trunk/none/tests/arm/v6intARM.c
trunk/none/tests/arm/v6intARM.stdout.exp
trunk/none/tests/arm/v6intThumb.c
trunk/none/tests/arm/v6intThumb.stdout.exp
Modified: trunk/none/tests/arm/v6intARM.c
==============================================================================
--- trunk/none/tests/arm/v6intARM.c (original)
+++ trunk/none/tests/arm/v6intARM.c Sun Sep 29 19:49:43 2013
@@ -604,6 +604,50 @@
TESTINST4_2OUT("smlals r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
TESTINST4_2OUT("smlals r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ printf("SMLALD\n");
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+
+ printf("SMLSLD\n");
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+
printf("CLZ\n");
TESTCARRY
TESTINST2("clz r0, r1", 0, r0, r1, c);
@@ -1210,5 +1254,240 @@
TESTINST4("smmlar r0, r1, r2, r3",
0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+ printf("----------------- SMMLS{R} ----------------- \n");
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x80008000, 0x80008000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7fff7fff, 0x00000000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7fff7fff, 0x00010001, 0x00000001, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x80008000, 0xffffffff, 0x0000001f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x00640064, 0x00030003, 0x00000020, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xffffffff, 0xfffc0001, 0x000000ff, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xfff70fff, 0x00030003, 0x00000100, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xb8035b5b, 0xce0ce1ed, 0x5f986e68, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x35232047, 0x146275d8, 0xaae3433f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe7aa57b4, 0x1584bd74, 0x2c07a5b4, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x32fa0095, 0x36f26261, 0x89d2ef86, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x8ed8287c, 0x02c90120, 0xd4b64d54, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc53aaba9, 0x29300837, 0x0b02c58a, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x216158cb, 0x57a50a01, 0xb0d20777, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3e2e1bd7, 0x3cd6cd94, 0x7e376198, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd5fe2dc4, 0xdd914bf7, 0xd5dc5407, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xf87b961e, 0x1d66879f, 0xf2b64835, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd65db979, 0xc61b323b, 0xae930a1a, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5ef1f1a8, 0xbf73f0a5, 0x2fb714c9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x1ffe53d9, 0x815bb75b, 0xa3268abe, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xed2cbf78, 0xc6ffabb6, 0xef9e9fd9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xeaa652c7, 0x137741f4, 0x3dba1164, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3ada0280, 0x71fbde8b, 0xdba5bd25, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xda4ba05b, 0x90f9833d, 0x884c0ad8, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc00b821a, 0x7fa1d5a6, 0x9a4ff1b8, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe1bb8606, 0x58293969, 0x81616d13, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x51f31d95, 0xa3cfd624, 0x6077fb1f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x0849a0c2, 0x0872f25a, 0x40b094e2, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x17913309, 0xf1e03d7e, 0x91edc21d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5388b5cd, 0x86582032, 0x6034078d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x181c436b, 0x5de41558, 0xccfa1c7e, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x23ba1b46, 0x4437983c, 0x48d06549, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xa9085781, 0xc6b4ac58, 0xb2aead21, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc2bdf597, 0xdde1e6a4, 0x852e3a72, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x157b0dea, 0xf0d5ff94, 0xe7b87e39, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3edad6b6, 0x82aceb7a, 0x0557c6fc, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6cc9bfa8, 0x7f808c15, 0x81874a02, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6b1422c7, 0x33921b00, 0x3ccad3f7, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd7ce1909, 0x3e435701, 0x85fbf196, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xb4e16b6e, 0x6e13680a, 0x89436f88, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x44858efc, 0x9002bc30, 0x390d2c2f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xbea121ab, 0x953ff6ec, 0x80657c40, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6ffed89f, 0x3e8c49b7, 0x11bd07d1, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7795635d, 0x5e6e32dd, 0xe4999bf2, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xec0c2f30, 0x5736ed46, 0x231348c0, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x4f9ddd1b, 0x95bca5d8, 0x5765b203, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc1553709, 0x0112b30a, 0x69ec0212, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x74bd0223, 0x03fa9bb5, 0x899d9192, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xf52e9fbf, 0xb4c510a7, 0x7fcbe5a9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x64a365ef, 0x2dd01366, 0xf7b0b13e, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5e4b1cbf, 0x44de5ca9, 0x464a21cc, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x299da970, 0xe8108f1b, 0xf5818cfb, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xcd90d604, 0xaa5e9444, 0x8217b7df, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe60743c3, 0x7acb4de3, 0x73c29060, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x868e7c7d, 0x5f77532e, 0x1d133d3d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x4e5e0760, 0x8f6d3264, 0x21ba2fb3, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xde99ac2f, 0x0be36f70, 0xeda5110c, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x80008000, 0x80008000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7fff7fff, 0x00000000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7fff7fff, 0x00010001, 0x00000001, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x80008000, 0xffffffff, 0x0000001f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x00640064, 0x00030003, 0x00000020, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xffffffff, 0xfffc0001, 0x000000ff, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xfff70fff, 0x00030003, 0x00000100, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xb8035b5b, 0xce0ce1ed, 0x5f986e68, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x35232047, 0x146275d8, 0xaae3433f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe7aa57b4, 0x1584bd74, 0x2c07a5b4, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x32fa0095, 0x36f26261, 0x89d2ef86, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x8ed8287c, 0x02c90120, 0xd4b64d54, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc53aaba9, 0x29300837, 0x0b02c58a, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x216158cb, 0x57a50a01, 0xb0d20777, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3e2e1bd7, 0x3cd6cd94, 0x7e376198, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd5fe2dc4, 0xdd914bf7, 0xd5dc5407, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xf87b961e, 0x1d66879f, 0xf2b64835, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd65db979, 0xc61b323b, 0xae930a1a, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5ef1f1a8, 0xbf73f0a5, 0x2fb714c9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x1ffe53d9, 0x815bb75b, 0xa3268abe, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xed2cbf78, 0xc6ffabb6, 0xef9e9fd9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xeaa652c7, 0x137741f4, 0x3dba1164, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3ada0280, 0x71fbde8b, 0xdba5bd25, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xda4ba05b, 0x90f9833d, 0x884c0ad8, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc00b821a, 0x7fa1d5a6, 0x9a4ff1b8, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe1bb8606, 0x58293969, 0x81616d13, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x51f31d95, 0xa3cfd624, 0x6077fb1f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x0849a0c2, 0x0872f25a, 0x40b094e2, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x17913309, 0xf1e03d7e, 0x91edc21d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5388b5cd, 0x86582032, 0x6034078d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x181c436b, 0x5de41558, 0xccfa1c7e, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x23ba1b46, 0x4437983c, 0x48d06549, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xa9085781, 0xc6b4ac58, 0xb2aead21, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc2bdf597, 0xdde1e6a4, 0x852e3a72, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x157b0dea, 0xf0d5ff94, 0xe7b87e39, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3edad6b6, 0x82aceb7a, 0x0557c6fc, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6cc9bfa8, 0x7f808c15, 0x81874a02, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6b1422c7, 0x33921b00, 0x3ccad3f7, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd7ce1909, 0x3e435701, 0x85fbf196, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xb4e16b6e, 0x6e13680a, 0x89436f88, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x44858efc, 0x9002bc30, 0x390d2c2f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xbea121ab, 0x953ff6ec, 0x80657c40, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6ffed89f, 0x3e8c49b7, 0x11bd07d1, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7795635d, 0x5e6e32dd, 0xe4999bf2, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xec0c2f30, 0x5736ed46, 0x231348c0, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x4f9ddd1b, 0x95bca5d8, 0x5765b203, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc1553709, 0x0112b30a, 0x69ec0212, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x74bd0223, 0x03fa9bb5, 0x899d9192, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xf52e9fbf, 0xb4c510a7, 0x7fcbe5a9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x64a365ef, 0x2dd01366, 0xf7b0b13e, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5e4b1cbf, 0x44de5ca9, 0x464a21cc, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x299da970, 0xe8108f1b, 0xf5818cfb, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xcd90d604, 0xaa5e9444, 0x8217b7df, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe60743c3, 0x7acb4de3, 0x73c29060, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x868e7c7d, 0x5f77532e, 0x1d133d3d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x4e5e0760, 0x8f6d3264, 0x21ba2fb3, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xde99ac2f, 0x0be36f70, 0xeda5110c, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+
return 0;
}
Modified: trunk/none/tests/arm/v6intARM.stdout.exp
==============================================================================
--- trunk/none/tests/arm/v6intARM.stdout.exp (original)
+++ trunk/none/tests/arm/v6intARM.stdout.exp Sun Sep 29 19:49:43 2013
@@ -590,6 +590,48 @@
smlals r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
smlals r0, r1, r2, r3 :: rd 0xfffe0001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, carryin 0, cpsr 0x00000000
smlals r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, carryin 0, cpsr 0x00000000
+SMLALD
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0x00000002 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, carryin 0, cpsr 0x00000000
+smlald r0, r1, r2, r3 :: rd 0xfff50907 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0x00000002 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, carryin 0, cpsr 0x00000000
+smlaldx r0, r1, r2, r3 :: rd 0xfff53f07 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, carryin 0, cpsr 0x00000000
+SMLSLD
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, carryin 0, cpsr 0x00000000
+smlsld r0, r1, r2, r3 :: rd 0xfff508f9 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, carryin 0, cpsr 0x00000000
+smlsldx r0, r1, r2, r3 :: rd 0xfff53f05 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, carryin 0, cpsr 0x00000000
CLZ
clz r0, r1 :: rd 0x00000020 rm 0x00000000, carryin 0, cpsr 0x00000000
clz r0, r1 :: rd 0x0000001f rm 0x00000001, carryin 0, cpsr 0x00000000
@@ -970,3 +1012,120 @@
smmlar r0, r1, r2, r3 :: rd 0xff441be8 rm 0x4e5e0760, rn 0x8f6d3264 rs 0x21ba2fb3, carryin 0, cpsr 0x00000000
smmlar r0, r1, r2, r3 :: rd 0xec17ff2c rm 0xde99ac2f, rn 0x0be36f70 rs 0xeda5110c, carryin 0, cpsr 0x00000000
smmlar r0, r1, r2, r3 :: rd 0xfd3dedd0 rm 0xc57243b7, rn 0xcf1e4487 rs 0xf20fb90f, carryin 0, cpsr 0x00000000
+----------------- SMMLS{R} -----------------
+smmls r0, r1, r2, r3 :: rd 0xc0007fff rm 0x80008000, rn 0x80008000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x00000000 rm 0x7fff7fff, rn 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xffff8001 rm 0x7fff7fff, rn 0x00010001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x0000001e rm 0x80008000, rn 0xffffffff rs 0x0000001f, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xfffffef3 rm 0x00640064, rn 0x00030003 rs 0x00000020, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x000000fe rm 0xffffffff, rn 0xfffc0001 rs 0x000000ff, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x0000011a rm 0xfff70fff, rn 0x00030003 rs 0x00000100, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x518cb59f rm 0xb8035b5b, rn 0xce0ce1ed rs 0x5f986e68, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xa6a814d1 rm 0x35232047, rn 0x146275d8 rs 0xaae3433f, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x2e134aaf rm 0xe7aa57b4, rn 0x1584bd74 rs 0x2c07a5b4, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x7ee1ef7b rm 0x32fa0095, rn 0x36f26261 rs 0x89d2ef86, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xd5f175ca rm 0x8ed8287c, rn 0x02c90120 rs 0xd4b64d54, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x147766ee rm 0xc53aaba9, rn 0x29300837 rs 0x0b02c58a, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xa5646d3d rm 0x216158cb, rn 0x57a50a01 rs 0xb0d20777, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x6f706697 rm 0x3e2e1bd7, rn 0x3cd6cd94 rs 0x7e376198, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xd035ebc7 rm 0xd5fe2dc4, rn 0xdd914bf7 rs 0xd5dc5407, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xf3934af1 rm 0xf87b961e, rn 0x1d66879f rs 0xf2b64835, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xa528b268 rm 0xd65db979, rn 0xc61b323b rs 0xae930a1a, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x47a78335 rm 0x5ef1f1a8, rn 0xbf73f0a5 rs 0x2fb714c9, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xb2fa4004 rm 0x1ffe53d9, rn 0x815bb75b rs 0xa3268abe, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xeb6d9047 rm 0xed2cbf78, rn 0xc6ffabb6 rs 0xef9e9fd9, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x3f59ab6e rm 0xeaa652c7, rn 0x137741f4 rs 0x3dba1164, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xc1719b21 rm 0x3ada0280, rn 0x71fbde8b rs 0xdba5bd25, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x77f1e0c5 rm 0xda4ba05b, rn 0x90f9833d rs 0x884c0ad8, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xba32aa50 rm 0xc00b821a, rn 0x7fa1d5a6 rs 0x9a4ff1b8, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x8bcdd6c2 rm 0xe1bb8606, rn 0x58293969 rs 0x81616d13, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x7dfac4bc rm 0x51f31d95, rn 0xa3cfd624 rs 0x6077fb1f, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x406a8f39 rm 0x0849a0c2, rn 0x0872f25a rs 0x40b094e2, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x933a9f64 rm 0x17913309, rn 0xf1e03d7e rs 0x91edc21d, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x87e66cb0 rm 0x5388b5cd, rn 0x86582032 rs 0x6034078d, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xc4225cd1 rm 0x181c436b, rn 0x5de41558 rs 0xccfa1c7e, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x3f4b33cf rm 0x23ba1b46, rn 0x4437983c rs 0x48d06549, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x9f37f1a2 rm 0xa9085781, rn 0xc6b4ac58 rs 0xb2aead21, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x7d044141 rm 0xc2bdf597, rn 0xdde1e6a4 rs 0x852e3a72, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xe8fe3a43 rm 0x157b0dea, rn 0xf0d5ff94 rs 0xe7b87e39, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x241d07d0 rm 0x3edad6b6, rn 0x82aceb7a rs 0x0557c6fc, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x4b589386 rm 0x6cc9bfa8, rn 0x7f808c15 rs 0x81874a02, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x2738b442 rm 0x6b1422c7, rn 0x33921b00 rs 0x3ccad3f7, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x8fc29a3e rm 0xd7ce1909, rn 0x3e435701 rs 0x85fbf196, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xa990452b rm 0xb4e16b6e, rn 0x6e13680a rs 0x89436f88, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x5706df53 rm 0x44858efc, rn 0x9002bc30 rs 0x390d2c2f, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x65232ab8 rm 0xbea121ab, rn 0x953ff6ec rs 0x80657c40, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xf65fefbc rm 0x6ffed89f, rn 0x3e8c49b7 rs 0x11bd07d1, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xb87d4782 rm 0x7795635d, rn 0x5e6e32dd rs 0xe4999bf2, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x29df6ca2 rm 0xec0c2f30, rn 0x5736ed46 rs 0x231348c0, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x787201ea rm 0x4f9ddd1b, rn 0x95bca5d8 rs 0x5765b203, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x6a2f40b0 rm 0xc1553709, rn 0x0112b30a rs 0x69ec0212, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x87cd12f6 rm 0x74bd0223, rn 0x03fa9bb5 rs 0x899d9192, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x7c9e10e8 rm 0xf52e9fbf, rn 0xb4c510a7 rs 0x7fcbe5a9, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xe5ae2bef rm 0x64a365ef, rn 0x2dd01366 rs 0xf7b0b13e, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x2cec46e5 rm 0x5e4b1cbf, rn 0x44de5ca9 rs 0x464a21cc, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xf965a3bf rm 0x299da970, rn 0xe8108f1b rs 0xf5818cfb, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x713901cb rm 0xcd90d604, rn 0xaa5e9444 rs 0x8217b7df, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x8037ba39 rm 0xe60743c3, rn 0x7acb4de3 rs 0x73c29060, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x4a5cf844 rm 0x868e7c7d, rn 0x5f77532e rs 0x1d133d3d, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0x4430437e rm 0x4e5e0760, rn 0x8f6d3264 rs 0x21ba2fb3, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xef3222ec rm 0xde99ac2f, rn 0x0be36f70 rs 0xeda5110c, carryin 0, cpsr 0x00000000
+smmls r0, r1, r2, r3 :: rd 0xe6e1844d rm 0xc57243b7, rn 0xcf1e4487 rs 0xf20fb90f, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xc0008000 rm 0x80008000, rn 0x80008000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x00000000 rm 0x7fff7fff, rn 0x00000000 rs 0x00000000, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xffff8001 rm 0x7fff7fff, rn 0x00010001 rs 0x00000001, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x0000001f rm 0x80008000, rn 0xffffffff rs 0x0000001f, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xfffffef4 rm 0x00640064, rn 0x00030003 rs 0x00000020, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x000000ff rm 0xffffffff, rn 0xfffc0001 rs 0x000000ff, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x0000011b rm 0xfff70fff, rn 0x00030003 rs 0x00000100, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x518cb59f rm 0xb8035b5b, rn 0xce0ce1ed rs 0x5f986e68, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xa6a814d1 rm 0x35232047, rn 0x146275d8 rs 0xaae3433f, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x2e134aaf rm 0xe7aa57b4, rn 0x1584bd74 rs 0x2c07a5b4, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x7ee1ef7b rm 0x32fa0095, rn 0x36f26261 rs 0x89d2ef86, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xd5f175cb rm 0x8ed8287c, rn 0x02c90120 rs 0xd4b64d54, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x147766ef rm 0xc53aaba9, rn 0x29300837 rs 0x0b02c58a, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xa5646d3e rm 0x216158cb, rn 0x57a50a01 rs 0xb0d20777, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x6f706697 rm 0x3e2e1bd7, rn 0x3cd6cd94 rs 0x7e376198, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xd035ebc8 rm 0xd5fe2dc4, rn 0xdd914bf7 rs 0xd5dc5407, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xf3934af1 rm 0xf87b961e, rn 0x1d66879f rs 0xf2b64835, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xa528b268 rm 0xd65db979, rn 0xc61b323b rs 0xae930a1a, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x47a78335 rm 0x5ef1f1a8, rn 0xbf73f0a5 rs 0x2fb714c9, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xb2fa4005 rm 0x1ffe53d9, rn 0x815bb75b rs 0xa3268abe, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xeb6d9048 rm 0xed2cbf78, rn 0xc6ffabb6 rs 0xef9e9fd9, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x3f59ab6f rm 0xeaa652c7, rn 0x137741f4 rs 0x3dba1164, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xc1719b21 rm 0x3ada0280, rn 0x71fbde8b rs 0xdba5bd25, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x77f1e0c5 rm 0xda4ba05b, rn 0x90f9833d rs 0x884c0ad8, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xba32aa50 rm 0xc00b821a, rn 0x7fa1d5a6 rs 0x9a4ff1b8, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x8bcdd6c2 rm 0xe1bb8606, rn 0x58293969 rs 0x81616d13, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x7dfac4bc rm 0x51f31d95, rn 0xa3cfd624 rs 0x6077fb1f, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x406a8f3a rm 0x0849a0c2, rn 0x0872f25a rs 0x40b094e2, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x933a9f65 rm 0x17913309, rn 0xf1e03d7e rs 0x91edc21d, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x87e66cb1 rm 0x5388b5cd, rn 0x86582032 rs 0x6034078d, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xc4225cd1 rm 0x181c436b, rn 0x5de41558 rs 0xccfa1c7e, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x3f4b33d0 rm 0x23ba1b46, rn 0x4437983c rs 0x48d06549, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x9f37f1a3 rm 0xa9085781, rn 0xc6b4ac58 rs 0xb2aead21, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x7d044141 rm 0xc2bdf597, rn 0xdde1e6a4 rs 0x852e3a72, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xe8fe3a43 rm 0x157b0dea, rn 0xf0d5ff94 rs 0xe7b87e39, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x241d07d0 rm 0x3edad6b6, rn 0x82aceb7a rs 0x0557c6fc, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x4b589387 rm 0x6cc9bfa8, rn 0x7f808c15 rs 0x81874a02, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x2738b442 rm 0x6b1422c7, rn 0x33921b00 rs 0x3ccad3f7, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x8fc29a3e rm 0xd7ce1909, rn 0x3e435701 rs 0x85fbf196, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xa990452b rm 0xb4e16b6e, rn 0x6e13680a rs 0x89436f88, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x5706df53 rm 0x44858efc, rn 0x9002bc30 rs 0x390d2c2f, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x65232ab9 rm 0xbea121ab, rn 0x953ff6ec rs 0x80657c40, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xf65fefbc rm 0x6ffed89f, rn 0x3e8c49b7 rs 0x11bd07d1, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xb87d4783 rm 0x7795635d, rn 0x5e6e32dd rs 0xe4999bf2, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x29df6ca3 rm 0xec0c2f30, rn 0x5736ed46 rs 0x231348c0, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x787201eb rm 0x4f9ddd1b, rn 0x95bca5d8 rs 0x5765b203, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x6a2f40b1 rm 0xc1553709, rn 0x0112b30a rs 0x69ec0212, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x87cd12f7 rm 0x74bd0223, rn 0x03fa9bb5 rs 0x899d9192, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x7c9e10e9 rm 0xf52e9fbf, rn 0xb4c510a7 rs 0x7fcbe5a9, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xe5ae2bf0 rm 0x64a365ef, rn 0x2dd01366 rs 0xf7b0b13e, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x2cec46e5 rm 0x5e4b1cbf, rn 0x44de5ca9 rs 0x464a21cc, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xf965a3bf rm 0x299da970, rn 0xe8108f1b rs 0xf5818cfb, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x713901cb rm 0xcd90d604, rn 0xaa5e9444 rs 0x8217b7df, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x8037ba39 rm 0xe60743c3, rn 0x7acb4de3 rs 0x73c29060, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x4a5cf844 rm 0x868e7c7d, rn 0x5f77532e rs 0x1d133d3d, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0x4430437e rm 0x4e5e0760, rn 0x8f6d3264 rs 0x21ba2fb3, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xef3222ec rm 0xde99ac2f, rn 0x0be36f70 rs 0xeda5110c, carryin 0, cpsr 0x00000000
+smmlsr r0, r1, r2, r3 :: rd 0xe6e1844e rm 0xc57243b7, rn 0xcf1e4487 rs 0xf20fb90f, carryin 0, cpsr 0x00000000
Modified: trunk/none/tests/arm/v6intThumb.c
==============================================================================
--- trunk/none/tests/arm/v6intThumb.c (original)
+++ trunk/none/tests/arm/v6intThumb.c Sun Sep 29 19:49:43 2013
@@ -714,6 +714,52 @@
TESTINST4_2OUT("smlals r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
TESTINST4_2OUT("smlals r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
#endif
+
+ printf("SMLALD\n");
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlald r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlaldx r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+
+ printf("SMLSLD\n");
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsld r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 1, 1, 0, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0xffffffff, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 1, 0, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 1, 1, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0xffff, 0xffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0, 0, 0xffffffff, 0xffffffff, r0, r1, r2, r3, 0);
+ TESTINST4_2OUT("smlsldx r0, r1, r2, r3", 0xfff4ffff, 0xff8fff3f, 0xfffff6ff, 0xfff9ffff, r0, r1, r2, r3, 0);
+
printf("CLZ\n");
TESTCARRY
TESTINST2("clz r0, r1", 0, r0, r1, cv);
@@ -6185,5 +6231,240 @@
TESTINST4("smmlar r0, r1, r2, r3",
0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+ printf("----------------- SMMLS{R} ----------------- \n");
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x80008000, 0x80008000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7fff7fff, 0x00000000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7fff7fff, 0x00010001, 0x00000001, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x80008000, 0xffffffff, 0x0000001f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x00640064, 0x00030003, 0x00000020, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xffffffff, 0xfffc0001, 0x000000ff, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xfff70fff, 0x00030003, 0x00000100, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xb8035b5b, 0xce0ce1ed, 0x5f986e68, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x35232047, 0x146275d8, 0xaae3433f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe7aa57b4, 0x1584bd74, 0x2c07a5b4, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x32fa0095, 0x36f26261, 0x89d2ef86, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x8ed8287c, 0x02c90120, 0xd4b64d54, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc53aaba9, 0x29300837, 0x0b02c58a, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x216158cb, 0x57a50a01, 0xb0d20777, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3e2e1bd7, 0x3cd6cd94, 0x7e376198, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd5fe2dc4, 0xdd914bf7, 0xd5dc5407, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xf87b961e, 0x1d66879f, 0xf2b64835, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd65db979, 0xc61b323b, 0xae930a1a, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5ef1f1a8, 0xbf73f0a5, 0x2fb714c9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x1ffe53d9, 0x815bb75b, 0xa3268abe, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xed2cbf78, 0xc6ffabb6, 0xef9e9fd9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xeaa652c7, 0x137741f4, 0x3dba1164, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3ada0280, 0x71fbde8b, 0xdba5bd25, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xda4ba05b, 0x90f9833d, 0x884c0ad8, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc00b821a, 0x7fa1d5a6, 0x9a4ff1b8, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe1bb8606, 0x58293969, 0x81616d13, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x51f31d95, 0xa3cfd624, 0x6077fb1f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x0849a0c2, 0x0872f25a, 0x40b094e2, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x17913309, 0xf1e03d7e, 0x91edc21d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5388b5cd, 0x86582032, 0x6034078d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x181c436b, 0x5de41558, 0xccfa1c7e, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x23ba1b46, 0x4437983c, 0x48d06549, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xa9085781, 0xc6b4ac58, 0xb2aead21, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc2bdf597, 0xdde1e6a4, 0x852e3a72, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x157b0dea, 0xf0d5ff94, 0xe7b87e39, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x3edad6b6, 0x82aceb7a, 0x0557c6fc, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6cc9bfa8, 0x7f808c15, 0x81874a02, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6b1422c7, 0x33921b00, 0x3ccad3f7, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xd7ce1909, 0x3e435701, 0x85fbf196, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xb4e16b6e, 0x6e13680a, 0x89436f88, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x44858efc, 0x9002bc30, 0x390d2c2f, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xbea121ab, 0x953ff6ec, 0x80657c40, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x6ffed89f, 0x3e8c49b7, 0x11bd07d1, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x7795635d, 0x5e6e32dd, 0xe4999bf2, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xec0c2f30, 0x5736ed46, 0x231348c0, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x4f9ddd1b, 0x95bca5d8, 0x5765b203, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc1553709, 0x0112b30a, 0x69ec0212, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x74bd0223, 0x03fa9bb5, 0x899d9192, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xf52e9fbf, 0xb4c510a7, 0x7fcbe5a9, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x64a365ef, 0x2dd01366, 0xf7b0b13e, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x5e4b1cbf, 0x44de5ca9, 0x464a21cc, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x299da970, 0xe8108f1b, 0xf5818cfb, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xcd90d604, 0xaa5e9444, 0x8217b7df, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xe60743c3, 0x7acb4de3, 0x73c29060, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x868e7c7d, 0x5f77532e, 0x1d133d3d, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0x4e5e0760, 0x8f6d3264, 0x21ba2fb3, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xde99ac2f, 0x0be36f70, 0xeda5110c, r0, r1, r2, r3, 0);
+ TESTINST4("smmls r0, r1, r2, r3",
+ 0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x80008000, 0x80008000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7fff7fff, 0x00000000, 0x00000000, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7fff7fff, 0x00010001, 0x00000001, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x80008000, 0xffffffff, 0x0000001f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x00640064, 0x00030003, 0x00000020, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xffffffff, 0xfffc0001, 0x000000ff, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xfff70fff, 0x00030003, 0x00000100, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xb8035b5b, 0xce0ce1ed, 0x5f986e68, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x35232047, 0x146275d8, 0xaae3433f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe7aa57b4, 0x1584bd74, 0x2c07a5b4, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x32fa0095, 0x36f26261, 0x89d2ef86, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x8ed8287c, 0x02c90120, 0xd4b64d54, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc53aaba9, 0x29300837, 0x0b02c58a, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x216158cb, 0x57a50a01, 0xb0d20777, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3e2e1bd7, 0x3cd6cd94, 0x7e376198, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd5fe2dc4, 0xdd914bf7, 0xd5dc5407, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xf87b961e, 0x1d66879f, 0xf2b64835, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd65db979, 0xc61b323b, 0xae930a1a, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5ef1f1a8, 0xbf73f0a5, 0x2fb714c9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x1ffe53d9, 0x815bb75b, 0xa3268abe, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xed2cbf78, 0xc6ffabb6, 0xef9e9fd9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xeaa652c7, 0x137741f4, 0x3dba1164, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3ada0280, 0x71fbde8b, 0xdba5bd25, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xda4ba05b, 0x90f9833d, 0x884c0ad8, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc00b821a, 0x7fa1d5a6, 0x9a4ff1b8, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe1bb8606, 0x58293969, 0x81616d13, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x51f31d95, 0xa3cfd624, 0x6077fb1f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x0849a0c2, 0x0872f25a, 0x40b094e2, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x17913309, 0xf1e03d7e, 0x91edc21d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5388b5cd, 0x86582032, 0x6034078d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x181c436b, 0x5de41558, 0xccfa1c7e, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x23ba1b46, 0x4437983c, 0x48d06549, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xa9085781, 0xc6b4ac58, 0xb2aead21, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc2bdf597, 0xdde1e6a4, 0x852e3a72, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x157b0dea, 0xf0d5ff94, 0xe7b87e39, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x3edad6b6, 0x82aceb7a, 0x0557c6fc, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6cc9bfa8, 0x7f808c15, 0x81874a02, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6b1422c7, 0x33921b00, 0x3ccad3f7, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xd7ce1909, 0x3e435701, 0x85fbf196, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xb4e16b6e, 0x6e13680a, 0x89436f88, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x44858efc, 0x9002bc30, 0x390d2c2f, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xbea121ab, 0x953ff6ec, 0x80657c40, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x6ffed89f, 0x3e8c49b7, 0x11bd07d1, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x7795635d, 0x5e6e32dd, 0xe4999bf2, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xec0c2f30, 0x5736ed46, 0x231348c0, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x4f9ddd1b, 0x95bca5d8, 0x5765b203, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc1553709, 0x0112b30a, 0x69ec0212, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x74bd0223, 0x03fa9bb5, 0x899d9192, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xf52e9fbf, 0xb4c510a7, 0x7fcbe5a9, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x64a365ef, 0x2dd01366, 0xf7b0b13e, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x5e4b1cbf, 0x44de5ca9, 0x464a21cc, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x299da970, 0xe8108f1b, 0xf5818cfb, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xcd90d604, 0xaa5e9444, 0x8217b7df, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xe60743c3, 0x7acb4de3, 0x73c29060, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x868e7c7d, 0x5f77532e, 0x1d133d3d, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0x4e5e0760, 0x8f6d3264, 0x21ba2fb3, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xde99ac2f, 0x0be36f70, 0xeda5110c, r0, r1, r2, r3, 0);
+ TESTINST4("smmlsr r0, r1, r2, r3",
+ 0xc57243b7, 0xcf1e4487, 0xf20fb90f, r0, r1, r2, r3, 0);
+
return 0;
}
Modified: trunk/none/tests/arm/v6intThumb.stdout.exp
==============================================================================
--- trunk/none/tests/arm/v6intThumb.stdout.exp (original)
+++ trunk/none/tests/arm/v6intThumb.stdout.exp Sun Sep 29 19:49:43 2013
@@ -17342,6 +17342,48 @@
smull r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
smull r0, r1, r2, r3 :: rd 0xfffe0001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, c:v-in 0, cpsr 0xc0000000 NZ
smull r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, c:v-in 0, cpsr 0xc0000000 NZ
+SMLALD
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0x00000002 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlald r0, r1, r2, r3 :: rd 0xfff50907 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0x00000002 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlaldx r0, r1, r2, r3 :: rd 0xfff53f07 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, c:v-in 0, cpsr 0xc0000000 NZ
+SMLSLD
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000001 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000000, rm 0x0000ffff rs 0x0000ffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0xffffffff rs 0xffffffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlsld r0, r1, r2, r3 :: rd 0xfff508f9 rd2 0xff8fff3f, rm 0xfffff6ff rs 0xfff9ffff, c:v-in 0, cpsr 0xc0000000 NZ
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsldx r0, r1, r2, r3 :: rd 0x00000001 rd2 0x00000001, rm 0x00000000 rs 0x00000000, c:v-in 0, cpsr 0xc0000000 NZ
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0xffffffff, rm 0x00000001 rs 0x00000001, c:v-in 0, cpsr 0xc0000000 NZ
+smlsldx r0, r1, r2, r3 :: rd 0x00000000 rd2 0x00000000, rm 0x00000000 rs 0x000...
[truncated message content] |
|
From: <sv...@va...> - 2013-09-29 19:48:54
|
Author: sewardj
Date: Sun Sep 29 19:48:44 2013
New Revision: 2778
Log:
Implement LDRHT (Thumb), LDRSHT (Thumb), [LDR,ST]{S}[B,H]T (ARM).
Fixes 321891, 323035, 324047. (vas...@gm...)
Modified:
trunk/priv/guest_arm_toIR.c
Modified: trunk/priv/guest_arm_toIR.c
==============================================================================
--- trunk/priv/guest_arm_toIR.c (original)
+++ trunk/priv/guest_arm_toIR.c Sun Sep 29 19:48:44 2013
@@ -12301,6 +12301,240 @@
/* fall through */
}
+ /* ----------------- smmls{r}<c> <Rd>,<Rn>,<Rm>,<Ra> ------------------- */
+ {
+ UInt rD = 99, rN = 99, rM = 99, rA = 99;
+ Bool round = False;
+ Bool gate = False;
+
+ if (isT) {
+ if (INSNT0(15,7) == BITS9(1,1,1,1,1,0,1,1,0)
+ && INSNT0(6,4) == BITS3(1,1,0)
+ && INSNT1(7,5) == BITS3(0,0,0)) {
+ round = INSNT1(4,4);
+ rA = INSNT1(15,12);
+ rD = INSNT1(11,8);
+ rM = INSNT1(3,0);
+ rN = INSNT0(3,0);
+ if (!isBadRegT(rD)
+ && !isBadRegT(rN) && !isBadRegT(rM) && !isBadRegT(rA))
+ gate = True;
+ }
+ } else {
+ if (INSNA(27,20) == BITS8(0,1,1,1,0,1,0,1)
+ && INSNA(15,12) != BITS4(1,1,1,1)
+ && (INSNA(7,4) & BITS4(1,1,0,1)) == BITS4(1,1,0,1)) {
+ round = INSNA(5,5);
+ rD = INSNA(19,16);
+ rA = INSNA(15,12);
+ rM = INSNA(11,8);
+ rN = INSNA(3,0);
+ if (rD != 15 && rM != 15 && rN != 15)
+ gate = True;
+ }
+ }
+ if (gate) {
+ IRTemp irt_rA = newTemp(Ity_I32);
+ IRTemp irt_rN = newTemp(Ity_I32);
+ IRTemp irt_rM = newTemp(Ity_I32);
+ assign( irt_rA, isT ? getIRegT(rA) : getIRegA(rA) );
+ assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) );
+ assign( irt_rM, isT ? getIRegT(rM) : getIRegA(rM) );
+ IRExpr* res
+ = unop(Iop_64HIto32,
+ binop(Iop_Add64,
+ binop(Iop_Sub64,
+ binop(Iop_32HLto64, mkexpr(irt_rA), mkU32(0)),
+ binop(Iop_MullS32, mkexpr(irt_rN), mkexpr(irt_rM))),
+ mkU64(round ? 0x80000000ULL : 0ULL)));
+ if (isT)
+ putIRegT( rD, res, condT );
+ else
+ putIRegA(rD, res, condT, Ijk_Boring);
+ DIP("smmls%s%s r%u, r%u, r%u, r%u\n",
+ round ? "r" : "", nCC(conq), rD, rN, rM, rA);
+ return True;
+ }
+ /* fall through */
+ }
+
+ /* -------------- smlald{x}<c> <RdLo>,<RdHi>,<Rn>,<Rm> ---------------- */
+ {
+ UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99;
+ Bool m_swap = False;
+ Bool gate = False;
+
+ if (isT) {
+ if (INSNT0(15,4) == 0xFBC &&
+ (INSNT1(7,4) & BITS4(1,1,1,0)) == BITS4(1,1,0,0)) {
+ rN = INSNT0(3,0);
+ rDlo = INSNT1(15,12);
+ rDhi = INSNT1(11,8);
+ rM = INSNT1(3,0);
+ m_swap = (INSNT1(4,4) & 1) == 1;
+ if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN)
+ && !isBadRegT(rM) && rDhi != rDlo)
+ gate = True;
+ }
+ } else {
+ if (INSNA(27,20) == BITS8(0,1,1,1,0,1,0,0)
+ && (INSNA(7,4) & BITS4(1,1,0,1)) == BITS4(0,0,0,1)) {
+ rN = INSNA(3,0);
+ rDlo = INSNA(15,12);
+ rDhi = INSNA(19,16);
+ rM = INSNA(11,8);
+ m_swap = ( INSNA(5,5) & 1 ) == 1;
+ if (rDlo != 15 && rDhi != 15
+ && rN != 15 && rM != 15 && rDlo != rDhi)
+ gate = True;
+ }
+ }
+
+ if (gate) {
+ IRTemp irt_rM = newTemp(Ity_I32);
+ IRTemp irt_rN = newTemp(Ity_I32);
+ IRTemp irt_rDhi = newTemp(Ity_I32);
+ IRTemp irt_rDlo = newTemp(Ity_I32);
+ IRTemp op_2 = newTemp(Ity_I32);
+ IRTemp pr_1 = newTemp(Ity_I64);
+ IRTemp pr_2 = newTemp(Ity_I64);
+ IRTemp result = newTemp(Ity_I64);
+ IRTemp resHi = newTemp(Ity_I32);
+ IRTemp resLo = newTemp(Ity_I32);
+ assign( irt_rM, isT ? getIRegT(rM) : getIRegA(rM));
+ assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN));
+ assign( irt_rDhi, isT ? getIRegT(rDhi) : getIRegA(rDhi));
+ assign( irt_rDlo, isT ? getIRegT(rDlo) : getIRegA(rDlo));
+ assign( op_2, genROR32(irt_rM, m_swap ? 16 : 0) );
+ assign( pr_1, binop(Iop_MullS32,
+ unop(Iop_16Sto32,
+ unop(Iop_32to16, mkexpr(irt_rN))
+ ),
+ unop(Iop_16Sto32,
+ unop(Iop_32to16, mkexpr(op_2))
+ )
+ )
+ );
+ assign( pr_2, binop(Iop_MullS32,
+ binop(Iop_Sar32, mkexpr(irt_rN), mkU8(16)),
+ binop(Iop_Sar32, mkexpr(op_2), mkU8(16))
+ )
+ );
+ assign( result, binop(Iop_Add64,
+ binop(Iop_Add64,
+ mkexpr(pr_1),
+ mkexpr(pr_2)
+ ),
+ binop(Iop_32HLto64,
+ mkexpr(irt_rDhi),
+ mkexpr(irt_rDlo)
+ )
+ )
+ );
+ assign( resHi, unop(Iop_64HIto32, mkexpr(result)) );
+ assign( resLo, unop(Iop_64to32, mkexpr(result)) );
+ if (isT) {
+ putIRegT( rDhi, mkexpr(resHi), condT );
+ putIRegT( rDlo, mkexpr(resLo), condT );
+ } else {
+ putIRegA( rDhi, mkexpr(resHi), condT, Ijk_Boring );
+ putIRegA( rDlo, mkexpr(resLo), condT, Ijk_Boring );
+ }
+ DIP("smlald%c%s r%u, r%u, r%u, r%u\n",
+ m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM);
+ return True;
+ }
+ /* fall through */
+ }
+
+ /* -------------- smlsld{x}<c> <RdLo>,<RdHi>,<Rn>,<Rm> ---------------- */
+ {
+ UInt rN = 99, rDlo = 99, rDhi = 99, rM = 99;
+ Bool m_swap = False;
+ Bool gate = False;
+
+ if (isT) {
+ if ((INSNT0(15,4) == 0xFBD &&
+ (INSNT1(7,4) & BITS4(1,1,1,0)) == BITS4(1,1,0,0))) {
+ rN = INSNT0(3,0);
+ rDlo = INSNT1(15,12);
+ rDhi = INSNT1(11,8);
+ rM = INSNT1(3,0);
+ m_swap = (INSNT1(4,4) & 1) == 1;
+ if (!isBadRegT(rDlo) && !isBadRegT(rDhi) && !isBadRegT(rN) &&
+ !isBadRegT(rM) && rDhi != rDlo)
+ gate = True;
+ }
+ } else {
+ if (INSNA(27,20) == BITS8(0,1,1,1,0,1,0,0) &&
+ (INSNA(7,4) & BITS4(1,1,0,1)) == BITS4(0,1,0,1)) {
+ rN = INSNA(3,0);
+ rDlo = INSNA(15,12);
+ rDhi = INSNA(19,16);
+ rM = INSNA(11,8);
+ m_swap = (INSNA(5,5) & 1) == 1;
+ if (rDlo != 15 && rDhi != 15 &&
+ rN != 15 && rM != 15 && rDlo != rDhi)
+ gate = True;
+ }
+ }
+ if (gate) {
+ IRTemp irt_rM = newTemp(Ity_I32);
+ IRTemp irt_rN = newTemp(Ity_I32);
+ IRTemp irt_rDhi = newTemp(Ity_I32);
+ IRTemp irt_rDlo = newTemp(Ity_I32);
+ IRTemp op_2 = newTemp(Ity_I32);
+ IRTemp pr_1 = newTemp(Ity_I64);
+ IRTemp pr_2 = newTemp(Ity_I64);
+ IRTemp result = newTemp(Ity_I64);
+ IRTemp resHi = newTemp(Ity_I32);
+ IRTemp resLo = newTemp(Ity_I32);
+ assign( irt_rM, isT ? getIRegT(rM) : getIRegA(rM) );
+ assign( irt_rN, isT ? getIRegT(rN) : getIRegA(rN) );
+ assign( irt_rDhi, isT ? getIRegT(rDhi) : getIRegA(rDhi) );
+ assign( irt_rDlo, isT ? getIRegT(rDlo) : getIRegA(rDlo) );
+ assign( op_2, genROR32(irt_rM, m_swap ? 16 : 0) );
+ assign( pr_1, binop(Iop_MullS32,
+ unop(Iop_16Sto32,
+ unop(Iop_32to16, mkexpr(irt_rN))
+ ),
+ unop(Iop_16Sto32,
+ unop(Iop_32to16, mkexpr(op_2))
+ )
+ )
+ );
+ assign( pr_2, binop(Iop_MullS32,
+ binop(Iop_Sar32, mkexpr(irt_rN), mkU8(16)),
+ binop(Iop_Sar32, mkexpr(op_2), mkU8(16))
+ )
+ );
+ assign( result, binop(Iop_Add64,
+ binop(Iop_Sub64,
+ mkexpr(pr_1),
+ mkexpr(pr_2)
+ ),
+ binop(Iop_32HLto64,
+ mkexpr(irt_rDhi),
+ mkexpr(irt_rDlo)
+ )
+ )
+ );
+ assign( resHi, unop(Iop_64HIto32, mkexpr(result)) );
+ assign( resLo, unop(Iop_64to32, mkexpr(result)) );
+ if (isT) {
+ putIRegT( rDhi, mkexpr(resHi), condT );
+ putIRegT( rDlo, mkexpr(resLo), condT );
+ } else {
+ putIRegA( rDhi, mkexpr(resHi), condT, Ijk_Boring );
+ putIRegA( rDlo, mkexpr(resLo), condT, Ijk_Boring );
+ }
+ DIP("smlsld%c%s r%u, r%u, r%u, r%u\n",
+ m_swap ? 'x' : ' ', nCC(conq), rDlo, rDhi, rN, rM);
+ return True;
+ }
+ /* fall through */
+ }
+
/* ---------- Doesn't match anything. ---------- */
return False;
|
|
From: <sv...@va...> - 2013-09-29 18:25:38
|
Author: sewardj
Date: Sun Sep 29 18:25:29 2013
New Revision: 13583
Log:
Add test cases for LDRHT (Thumb), LDRSHT (Thumb), [LDR,ST]{S}[B,H]T (ARM).
Pertains to 321891, 323035, 324047. (vas...@gm...)
Added:
trunk/none/tests/arm/ldrt_arm.c
trunk/none/tests/arm/ldrt_arm.stderr.exp
trunk/none/tests/arm/ldrt_arm.stdout.exp
trunk/none/tests/arm/ldrt_arm.vgtest
Modified:
trunk/none/tests/arm/Makefile.am
trunk/none/tests/arm/ldrt.c
trunk/none/tests/arm/ldrt.stdout.exp
Modified: trunk/none/tests/arm/Makefile.am
==============================================================================
--- trunk/none/tests/arm/Makefile.am (original)
+++ trunk/none/tests/arm/Makefile.am Sun Sep 29 18:25:29 2013
@@ -6,6 +6,7 @@
EXTRA_DIST = \
intdiv.stdout.exp intdiv.stderr.exp intdiv.vgtest \
ldrt.stdout.exp ldrt.stderr.exp ldrt.vgtest \
+ ldrt_arm.stdout.exp ldrt_arm.stderr.exp ldrt_arm.vgtest \
neon128.stdout.exp neon128.stderr.exp neon128.vgtest \
neon64.stdout.exp neon64.stderr.exp neon64.vgtest \
v6intARM.stdout.exp v6intARM.stderr.exp v6intARM.vgtest \
@@ -19,6 +20,7 @@
allexec \
intdiv \
ldrt \
+ ldrt_arm \
neon128 \
neon64 \
v6intARM \
@@ -60,3 +62,4 @@
intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
+ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
Modified: trunk/none/tests/arm/ldrt.c
==============================================================================
--- trunk/none/tests/arm/ldrt.c (original)
+++ trunk/none/tests/arm/ldrt.c Sun Sep 29 18:25:29 2013
@@ -34,6 +34,24 @@
);
}
+__attribute__((noinline)) UInt do_ldrht_imm_1 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ "mov r4, %1 ; ldrht r5, [r4, #1]; mov %0, r5"
+ : "=r"(res) : "r"(val) : "r4", "r5"
+ );
+ return res;
+}
+
+__attribute__((noinline)) void do_ldrsht_imm_1 (UInt* res)
+{
+ __asm__ __volatile__(
+ "mov r4, %1 ; ldrsht r5, [r4, #1] ; str r5, [r4, #0]"
+ : "+r"(res) : : "r4", "r5", "memory"
+ );
+}
+
__attribute__((noinline)) void do_strht_imm_132 ( unsigned char* p, UInt* val )
{
__asm__ __volatile__(
@@ -104,5 +122,14 @@
printf("result is %u (should be %llu)\n",
do_ldrsbt_imm_2((unsigned char*)&val_ldrsbt), 4294967294ULL);
+
+ UInt val_ldrht = 0xABFEFD8D;
+ printf("result is %u (should be %u)\n",
+ do_ldrht_imm_1((unsigned char*)(&val_ldrht)), 65277);
+
+ UInt val_ldrsht = 0x00BADFAA;
+ do_ldrsht_imm_1(&val_ldrsht);
+ printf("result is 0x%x (should be 0x%x)\n", val_ldrsht, 0xFFFFBADF);
+
return 0;
}
Modified: trunk/none/tests/arm/ldrt.stdout.exp
==============================================================================
--- trunk/none/tests/arm/ldrt.stdout.exp (original)
+++ trunk/none/tests/arm/ldrt.stdout.exp Sun Sep 29 18:25:29 2013
@@ -4,3 +4,5 @@
result is 131 255 255 134 (should be 131 255 255 134)
result is 137 (should be 137)
result is 4294967294 (should be 4294967294)
+result is 65277 (should be 65277)
+result is 0xffffbadf (should be 0xffffbadf)
Added: trunk/none/tests/arm/ldrt_arm.c
==============================================================================
--- trunk/none/tests/arm/ldrt_arm.c (added)
+++ trunk/none/tests/arm/ldrt_arm.c Sun Sep 29 18:25:29 2013
@@ -0,0 +1,237 @@
+// This should be compiled as ARM code.
+
+#include <stdio.h>
+#include <malloc.h>
+
+typedef unsigned int UInt;
+
+__attribute__((noinline)) UInt do_ldrt_A1_imm_132 ( unsigned char* p )
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice do ldrt for testing post-indexed.
+ "mov r5, %1 ; ldrt r6, [r5], #+132 ; ldrt r6, [r5], #132 ; mov %0, r6"
+ : "=r"(res) : "r"(p) : "r5", "r6"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrt_A2_imm_132 ( unsigned char* p )
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrt for testing post-indexed.
+ "mov r5, %1 ; mov r6, #33; ldrt r7, [r5], +r6, lsl #2 ; ldrt r7, [r5], +r6, lsl #2 ; mov %0, r7"
+ : "=r"(res) : "r"(p) : "r5", "r6", "r7"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrbt_A1_imm_2 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrbt for testing post-indexed.
+ "mov r4, %1 ; ldrbt r5, [r4], #+2; ldrbt r5, [r4], #+2; mov %0, r5"
+ : "=r"(res) : "r"(val) : "r4", "r5"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrbt_A2_imm_2 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrbt for testing post-indexed.
+ "mov r4, %1 ; mov r5, #4; ldrbt r6, [r4], +r5, lsr #2 ; ldrbt r6, [r4], +r5, lsr #2; mov %0, r6"
+ : "=r"(res) : "r"(val) : "r4", "r5", "r6"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrht_A1_imm_m2 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrht for testing post-indexed.
+ "mov r4, %1 ; ldrht r5, [r4], #-2 ; ldrht r5, [r4], #-2 ; mov %0, r5"
+ : "=r"(res) : "r"(val) : "r4", "r5"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrht_A2_imm_m2 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrht for testing post-indexed.
+ "mov r4, %1 ; mov r5, #2 ; ldrht r6, [r4], -r5 ; ldrht r6, [r4], -r5 ; mov %0, r6"
+ : "=r"(res) : "r"(val) : "r4", "r5", "r6"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrsht_A1_imm_m2 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrsht for testing post-indexed.
+ "mov r4, %1 ; ldrsht r5, [r4], #-2 ; ldrsht r5, [r4], #-2 ; mov %0, r5"
+ : "=r"(res) : "r"(val) : "r4", "r5"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrsht_A2_imm_1 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrsht for testing post-indexed.
+ "mov r4, %1 ; mov r5, #1 ; ldrsht r6, [r4], r5 ; ldrsht r6, [r4], r5 ; mov %0, r6"
+ : "=r"(res) : "r"(val) : "r4", "r5", "r6"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrsbt_A1_imm_1 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrsbt for testing post-indexed.
+ "mov r4, %1 ; ldrsbt r5, [r4], #1 ; ldrsbt r5, [r4], #1 ; mov %0, r5"
+ : "=r"(res) : "r"(val) : "r4", "r5"
+ );
+ return res;
+}
+
+__attribute__((noinline)) UInt do_ldrsbt_A2_imm_1 (unsigned char* val)
+{
+ UInt res;
+ __asm__ __volatile__(
+ // Twice ldrsbt for testing post-indexed.
+ "mov r4, %1 ; mov r5, #1 ; ldrsbt r6, [r4], r5 ; ldrsbt r6, [r4], r5 ; mov %0, r6"
+ : "=r"(res) : "r"(val) : "r4", "r5", "r6"
+ );
+ return res;
+}
+
+__attribute__((noinline)) void do_strbt_A1_imm_1 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strbt for testing post-indexed.
+ "mov r4, %0 ; mov r5, #0xCD ; strbt r5, [r4], #1 ; strbt r5, [r4], #1"
+ : : "r"(val) : "r4", "r5"
+ );
+}
+
+__attribute__((noinline)) void do_strbt_A2_imm_1 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strbt for testing post-indexed.
+ "mov r4, %0 ; mov r5, #1 ; mov r6, #0xCD ; strbt r6, [r4], r5, LSL #1 ; strbt r6, [r4], r5"
+ : : "r"(val) : "r4", "r5", "r6"
+ );
+}
+
+__attribute__((noinline)) void do_strht_A1_imm_1 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strht for testing post-indexed.
+ "mov r4, %0 ; ldr r5, =0xABCD ; strht r5, [r4], #1 ; strht r5, [r4], #1"
+ : : "r"(val) : "r4", "r5"
+ );
+}
+
+__attribute__((noinline)) void do_strht_A2_imm_1 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strht for testing post-indexed.
+ "mov r4, %0 ; mov r5, #1 ; ldr r6, =0xDCBA ; strht r6, [r4], r5 ; strht r6, [r4], r5"
+ : : "r"(val) : "r4", "r5", "r6"
+ );
+}
+
+__attribute__((noinline)) void do_strt_A1_imm_4 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strt for testing post-indexed.
+ "mov r4, %0 ; ldr r5, =0xABCDEFFF ; strt r5, [r4], #4 ; ldr r5, =0x01234567 ; strt r5, [r4], #0"
+ : : "r"(val) : "r4", "r5"
+ );
+}
+
+__attribute__((noinline)) void do_strt_A2_imm_4 (unsigned char* val)
+{
+ __asm__ __volatile__(
+ // Twice strt for testing post-indexed.
+ "mov r4, %0 ; mov r5, #2 ; ldr r6, =0xFFFEDCBA ; strt r6, [r4], -r5, LSL #1 ; mov r5, #0 ; ldr r6, =0x76543210 ; strt r6, [r4], +r5"
+ : : "r"(val) : "r4", "r5", "r6"
+ );
+}
+
+int main ( void )
+{
+ UInt i;
+ unsigned char* b = malloc(256);
+ for (i = 0; i < 256; i++) b[i] = (unsigned char)i;
+ UInt r = do_ldrt_A1_imm_132(b);
+ free(b);
+ printf("result is 0x%08x (should be 0x%08x)\n", r, 0x87868584);
+
+ UInt j;
+ unsigned char* c = malloc(256);
+ for (j = 0; j < 256; j++) c[j] = (unsigned char)j;
+ UInt k = do_ldrt_A2_imm_132(c);
+ free(c);
+ printf("result is 0x%08x (should be 0x%08x)\n", k, 0x87868584);
+
+ UInt val_ldrbt = (200 << 0) | (150 << 8) | (137 << 16) | (10 << 24);
+ printf("result is %u (should be %u)\n", do_ldrbt_A1_imm_2((unsigned char*)&val_ldrbt), 137);
+
+ UInt val_ldrbt_A2 = (200 << 0) | (150 << 8) | (137 << 16) | (10 << 24);
+ printf("result is %u (should be %u)\n", do_ldrbt_A2_imm_2((unsigned char*)&val_ldrbt_A2), 150);
+
+ UInt val_ldrht_A1 = (0xC8 << 0) | (0xF6 << 8) | (0xBB << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrht_A1_imm_m2((unsigned char*)&val_ldrht_A1 + 2), 0x0000F6C8);
+
+ UInt val_ldrht_A2 = (0xC8 << 0) | (0xF7 << 8) | (0xBB << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrht_A2_imm_m2((unsigned char*)&val_ldrht_A2 + 2), 0x0000F7C8);
+
+ UInt val_ldrsht_A1 = (0x08 << 0) | (0xFC << 8) | (0x0B << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrsht_A1_imm_m2((unsigned char*)&val_ldrsht_A1 + 2), 0xFFFFFC08);
+
+ UInt val_ldrsht_A2 = (0xC8 << 0) | (0x0B << 8) | (0xFB << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrsht_A2_imm_1((unsigned char*)&val_ldrsht_A2), 0xFFFFFB0B);
+
+ UInt val_ldrsbt_A1 = (0xC8 << 0) | (0xF0 << 8) | (0xCD << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrsbt_A1_imm_1((unsigned char*)&val_ldrsbt_A1), 0xFFFFFFF0);
+
+ UInt val_ldrsbt_A2 = (0xC8 << 0) | (0xF0 << 8) | (0xFD << 16) | (0x0A << 24);
+ printf("result is %u (should be %u)\n", do_ldrsbt_A2_imm_1((unsigned char*)&val_ldrsbt_A2 + 1), 0xFFFFFFFD);
+
+ UInt val_strbt_A1 = (0xC8 << 0) | (0xF0 << 8) | (0xFD << 16) | (0x0A << 24);
+ do_strbt_A1_imm_1((unsigned char*)&val_strbt_A1);
+ printf("result is %u (should be %u)\n", val_strbt_A1, 0x0AFDCDCD);
+
+ UInt val_strbt_A2 = (0xC8 << 0) | (0xF0 << 8) | (0xFD << 16) | (0x0A << 24);
+ do_strbt_A2_imm_1((unsigned char*)&val_strbt_A2);
+ printf("result is %u (should be %u)\n", val_strbt_A2, 0x0ACDF0CD);
+
+ UInt val_strht_A1 = 0xFFFFFFFF;
+ do_strht_A1_imm_1((unsigned char*)&val_strht_A1);
+ printf("result is %u (should be %u)\n", val_strht_A1, 0xFFABCDCD);
+
+ UInt val_strht_A2 = 0xFFFFFFFF;
+ do_strht_A2_imm_1((unsigned char*)&val_strht_A2);
+ printf("result is %u (should be %u)\n", val_strht_A2, 0xFFDCBABA);
+
+ UInt val_strt_A1[2] = {0xFFFFFFFF, 0xFFFFFFFF};
+ do_strt_A1_imm_4((unsigned char*)&val_strt_A1[0]);
+ printf("result is %u %u (should be %u %u)\n", val_strt_A1[0], val_strt_A1[1], 0xABCDEFFF, 0x01234567);
+
+ UInt val_strt_A2[2] = {0xFFFFFFFF, 0xFFFFFFFF};
+ do_strt_A2_imm_4((unsigned char*)&val_strt_A2[1]);
+ printf("result is %u %u (should be %u %u)\n", val_strt_A2[0], val_strt_A2[1], 0x76543210, 0xFFFEDCBA);
+
+ return 0;
+}
Added: trunk/none/tests/arm/ldrt_arm.stderr.exp
==============================================================================
(empty)
Added: trunk/none/tests/arm/ldrt_arm.stdout.exp
==============================================================================
--- trunk/none/tests/arm/ldrt_arm.stdout.exp (added)
+++ trunk/none/tests/arm/ldrt_arm.stdout.exp Sun Sep 29 18:25:29 2013
@@ -0,0 +1,16 @@
+result is 0x87868584 (should be 0x87868584)
+result is 0x87868584 (should be 0x87868584)
+result is 137 (should be 137)
+result is 150 (should be 150)
+result is 63176 (should be 63176)
+result is 63432 (should be 63432)
+result is 4294966280 (should be 4294966280)
+result is 4294966027 (should be 4294966027)
+result is 4294967280 (should be 4294967280)
+result is 4294967293 (should be 4294967293)
+result is 184405453 (should be 184405453)
+result is 181268685 (should be 181268685)
+result is 4289449421 (should be 4289449421)
+result is 4292655802 (should be 4292655802)
+result is 2882400255 19088743 (should be 2882400255 19088743)
+result is 1985229328 4294892730 (should be 1985229328 4294892730)
Added: trunk/none/tests/arm/ldrt_arm.vgtest
==============================================================================
--- trunk/none/tests/arm/ldrt_arm.vgtest (added)
+++ trunk/none/tests/arm/ldrt_arm.vgtest Sun Sep 29 18:25:29 2013
@@ -0,0 +1,2 @@
+prog: ldrt_arm
+vgopts: -q
|
|
From: <sv...@va...> - 2013-09-29 18:24:25
|
Author: sewardj
Date: Sun Sep 29 18:24:15 2013
New Revision: 2777
Log:
Implement LDRHT (Thumb), LDRSHT (Thumb), [LDR,ST]{S}[B,H]T (ARM).
Fixes 321891, 323035, 324047. (vas...@gm...)
Modified:
trunk/priv/guest_arm_toIR.c
Modified: trunk/priv/guest_arm_toIR.c
==============================================================================
--- trunk/priv/guest_arm_toIR.c (original)
+++ trunk/priv/guest_arm_toIR.c Sun Sep 29 18:24:15 2013
@@ -16419,6 +16419,437 @@
goto decode_success;
}
+ /* -------------- (A1) LDRT reg+/-#imm12 -------------- */
+ /* Load Register Unprivileged:
+ ldrt<c> Rt, [Rn] {, #+/-imm12}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,0,0,0,0,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm12 = INSN(11,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT) valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm12));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrt%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) LDRT reg+/-reg with shift -------------- */
+ /* Load Register Unprivileged:
+ ldrt<c> Rt, [Rn], +/-Rm{, shift}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,1,0,0,0,1,1)
+ && INSN(4,4) == 0 ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt imm5 = INSN(11,7);
+ UInt bU = INSN(23,23);
+ UInt type = INSN(6,5);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15
+ /* || (ArchVersion() < 6 && rM == rN) */)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_Ident32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ // dis_buf generated is slightly bogus, in fact.
+ IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM,
+ type, imm5, dis_buf);
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrt%s r%u, %s\n", nCC(INSN_COND), rT, dis_buf);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) LDRBT reg+/-#imm12 -------------- */
+ /* Load Register Byte Unprivileged:
+ ldrbt<c> Rt, [Rn], #+/-imm12
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,0,0,0,1,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm12 = INSN(11,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT) valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm12));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrbt%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) LDRBT reg+/-reg with shift -------------- */
+ /* Load Register Byte Unprivileged:
+ ldrbt<c> Rt, [Rn], +/-Rm{, shift}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,1,0,0,1,1,1)
+ && INSN(4,4) == 0 ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt imm5 = INSN(11,7);
+ UInt bU = INSN(23,23);
+ UInt type = INSN(6,5);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15
+ /* || (ArchVersion() < 6 && rM == rN) */)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_8Uto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ // dis_buf generated is slightly bogus, in fact.
+ IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM,
+ type, imm5, dis_buf);
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrbt%s r%u, %s\n", nCC(INSN_COND), rT, dis_buf);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) LDRHT reg+#imm8 -------------- */
+ /* Load Register Halfword Unprivileged:
+ ldrht<c> Rt, [Rn] {, #+/-imm8}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,1,1,1)
+ && INSN(7,4) == BITS4(1,0,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt bU = INSN(23,23);
+ UInt imm4H = INSN(11,8);
+ UInt imm4L = INSN(3,0);
+ UInt imm8 = (imm4H << 4) | imm4L;
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm8));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrht%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) LDRHT reg+/-reg -------------- */
+ /* Load Register Halfword Unprivileged:
+ ldrht<c> Rt, [Rn], +/-Rm
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,0,1,1)
+ && INSN(11,4) == BITS8(0,0,0,0,1,0,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_16Uto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), getIRegA(rM));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrht%s r%u, [r%u], %cr%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) LDRSHT reg+#imm8 -------------- */
+ /* Load Register Signed Halfword Unprivileged:
+ ldrsht<c> Rt, [Rn] {, #+/-imm8}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,1,1,1)
+ && INSN(7,4) == BITS4(1,1,1,1)) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt bU = INSN(23,23);
+ UInt imm4H = INSN(11,8);
+ UInt imm4L = INSN(3,0);
+ UInt imm8 = (imm4H << 4) | imm4L;
+ Bool valid = True;
+ if (rN == 15 || rT == 15 || rN == rT)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm8));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrsht%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) LDRSHT reg+/-reg -------------- */
+ /* Load Register Signed Halfword Unprivileged:
+ ldrsht<c> Rt, [Rn], +/-Rm
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,0,1,1)
+ && INSN(11,4) == BITS8(0,0,0,0,1,1,1,1)) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rN == 15 || rT == 15 || rN == rT || rM == 15)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_16Sto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), getIRegA(rM));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrsht%s r%u, [r%u], %cr%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) LDRSBT reg+#imm8 -------------- */
+ /* Load Register Signed Byte Unprivileged:
+ ldrsbt<c> Rt, [Rn] {, #+/-imm8}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,1,1,1)
+ && INSN(7,4) == BITS4(1,1,0,1)) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt bU = INSN(23,23);
+ UInt imm4H = INSN(11,8);
+ UInt imm4L = INSN(3,0);
+ UInt imm8 = (imm4H << 4) | imm4L;
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm8));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrsbt%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) LDRSBT reg+/-reg -------------- */
+ /* Load Register Signed Byte Unprivileged:
+ ldrsbt<c> Rt, [Rn], +/-Rm
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,0,1,1)
+ && INSN(11,4) == BITS8(0,0,0,0,1,1,0,1)) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt bU = INSN(23,23);
+ UInt rM = INSN(3,0);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15)
+ valid = False;
+ if (valid) {
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt,
+ ILGop_8Sto32, getIRegA(rN), getIRegA(rT), condT );
+ putIRegA(rT, mkexpr(newRt), IRTemp_INVALID, Ijk_Boring);
+ IRExpr* erN = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), getIRegA(rM));
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("ldrsbt%s r%u, [r%u], %cr%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) STRBT reg+#imm12 -------------- */
+ /* Store Register Byte Unprivileged:
+ strbt<c> Rt, [Rn], #+/-imm12
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,0,0,0,1,1,0) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm12 = INSN(11,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT) valid = False;
+ if (valid) {
+ IRExpr* address = getIRegA(rN);
+ IRExpr* data = unop(Iop_32to8, getIRegA(rT));
+ storeGuardedLE( address, data, condT);
+ IRExpr* newRn = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm12));
+ putIRegA(rN, newRn, condT, Ijk_Boring);
+ DIP("strbt%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) STRBT reg+/-reg -------------- */
+ /* Store Register Byte Unprivileged:
+ strbt<c> Rt, [Rn], +/-Rm{, shift}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,1,0,0,1,1,0)
+ && INSN(4,4) == 0) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm5 = INSN(11,7);
+ UInt type = INSN(6,5);
+ UInt rM = INSN(3,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False;
+ if (valid) {
+ IRExpr* address = getIRegA(rN);
+ IRExpr* data = unop(Iop_32to8, getIRegA(rT));
+ storeGuardedLE( address, data, condT);
+ // dis_buf generated is slightly bogus, in fact.
+ IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM,
+ type, imm5, dis_buf);
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("strbt%s r%u, %s\n", nCC(INSN_COND), rT, dis_buf);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) STRHT reg+#imm8 -------------- */
+ /* Store Register Halfword Unprivileged:
+ strht<c> Rt, [Rn], #+/-imm8
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,1,1,0)
+ && INSN(7,4) == BITS4(1,0,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm4H = INSN(11,8);
+ UInt imm4L = INSN(3,0);
+ UInt imm8 = (imm4H << 4) | imm4L;
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT) valid = False;
+ if (valid) {
+ IRExpr* address = getIRegA(rN);
+ IRExpr* data = unop(Iop_32to16, getIRegA(rT));
+ storeGuardedLE( address, data, condT);
+ IRExpr* newRn = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm8));
+ putIRegA(rN, newRn, condT, Ijk_Boring);
+ DIP("strht%s r%u, [r%u], #%c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm8);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) STRHT reg+reg -------------- */
+ /* Store Register Halfword Unprivileged:
+ strht<c> Rt, [Rn], +/-Rm
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,0,0,0,0,0,1,0)
+ && INSN(11,4) == BITS8(0,0,0,0,1,0,1,1) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rT == 15 || rN == 15 || rN == rT || rM == 15) valid = False;
+ if (valid) {
+ IRExpr* address = getIRegA(rN);
+ IRExpr* data = unop(Iop_32to16, getIRegA(rT));
+ storeGuardedLE( address, data, condT);
+ IRExpr* newRn = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), getIRegA(rM));
+ putIRegA(rN, newRn, condT, Ijk_Boring);
+ DIP("strht%s r%u, [r%u], %cr%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', rM);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A1) STRT reg+imm12 -------------- */
+ /* Store Register Unprivileged:
+ strt<c> Rt, [Rn], #+/-imm12
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,0,0,0,0,1,0) ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt imm12 = INSN(11,0);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rN == 15 || rN == rT) valid = False;
+ if (valid) {
+ IRExpr* address = getIRegA(rN);
+ storeGuardedLE( address, getIRegA(rT), condT);
+ IRExpr* newRn = binop(bU ? Iop_Add32 : Iop_Sub32,
+ getIRegA(rN), mkU32(imm12));
+ putIRegA(rN, newRn, condT, Ijk_Boring);
+ DIP("strt%s r%u, [r%u], %c%u\n",
+ nCC(INSN_COND), rT, rN, bU ? '+' : '-', imm12);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (A2) STRT reg+reg -------------- */
+ /* Store Register Unprivileged:
+ strt<c> Rt, [Rn], +/-Rm{, shift}
+ */
+ if ( (INSN(27,20) & BITS8(1,1,1,1,0,1,1,1)) == BITS8(0,1,1,0,0,0,1,0)
+ && INSN(4,4) == 0 ) {
+ UInt rT = INSN(15,12);
+ UInt rN = INSN(19,16);
+ UInt rM = INSN(3,0);
+ UInt type = INSN(6,5);
+ UInt imm5 = INSN(11,7);
+ UInt bU = INSN(23,23);
+ Bool valid = True;
+ if (rN == 15 || rN == rT || rM == 15) valid = False;
+ /* FIXME We didn't do:
+ if ArchVersion() < 6 && rM == rN then UNPREDICTABLE */
+ if (valid) {
+ storeGuardedLE( getIRegA(rN), getIRegA(rT), condT);
+ // dis_buf generated is slightly bogus, in fact.
+ IRExpr* erN = mk_EA_reg_plusminus_shifted_reg(rN, bU, rM,
+ type, imm5, dis_buf);
+ putIRegA(rN, erN, condT, Ijk_Boring);
+ DIP("strt%s r%u, %s\n", nCC(INSN_COND), rT, dis_buf);
+ goto decode_success;
+ }
+ }
+
/* ----------------------------------------------------------- */
/* -- ARMv7 instructions -- */
/* ----------------------------------------------------------- */
@@ -20869,6 +21300,64 @@
}
}
+ /* -------------- (T1) LDRHT reg+#imm8 -------------- */
+ /* Load Register Halfword Unprivileged:
+ ldrht Rt, [Rn, #imm8]
+ */
+ if (INSN0(15,6) == BITS10(1,1,1,1,1,0,0,0,0,0) && INSN0(5,4) == BITS2(1,1)
+ && INSN1(11,8) == BITS4(1,1,1,0)) {
+ UInt rN = INSN0(3,0);
+ Bool valid = True;
+ if (rN == 15) {
+ /* In this case our instruction is LDRH (literal), in fact:
+ LDRH (literal) was realized earlier, so we don't want to
+ make it twice. */
+ valid = False;
+ }
+ UInt rT = INSN1(15,12);
+ UInt imm8 = INSN1(7,0);
+ if (isBadRegT(rT)) valid = False;
+ if (valid) {
+ put_ITSTATE(old_itstate);
+ IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8));
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt, ILGop_16Uto32, ea, llGetIReg(rT), condT );
+ putIRegT(rT, mkexpr(newRt), IRTemp_INVALID);
+ put_ITSTATE(new_itstate);
+ DIP("ldrht r%u, [r%u, #%u]\n", rT, rN, imm8);
+ goto decode_success;
+ }
+ }
+
+ /* -------------- (T1) LDRSHT reg+#imm8 -------------- */
+ /* Load Register Signed Halfword Unprivileged:
+ ldrsht Rt, [Rn, #imm8]
+ */
+ if (INSN0(15,6) == BITS10(1,1,1,1,1,0,0,1,0,0) && INSN0(5,4) == BITS2(1,1)
+ && INSN1(11,8) == BITS4(1,1,1,0)) {
+ UInt rN = INSN0(3,0);
+ Bool valid = True;
+ if (rN == 15) {
+ /* In this case our instruction is LDRSH (literal), in fact:
+ LDRSH (literal) was realized earlier, so we don't want to
+ make it twice. */
+ valid = False;
+ }
+ UInt rT = INSN1(15,12);
+ UInt imm8 = INSN1(7,0);
+ if (isBadRegT(rT)) valid = False;
+ if (valid) {
+ put_ITSTATE(old_itstate);
+ IRExpr* ea = binop(Iop_Add32, getIRegT(rN), mkU32(imm8));
+ IRTemp newRt = newTemp(Ity_I32);
+ loadGuardedLE( newRt, ILGop_16Sto32, ea, llGetIReg(rT), condT );
+ putIRegT(rT, mkexpr(newRt), IRTemp_INVALID);
+ put_ITSTATE(new_itstate);
+ DIP("ldrsht r%u, [r%u, #%u]\n", rT, rN, imm8);
+ goto decode_success;
+ }
+ }
+
/* -------------- (T1) STRHT reg+#imm8 -------------- */
/* Store Register Halfword Unprivileged:
strht Rt, [Rn, #imm8]
|
|
From: Philippe W. <phi...@sk...> - 2013-09-29 16:50:57
|
On Sun, 2013-09-29 at 11:58 +0200, Julian Seward wrote: > 322254 Show threadname together with tid if set by application This one was fixed by Florian (rev 13553) Philippe |
|
From: <sv...@va...> - 2013-09-29 13:47:45
|
Author: philippe
Date: Sun Sep 29 13:47:32 2013
New Revision: 13582
Log:
add heuristics decreasing false possible "possible leaks" in c++ code.
The option --leak-check-heuristics=heur1,heur2,... can activate
various heuristics to decrease the number of false positive
"possible leaks" for C++ code. The available heuristics are
detecting valid interior pointers to std::stdstring, to new[] allocated
arrays with elements having destructors and to interior pointers pointing
to an inner part of a C++ object using multiple inheritance.
This fixes 280271 Valgrind reports possible memory leaks on still-reachable
std::string
This has been tested on x86/amd64/ppc32/ppc64.
First performance measurements seems to show a neglectible impact on
the leak search.
More feedback welcome both on performance and functional aspects
(false positive 'possibly leaked' rate decrease and/or
false negative 'possibly leaked' rate increase).
Note that the heuristic is not checking that the memory has been
allocated with "new" or "new[]", as it is expected that in some cases,
specific alloc fn are used for c++ objects instead of the standard new/new[].
If needed, we might add an option to check the alloc functions
to be new/new[].
Added:
trunk/memcheck/tests/leak_cpp_interior.cpp
trunk/memcheck/tests/leak_cpp_interior.stderr.exp
trunk/memcheck/tests/leak_cpp_interior.stderr.exp-64bit
trunk/memcheck/tests/leak_cpp_interior.vgtest
Modified:
trunk/NEWS
trunk/gdbserver_tests/mchelp.stdoutB.exp
trunk/memcheck/docs/mc-manual.xml
trunk/memcheck/mc_include.h
trunk/memcheck/mc_leakcheck.c
trunk/memcheck/mc_main.c
trunk/memcheck/tests/Makefile.am
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Sep 29 13:47:32 2013
@@ -20,6 +20,13 @@
This is a.o. useful to avoid definite leaks being "catched"
by a suppression entry aimed at suppressing possibly lost blocks.
+ - The option --leak-check-heuristics=heur1,heur2,... can activate
+ various heuristics to decrease the number of false positive
+ "possible leaks" for C++ code. The available heuristics are
+ detecting valid interior pointers to std::stdstring, to new[] allocated
+ arrays with elements having destructors and to interior pointers pointing
+ to an inner part of a C++ object using multiple inheritance.
+
- The option --keep-stacktraces controls which stack trace(s) to keep for
malloc'd and/or free'd blocks. This can be used to obtain more information
for 'use after free' errors or to decrease Valgrind memory and/or cpu usage
@@ -93,6 +100,7 @@
274695 [390] s390x: Support "compare to/from logical" instructions (z196)
275800 [390] s390x: Add support for the ecag instruction (part 1)
275800 [390] s390x: Autodetect cache info (part 2)
+280271 Valgrind reports possible memory leaks on still-reachable std::string
284540 [390] Memcheck shouldn't count suppressions matching still-reachable allocations
296311 [390] Wrong stack traces due to -fomit-frame-pointer (x86)
Modified: trunk/gdbserver_tests/mchelp.stdoutB.exp
==============================================================================
--- trunk/gdbserver_tests/mchelp.stdoutB.exp (original)
+++ trunk/gdbserver_tests/mchelp.stdoutB.exp Sun Sep 29 13:47:32 2013
@@ -25,10 +25,12 @@
and outputs a description of <addr>
leak_check [full*|summary]
[kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
+ [heuristics heur1,heur2,...]
[increased*|changed|any]
[unlimited*|limited <max_loss_records_output>]
* = defaults
where kind is one of definite indirect possible reachable all none
+ where heur is one of stdstring newarray multipleinheritance all none
Examples: leak_check
leak_check summary any
leak_check full kinds indirect,possible
@@ -78,10 +80,12 @@
and outputs a description of <addr>
leak_check [full*|summary]
[kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]
+ [heuristics heur1,heur2,...]
[increased*|changed|any]
[unlimited*|limited <max_loss_records_output>]
* = defaults
where kind is one of definite indirect possible reachable all none
+ where heur is one of stdstring newarray multipleinheritance all none
Examples: leak_check
leak_check summary any
leak_check full kinds indirect,possible
Modified: trunk/memcheck/docs/mc-manual.xml
==============================================================================
--- trunk/memcheck/docs/mc-manual.xml (original)
+++ trunk/memcheck/docs/mc-manual.xml Sun Sep 29 13:47:32 2013
@@ -396,7 +396,7 @@
<para>There are two ways a block can be reached. The first is with a
"start-pointer", i.e. a pointer to the start of the block. The second is with
an "interior-pointer", i.e. a pointer to the middle of the block. There are
-three ways we know of that an interior-pointer can occur:</para>
+several ways we know of that an interior-pointer can occur:</para>
<itemizedlist>
<listitem>
@@ -422,8 +422,33 @@
See <ulink url="http://theory.uwinnipeg.ca/gnu/gcc/gxxint_14.html">this
page</ulink> for more information.</para>
</listitem>
+
+ <listitem>
+ <para>It might be a pointer to the inner char array of a C++
+ <computeroutput>std::string</computeroutput>. For example, some
+ compilers add 3 words at the beginning of the std::string to
+ store the length, the capacity and a reference count before the
+ memory containing the array of characters. They return a pointer
+ just after these 3 words, pointing at the char array.</para>
+ </listitem>
+
+ <listitem>
+ <para>It might be a pointer to an inner part of a C++ object using
+ multiple inheritance. </para>
+ </listitem>
</itemizedlist>
+<para>You can optionally activate heuristics to use during the leak
+search to detect the interior pointers corresponding to
+the <computeroutput>newarray</computeroutput>,
+<computeroutput>stdstring</computeroutput> and
+<computeroutput>multipleinheritance</computeroutput> cases. If the
+heuristic detects that an interior pointer corresponds to such a case,
+the block will be considered as reachable by the interior
+pointer. In other words, the interior pointer will be treated
+as if it were a start pointer.</para>
+
+
<para>With that in mind, consider the nine possible cases described by the
following figure.</para>
@@ -524,6 +549,26 @@
suppressed: 0 bytes in 0 blocks.
]]></programlisting>
+<para>If heuristics have been used to consider some blocks as
+reachable, the leak summary details the heuristically reachable subset
+of 'still reachable:' per heuristic. In the below example, of the 79
+bytes still reachable, 71 bytes (56+7+8) have been considered
+heuristically reachable.
+</para>
+
+<programlisting><![CDATA[
+LEAK SUMMARY:
+ definitely lost: 4 bytes in 1 blocks
+ indirectly lost: 0 bytes in 0 blocks
+ possibly lost: 0 bytes in 0 blocks
+ still reachable: 79 bytes in 5 blocks
+ of which reachable via heuristic:
+ stdstring : 56 bytes in 2 blocks
+ newarray : 7 bytes in 1 blocks
+ multipleinheritance: 8 bytes in 1 blocks
+ suppressed: 0 bytes in 0 blocks
+]]></programlisting>
+
<para>If <option>--leak-check=full</option> is specified,
Memcheck will give details for each definitely lost or possibly lost block,
including where it was allocated. (Actually, it merges results for all
@@ -705,6 +750,40 @@
</varlistentry>
+ <varlistentry id="opt.leak-check-heuristics" xreflabel="--leak-check-heuristics">
+ <term>
+ <option><![CDATA[--leak-check-heuristics=<set> [default: none] ]]></option>
+ </term>
+ <listitem>
+ <para>Specifies the leak check heuristics to use during leak search
+ to discover interior pointers with which a block should be considered
+ as reachable. The heuristic set is specified by using one of the
+ following forms:
+
+ <itemizedlist>
+ <listitem>a comma separated list of one or more of
+ <option>stdstring newarray multipleinheritance</option>.
+ </listitem>
+
+ <listitem><option>all</option> to activate the complete set of
+ heuristics.
+ It is equivalent to
+ <option>--leak-check-heuristics=stdstring,newarray,multipleinheritance</option>.
+ </listitem>
+
+ <listitem><option>none</option> is the empty set.
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>Note that these heuristics are dependent on the layout of the objects
+ produced by the C++ compiler. They have been tested with some gcc versions
+ (e.g. 4.4 and 4.7). They might not work properly with other C++ compilers.
+ </para>
+ </listitem>
+ </varlistentry>
+
+
<varlistentry id="opt.show-reachable" xreflabel="--show-reachable">
<term>
<option><![CDATA[--show-reachable=<yes|no> ]]></option>
@@ -1755,8 +1834,33 @@
==20852== tid 1 register EBX interior points at 2 bytes inside 0x40281a8
(gdb)
]]></programlisting>
- </listitem>
+ <para> When <varname>who_points_at</varname> finds an interior pointer,
+ it will report the heuristic(s) with which this interior pointer
+ will be considered as reachable. Note that this is done independently
+ of the value of the option <option>--leak-check-heuristics</option>.
+ In the below example, the loss record 6 indicates a possibly lost
+ block. <varname>who_points_at</varname> reports that there is an interior
+ pointer pointing in this block, and that the block can be considered
+ reachable using the heuristic
+ <computeroutput>multipleinheritance</computeroutput>.
+ </para>
+
+<programlisting><![CDATA[
+(gdb) monitor block_list 6
+==3748== 8 bytes in 1 blocks are possibly lost in loss record 6 of 7
+==3748== at 0x4007D77: operator new(unsigned int) (vg_replace_malloc.c:313)
+==3748== by 0x8048954: main (leak_cpp_interior.cpp:43)
+==3748== 0x402A0E0[8]
+(gdb) monitor who_points_at 0x402A0E0 8
+==3748== Searching for pointers pointing in 8 bytes from 0x402a0e0
+==3748== *0xbe8ee078 interior points at 4 bytes inside 0x402a0e0
+==3748== Address 0xbe8ee078 is on thread 1's stack
+==3748== block at 0x402a0e0 considered reachable by ptr 0x402a0e4 using multipleinheritance heuristic
+(gdb)
+]]></programlisting>
+
+ </listitem>
</itemizedlist>
Modified: trunk/memcheck/mc_include.h
==============================================================================
--- trunk/memcheck/mc_include.h (original)
+++ trunk/memcheck/mc_include.h Sun Sep 29 13:47:32 2013
@@ -342,8 +342,9 @@
LeakCheckMode mode;
UInt show_leak_kinds;
UInt errors_for_leak_kinds;
+ UInt heuristics;
LeakCheckDeltaMode deltamode;
- UInt max_loss_records_output; // limit on the nr of loss records output.
+ UInt max_loss_records_output; // limit on the nr of loss records output.
Bool requested_by_monitor_command; // True when requested by gdb/vgdb.
}
LeakCheckParams;
@@ -354,8 +355,8 @@
extern LeakCheckDeltaMode MC_(detect_memory_leaks_last_delta_mode);
// prints the list of blocks corresponding to the given loss_record_nr.
-// Returns True if loss_record_nr identifies a correct loss record from last leak search.
-// Returns False otherwise.
+// Returns True if loss_record_nr identifies a correct loss record from last
+// leak search, returns False otherwise.
Bool MC_(print_block_list) ( UInt loss_record_nr);
// Prints the addresses/registers/... at which a pointer to
@@ -494,6 +495,39 @@
Default : R2S(Possible) | R2S(Unreached). */
extern UInt MC_(clo_errors_for_leak_kinds);
+/* Various leak check heuristics which can be activated/deactivated. */
+typedef
+ enum {
+ LchNone =0,
+ // no heuristic.
+ LchStdString =1,
+ // Consider interior pointer pointing at the array of char in a
+ // std::string as reachable.
+ LchNewArray =2,
+ // Consider interior pointer pointing at second word of a new[] array as
+ // reachable. Such interior pointers are used for arrays whose elements
+ // have a destructor.
+ LchMultipleInheritance =3,
+ // Conside interior pointer pointing just after what looks a vtable
+ // as reachable.
+ }
+ LeakCheckHeuristic;
+
+// Nr of heuristics.
+#define N_LEAK_CHECK_HEURISTICS 4
+
+// Build mask to check or set Heuristic h membership
+#define H2S(h) (1 << (h))
+// CppHeuristic h is member of the Set s ?
+#define HiS(h,s) ((s) & R2S(h))
+// A set with all Heuristics:
+#define HallS \
+ (H2S(LchStdString) | H2S(LchNewArray) | H2S(LchMultipleInheritance))
+
+/* Heuristics set to use for the leak search.
+ Default : no heuristic. */
+extern UInt MC_(clo_leak_check_heuristics);
+
/* Assume accesses immediately below %esp are due to gcc-2.96 bugs.
* default: NO */
extern Bool MC_(clo_workaround_gcc296_bugs);
Modified: trunk/memcheck/mc_leakcheck.c
==============================================================================
--- trunk/memcheck/mc_leakcheck.c (original)
+++ trunk/memcheck/mc_leakcheck.c Sun Sep 29 13:47:32 2013
@@ -427,12 +427,17 @@
typedef
struct {
UInt state:2; // Reachedness.
- UInt pending:1; // Scan pending.
+ UInt pending:1; // Scan pending.
+ UInt heuristic: (sizeof(UInt)*8)-3;
+ // Heuristic with which this block was considered reachable.
+ // LchNone if state != Reachable or no heuristic needed to
+ // consider it reachable.
+
union {
- SizeT indirect_szB : (sizeof(SizeT)*8)-3; // If Unreached, how many bytes
- // are unreachable from here.
- SizeT clique : (sizeof(SizeT)*8)-3; // if IndirectLeak, clique leader
- // to which it belongs.
+ SizeT indirect_szB;
+ // If Unreached, how many bytes are unreachable from here.
+ SizeT clique;
+ // if IndirectLeak, clique leader to which it belongs.
} IorC;
}
LC_Extra;
@@ -461,9 +466,11 @@
// Array of sorted loss record (produced during last leak search).
static LossRecord** lr_array;
+// Value of the heuristics parameter used in the current (or last) leak check.
+static UInt detect_memory_leaks_last_heuristics;
// DeltaMode used the last time we called detect_memory_leaks.
-// The recorded leak errors must be output using a logic based on this delta_mode.
+// The recorded leak errors are output using a logic based on this delta_mode.
// The below avoids replicating the delta_mode in each LossRecord.
LeakCheckDeltaMode MC_(detect_memory_leaks_last_delta_mode);
@@ -495,6 +502,13 @@
SizeT MC_(blocks_reachable) = 0;
SizeT MC_(blocks_suppressed) = 0;
+// Subset of MC_(bytes_reachable) and MC_(blocks_reachable) which
+// are considered reachable due to the corresponding heuristic.
+static SizeT MC_(bytes_heuristically_reachable)[N_LEAK_CHECK_HEURISTICS]
+ = {0,0,0,0};
+static SizeT MC_(blocks_heuristically_reachable)[N_LEAK_CHECK_HEURISTICS]
+ = {0,0,0,0};
+
// Determines if a pointer is to a chunk. Returns the chunk number et al
// via call-by-reference.
static Bool
@@ -568,6 +582,181 @@
}
}
+static const HChar* pp_heuristic(LeakCheckHeuristic h)
+{
+ switch(h) {
+ case LchNone: return "none";
+ case LchStdString: return "stdstring";
+ case LchNewArray: return "newarray";
+ case LchMultipleInheritance: return "multipleinheritance";
+ default: return "???invalid heuristic???";
+ }
+}
+
+// True if ptr looks like the address of a vtable, i.e. if ptr
+// points to an array of pointers to functions.
+// It is assumed the only caller of this function is heuristic_reachedness
+// which must check that ptr is aligned and above page 0.
+// Checking that ptr is above page 0 is an optimisation : it is assumed
+// that no vtable is located in the page 0. So, all small integer values
+// encountered during the scan will not incur the cost of calling this
+// function.
+static Bool aligned_ptr_above_page0_is_vtable_addr(Addr ptr)
+{
+ // ??? If performance problem:
+ // ??? maybe implement a cache (array indexed by ptr % primenr)
+ // ??? of "I am a vtable ptr" ???
+
+ // ??? Maybe the debug info could (efficiently?) be used to detect vtables ?
+
+ // We consider ptr as a vtable ptr if it points to a table
+ // where we find only NULL pointers or pointers pointing at an
+ // executable region. We must find at least 2 non NULL pointers
+ // before considering ptr as a vtable pointer.
+ // We scan a maximum of VTABLE_MAX_CHECK words for these 2 non NULL
+ // pointers.
+#define VTABLE_MAX_CHECK 20
+
+ NSegment const *seg;
+ UInt nr_fn_ptrs = 0;
+ Addr scan;
+ Addr scan_max;
+
+ // First verify ptr points inside a client mapped file section.
+ // ??? is a vtable always in a file mapped readable section ?
+ seg = VG_(am_find_nsegment) (ptr);
+ if (seg == NULL
+ || seg->kind != SkFileC
+ || !seg->hasR)
+ return False;
+
+ // Check potential function pointers, up to a maximum of VTABLE_MAX_CHECK.
+ scan_max = ptr + VTABLE_MAX_CHECK*sizeof(Addr);
+ // If ptr is near the end of seg, avoid scan_max exceeding the end of seg:
+ if (scan_max > seg->end - sizeof(Addr))
+ scan_max = seg->end - sizeof(Addr);
+ for (scan = ptr; scan <= scan_max; scan+=sizeof(Addr)) {
+ Addr pot_fn = *((Addr *)scan);
+ if (pot_fn == 0)
+ continue; // NULL fn pointer. Seems it can happen in vtable.
+ seg = VG_(am_find_nsegment) (pot_fn);
+#if defined(VGA_ppc64)
+ // ppc64 use a thunk table. So, we have one more level of indirection
+ // to follow.
+ if (seg == NULL
+ || seg->kind != SkFileC
+ || !seg->hasR
+ || !seg->hasW)
+ return False; // ptr to nowhere, or not a ptr to thunks.
+ pot_fn = *((Addr *)pot_fn);
+ if (pot_fn == 0)
+ continue; // NULL fn pointer. Seems it can happen in vtable.
+ seg = VG_(am_find_nsegment) (pot_fn);
+#endif
+ if (seg == NULL
+ || seg->kind != SkFileC
+ || !seg->hasT)
+ return False; // ptr to nowhere, or not a fn ptr.
+ nr_fn_ptrs++;
+ if (nr_fn_ptrs == 2)
+ return True;
+ }
+
+ return False;
+}
+
+// If ch is heuristically reachable via an heuristic member of heur_set,
+// returns this heuristic.
+// If ch cannot be considered reachable using one of these heuristics,
+// return LchNone.
+// This should only be called when ptr is an interior ptr to ch.
+// The StdString/NewArray/MultipleInheritance heuristics are directly
+// inspired from DrMemory:
+// see http://www.burningcutlery.com/derek/docs/drmem-CGO11.pdf [section VI,C]
+// and bug 280271.
+static LeakCheckHeuristic heuristic_reachedness (Addr ptr,
+ MC_Chunk *ch, LC_Extra *ex,
+ UInt heur_set)
+{
+ if (HiS(LchStdString, heur_set)) {
+ // Detects inner pointers to Std::String for layout being
+ // length capacity refcount char_array[] \0
+ // where ptr points to the beginning of the char_array.
+ if ( ptr == ch->data + 3 * sizeof(SizeT)) {
+ const SizeT length = *((SizeT*)ch->data);
+ const SizeT capacity = *((SizeT*)ch->data+1);
+ if (length <= capacity
+ && (3 * sizeof(SizeT) + capacity + 1 == ch->szB)) {
+ // ??? could check there is no null byte from ptr to ptr+length-1
+ // ??? and that there is a null byte at ptr+length.
+ // ???
+ // ??? could check that ch->allockind is MC_AllocNew ???
+ // ??? probably not a good idea, as I guess stdstring
+ // ??? allocator can be done via custom allocator
+ // ??? or even a call to malloc ????
+ return LchStdString;
+ }
+ }
+ }
+
+ if (HiS(LchNewArray, heur_set)) {
+ // Detects inner pointers at second word of new[] array, following
+ // a plausible nr of elements.
+ // Such inner pointers are used for arrays of elements
+ // having a destructor, as the delete[] of the array must know
+ // how many elements to destroy.
+ //
+ // We have a strange/wrong case for 'ptr = new MyClass[0];' :
+ // For such a case, the returned ptr points just outside the
+ // allocated chunk. This chunk is then seen as a definite
+ // leak by Valgrind, as it is not considered an interior pointer.
+ // It is the c++ equivalent of bug 99923 (malloc(0) wrongly considered
+ // as definitely leaked). See the trick in find_chunk_for handling
+ // 0-sized block. This trick does not work for 'new MyClass[0]'
+ // because a chunk "word-sized" is allocated to store the (0) nr
+ // of elements.
+ if ( ptr == ch->data + sizeof(SizeT)) {
+ const SizeT nr_elts = *((SizeT*)ch->data);
+ if (nr_elts > 0 && (ch->szB - sizeof(SizeT)) % nr_elts == 0) {
+ // ??? could check that ch->allockind is MC_AllocNewVec ???
+ return LchNewArray;
+ }
+ }
+ }
+
+ if (HiS(LchMultipleInheritance, heur_set)) {
+ // Detect inner pointer used for multiple inheritance.
+ // Assumption is that the vtable pointers are before the object.
+ if (VG_IS_WORD_ALIGNED(ptr)) {
+ Addr first_addr;
+ Addr inner_addr;
+
+ // Avoid the call to is_vtable_addr when the addr is not
+ // aligned or points in the page0, as it is unlikely
+ // a vtable is located in this page. This last optimisation
+ // avoids to call aligned_ptr_above_page0_is_vtable_addr
+ // for all small integers.
+ // Note: we could possibly also avoid calling this function
+ // for small negative integers, as no vtable should be located
+ // in the last page.
+ inner_addr = *((Addr*)ptr);
+ if (VG_IS_WORD_ALIGNED(inner_addr)
+ && inner_addr >= (Addr)VKI_PAGE_SIZE) {
+ first_addr = *((Addr*)ch->data);
+ if (VG_IS_WORD_ALIGNED(first_addr)
+ && first_addr >= (Addr)VKI_PAGE_SIZE
+ && aligned_ptr_above_page0_is_vtable_addr(inner_addr)
+ && aligned_ptr_above_page0_is_vtable_addr(first_addr)) {
+ // ??? could check that ch->allockind is MC_AllocNew ???
+ return LchMultipleInheritance;
+ }
+ }
+ }
+ }
+
+ return LchNone;
+}
+
// If 'ptr' is pointing to a heap-allocated block which hasn't been seen
// before, push it onto the mark stack.
@@ -577,16 +766,45 @@
Int ch_no;
MC_Chunk* ch;
LC_Extra* ex;
+ Reachedness ch_via_ptr; // Is ch reachable via ptr, and how ?
if ( ! lc_is_a_chunk_ptr(ptr, &ch_no, &ch, &ex) )
return;
+
+ if (ex->state == Reachable) {
+ // If block was considered reachable via an heuristic,
+ // and it is now directly reachable via ptr, clear the
+ // heuristic.
+ if (ex->heuristic && ptr == ch->data) {
+ // ch was up to now considered as reachable dur to
+ // ex->heuristic. We have a direct ptr now => clear
+ // the heuristic field.
+ ex->heuristic = LchNone;
+ }
+ return;
+ }
// Possibly upgrade the state, ie. one of:
// - Unreached --> Possible
// - Unreached --> Reachable
// - Possible --> Reachable
- if (ptr == ch->data && is_prior_definite && ex->state != Reachable) {
- // 'ptr' points to the start of the block, and the prior node is
+
+ if (ptr == ch->data)
+ ch_via_ptr = Reachable;
+ else if (detect_memory_leaks_last_heuristics) {
+ ex->heuristic
+ = heuristic_reachedness (ptr, ch, ex,
+ detect_memory_leaks_last_heuristics);
+ if (ex->heuristic)
+ ch_via_ptr = Reachable;
+ else
+ ch_via_ptr = Possible;
+ } else
+ ch_via_ptr = Possible;
+
+ if (ch_via_ptr == Reachable && is_prior_definite) {
+ // 'ptr' points to the start of the block or is to be considered as
+ // pointing to the start of the block, and the prior node is
// definite, which means that this block is definitely reachable.
ex->state = Reachable;
@@ -657,7 +875,8 @@
}
static void
-lc_push_if_a_chunk_ptr(Addr ptr, Int clique, Int cur_clique, Bool is_prior_definite)
+lc_push_if_a_chunk_ptr(Addr ptr,
+ Int clique, Int cur_clique, Bool is_prior_definite)
{
if (-1 == clique)
lc_push_without_clique_if_a_chunk_ptr(ptr, is_prior_definite);
@@ -703,11 +922,12 @@
// 2. Search ptr mode (searched != 0).
// -----------------------------------
// In this mode, searches for pointers to a specific address range
-// In such a case, lc_scan_memory just scans [start..start+len[ for pointers to searched
-// and outputs the places where searched is found. It does not recursively scans the
-// found memory.
+// In such a case, lc_scan_memory just scans [start..start+len[ for pointers
+// to searched and outputs the places where searched is found.
+// It does not recursively scans the found memory.
static void
-lc_scan_memory(Addr start, SizeT len, Bool is_prior_definite, Int clique, Int cur_clique,
+lc_scan_memory(Addr start, SizeT len, Bool is_prior_definite,
+ Int clique, Int cur_clique,
Addr searched, SizeT szB)
{
/* memory scan is based on the assumption that valid pointers are aligned
@@ -795,12 +1015,28 @@
// let's see if its contents point to a chunk.
if (UNLIKELY(searched)) {
if (addr >= searched && addr < searched + szB) {
- if (addr == searched)
+ if (addr == searched) {
VG_(umsg)("*%#lx points at %#lx\n", ptr, searched);
- else
+ MC_(pp_describe_addr) (ptr);
+ } else {
+ Int ch_no;
+ MC_Chunk *ch;
+ LC_Extra *ex;
VG_(umsg)("*%#lx interior points at %lu bytes inside %#lx\n",
ptr, (long unsigned) addr - searched, searched);
- MC_(pp_describe_addr) (ptr);
+ MC_(pp_describe_addr) (ptr);
+ if (lc_is_a_chunk_ptr(addr, &ch_no, &ch, &ex) ) {
+ Int h;
+ for (h = LchStdString; h <= LchMultipleInheritance; h++) {
+ if (heuristic_reachedness(addr, ch, ex, H2S(h)) == h) {
+ VG_(umsg)("block at %#lx considered reachable "
+ "by ptr %#lx using %s heuristic\n",
+ ch->data, addr, pp_heuristic(h));
+ }
+ }
+ tl_assert (h == N_LEAK_CHECK_HEURISTICS - 1);
+ }
+ }
}
} else {
lc_push_if_a_chunk_ptr(addr, clique, cur_clique, is_prior_definite);
@@ -947,7 +1183,8 @@
Int i, n_lossrecords, start_lr_output_scan;
LossRecord* lr;
Bool is_suppressed;
- SizeT old_bytes_leaked = MC_(bytes_leaked); /* to report delta in summary */
+ /* old_* variables are used to report delta in summary. */
+ SizeT old_bytes_leaked = MC_(bytes_leaked);
SizeT old_bytes_indirect = MC_(bytes_indirect);
SizeT old_bytes_dubious = MC_(bytes_dubious);
SizeT old_bytes_reachable = MC_(bytes_reachable);
@@ -958,6 +1195,18 @@
SizeT old_blocks_reachable = MC_(blocks_reachable);
SizeT old_blocks_suppressed = MC_(blocks_suppressed);
+ SizeT old_bytes_heuristically_reachable[N_LEAK_CHECK_HEURISTICS];
+ SizeT old_blocks_heuristically_reachable[N_LEAK_CHECK_HEURISTICS];
+
+ for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++) {
+ old_bytes_heuristically_reachable[i]
+ = MC_(bytes_heuristically_reachable)[i];
+ MC_(bytes_heuristically_reachable)[i] = 0;
+ old_blocks_heuristically_reachable[i]
+ = MC_(blocks_heuristically_reachable)[i];
+ MC_(blocks_heuristically_reachable)[i] = 0;
+ }
+
if (lr_table == NULL)
// Create the lr_table, which holds the loss records.
// If the lr_table already exists, it means it contains
@@ -1003,6 +1252,15 @@
lrkey.state = ex->state;
lrkey.allocated_at = MC_(allocated_at)(ch);
+ if (ex->heuristic) {
+ MC_(bytes_heuristically_reachable)[ex->heuristic] += ch->szB;
+ MC_(blocks_heuristically_reachable)[ex->heuristic]++;
+ if (VG_DEBUG_LEAKCHECK)
+ VG_(printf)("heuristic %s %#lx len %lu\n",
+ pp_heuristic(ex->heuristic),
+ ch->data, (unsigned long)ch->szB);
+ }
+
old_lr = VG_(OSetGen_Lookup)(lr_table, &lrkey);
if (old_lr) {
// We found an existing loss record matching this chunk. Update the
@@ -1108,45 +1366,68 @@
if (VG_(clo_verbosity) > 0 && !VG_(clo_xml)) {
HChar d_bytes[20];
HChar d_blocks[20];
+# define DBY(new,old) \
+ MC_(snprintf_delta) (d_bytes, 20, (new), (old), lcp->deltamode)
+# define DBL(new,old) \
+ MC_(snprintf_delta) (d_blocks, 20, (new), (old), lcp->deltamode)
VG_(umsg)("LEAK SUMMARY:\n");
VG_(umsg)(" definitely lost: %'lu%s bytes in %'lu%s blocks\n",
MC_(bytes_leaked),
- MC_(snprintf_delta) (d_bytes, 20, MC_(bytes_leaked), old_bytes_leaked, lcp->deltamode),
+ DBY (MC_(bytes_leaked), old_bytes_leaked),
MC_(blocks_leaked),
- MC_(snprintf_delta) (d_blocks, 20, MC_(blocks_leaked), old_blocks_leaked, lcp->deltamode));
+ DBL (MC_(blocks_leaked), old_blocks_leaked));
VG_(umsg)(" indirectly lost: %'lu%s bytes in %'lu%s blocks\n",
MC_(bytes_indirect),
- MC_(snprintf_delta) (d_bytes, 20, MC_(bytes_indirect), old_bytes_indirect, lcp->deltamode),
+ DBY (MC_(bytes_indirect), old_bytes_indirect),
MC_(blocks_indirect),
- MC_(snprintf_delta) (d_blocks, 20, MC_(blocks_indirect), old_blocks_indirect, lcp->deltamode) );
+ DBL (MC_(blocks_indirect), old_blocks_indirect));
VG_(umsg)(" possibly lost: %'lu%s bytes in %'lu%s blocks\n",
MC_(bytes_dubious),
- MC_(snprintf_delta) (d_bytes, 20, MC_(bytes_dubious), old_bytes_dubious, lcp->deltamode),
+ DBY (MC_(bytes_dubious), old_bytes_dubious),
MC_(blocks_dubious),
- MC_(snprintf_delta) (d_blocks, 20, MC_(blocks_dubious), old_blocks_dubious, lcp->deltamode) );
+ DBL (MC_(blocks_dubious), old_blocks_dubious));
VG_(umsg)(" still reachable: %'lu%s bytes in %'lu%s blocks\n",
MC_(bytes_reachable),
- MC_(snprintf_delta) (d_bytes, 20, MC_(bytes_reachable), old_bytes_reachable, lcp->deltamode),
+ DBY (MC_(bytes_reachable), old_bytes_reachable),
MC_(blocks_reachable),
- MC_(snprintf_delta) (d_blocks, 20, MC_(blocks_reachable), old_blocks_reachable, lcp->deltamode) );
+ DBL (MC_(blocks_reachable), old_blocks_reachable));
+ for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++)
+ if (old_blocks_heuristically_reachable[i] > 0
+ || MC_(blocks_heuristically_reachable)[i] > 0) {
+ VG_(umsg)(" of which "
+ "reachable via heuristic:\n");
+ break;
+ }
+ for (i = 0; i < N_LEAK_CHECK_HEURISTICS; i++)
+ if (old_blocks_heuristically_reachable[i] > 0
+ || MC_(blocks_heuristically_reachable)[i] > 0)
+ VG_(umsg)(" %19s: "
+ "%'lu%s bytes in %'lu%s blocks\n",
+ pp_heuristic(i),
+ MC_(bytes_heuristically_reachable)[i],
+ DBY (MC_(bytes_heuristically_reachable)[i],
+ old_bytes_heuristically_reachable[i]),
+ MC_(blocks_heuristically_reachable)[i],
+ DBL (MC_(blocks_heuristically_reachable)[i],
+ old_blocks_heuristically_reachable[i]));
VG_(umsg)(" suppressed: %'lu%s bytes in %'lu%s blocks\n",
MC_(bytes_suppressed),
- MC_(snprintf_delta) (d_bytes, 20, MC_(bytes_suppressed), old_bytes_suppressed, lcp->deltamode),
+ DBY (MC_(bytes_suppressed), old_bytes_suppressed),
MC_(blocks_suppressed),
- MC_(snprintf_delta) (d_blocks, 20, MC_(blocks_suppressed), old_blocks_suppressed, lcp->deltamode) );
+ DBL (MC_(blocks_suppressed), old_blocks_suppressed));
if (lcp->mode != LC_Full &&
(MC_(blocks_leaked) + MC_(blocks_indirect) +
MC_(blocks_dubious) + MC_(blocks_reachable)) > 0) {
if (lcp->requested_by_monitor_command)
- VG_(umsg)("To see details of leaked memory, give 'full' arg to leak_check\n");
+ VG_(umsg)("To see details of leaked memory, "
+ "give 'full' arg to leak_check\n");
else
VG_(umsg)("Rerun with --leak-check=full to see details "
"of leaked memory\n");
}
if (lcp->mode == LC_Full &&
- MC_(blocks_reachable) > 0 && !RiS(Reachable,lcp->show_leak_kinds))
- {
+ MC_(blocks_reachable) > 0 && !RiS(Reachable,lcp->show_leak_kinds)) {
VG_(umsg)("Reachable blocks (those to which a pointer "
"was found) are not shown.\n");
if (lcp->requested_by_monitor_command)
@@ -1156,6 +1437,8 @@
"--show-leak-kinds=all\n");
}
VG_(umsg)("\n");
+ #undef DBL
+ #undef DBY
}
}
@@ -1169,7 +1452,8 @@
for (ind = 0; ind < lc_n_chunks; ind++) {
LC_Extra* ind_ex = &(lc_extras)[ind];
- if (ind_ex->state == IndirectLeak && ind_ex->IorC.clique == (SizeT) clique) {
+ if (ind_ex->state == IndirectLeak
+ && ind_ex->IorC.clique == (SizeT) clique) {
MC_Chunk* ind_ch = lc_chunks[ind];
LossRecord* ind_lr;
LossRecordKey ind_lrkey;
@@ -1232,7 +1516,7 @@
old_lr = VG_(OSetGen_Lookup)(lr_table, &lrkey);
if (old_lr) {
// We found an existing loss record matching this chunk.
- // If this is the loss record we are looking for, then output the pointer.
+ // If this is the loss record we are looking for, output the pointer.
if (old_lr == lr_array[loss_record_nr]) {
VG_(umsg)("%p[%lu]\n",
(void *)ch->data, (unsigned long) ch->szB);
@@ -1257,8 +1541,8 @@
// If searched = 0, scan memory root set, pushing onto the mark stack the blocks
// encountered.
-// Otherwise (searched != 0), scan the memory root set searching for ptr pointing
-// inside [searched, searched+szB[.
+// Otherwise (searched != 0), scan the memory root set searching for ptr
+// pointing inside [searched, searched+szB[.
static void scan_memory_root_set(Addr searched, SizeT szB)
{
Int i;
@@ -1332,6 +1616,7 @@
MC_(detect_memory_leaks_last_delta_mode) = lcp->deltamode;
+ detect_memory_leaks_last_heuristics = lcp->heuristics;
// Get the chunks, stop if there were none.
if (lc_chunks) {
@@ -1438,6 +1723,7 @@
for (i = 0; i < lc_n_chunks; i++) {
lc_extras[i].state = Unreached;
lc_extras[i].pending = False;
+ lc_extras[i].heuristic = LchNone;
lc_extras[i].IorC.indirect_szB = 0;
}
@@ -1540,11 +1826,12 @@
VG_(umsg) ("Searching for pointers pointing in %lu bytes from %#lx\n",
szB, address);
+ chunks = find_active_chunks(&n_chunks);
+
// Scan memory root-set, searching for ptr pointing in address[szB]
scan_memory_root_set(address, szB);
// Scan active malloc-ed chunks
- chunks = find_active_chunks(&n_chunks);
for (i = 0; i < n_chunks; i++) {
lc_scan_memory(chunks[i]->data, chunks[i]->szB,
/*is_prior_definite*/True,
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Sun Sep 29 13:47:32 2013
@@ -5021,12 +5021,62 @@
VgRes MC_(clo_leak_resolution) = Vg_HighRes;
UInt MC_(clo_show_leak_kinds) = R2S(Possible) | R2S(Unreached);
UInt MC_(clo_error_for_leak_kinds) = R2S(Possible) | R2S(Unreached);
+UInt MC_(clo_leak_check_heuristics) = 0;
Bool MC_(clo_workaround_gcc296_bugs) = False;
Int MC_(clo_malloc_fill) = -1;
Int MC_(clo_free_fill) = -1;
KeepStacktraces MC_(clo_keep_stacktraces) = KS_alloc_then_free;
Int MC_(clo_mc_level) = 2;
+static Bool MC_(parse_leak_heuristics) ( const HChar *str0, UInt *lhs )
+{
+ SizeT str0len = VG_(strlen)(str0);
+ if (str0len > 1000) return False; /* "obviously invalid" */
+ HChar tok_str0[str0len+1];
+ HChar *saveptr;
+ HChar *token;
+
+ Bool seen_all_kw = False;
+ Bool seen_none_kw = False;
+
+ VG_(strcpy) (tok_str0, str0);
+ *lhs = 0;
+
+ for (token = VG_(strtok_r)(tok_str0, ",", &saveptr);
+ token;
+ token = VG_(strtok_r)(NULL, ",", &saveptr)) {
+ if (0 == VG_(strcmp)(token, "stdstring"))
+ *lhs |= H2S(LchStdString);
+ else if (0 == VG_(strcmp)(token, "newarray"))
+ *lhs |= H2S(LchNewArray);
+ else if (0 == VG_(strcmp)(token, "multipleinheritance"))
+ *lhs |= H2S(LchMultipleInheritance);
+ else if (0 == VG_(strcmp)(token, "all"))
+ seen_all_kw = True;
+ else if (0 == VG_(strcmp)(token, "none"))
+ seen_none_kw = True;
+ else
+ return False;
+ }
+
+ if (seen_all_kw) {
+ if (seen_none_kw || *lhs)
+ return False; // mixing all with either none or a specific value.
+ *lhs = HallS;
+ } else if (seen_none_kw) {
+ if (seen_all_kw || *lhs)
+ return False; // mixing none with either all or a specific value.
+ *lhs = 0;
+ } else {
+ // seen neither all or none, we must see at least one value
+ if (*lhs == 0)
+ return False;
+ }
+
+ return True;
+}
+
+
static Bool mc_process_cmd_line_options(const HChar* arg)
{
const HChar* tmp_str;
@@ -5079,6 +5129,10 @@
if (!MC_(parse_leak_kinds)(tmp_str, &MC_(clo_show_leak_kinds)))
return False;
}
+ else if VG_STR_CLO(arg, "--leak-check-heuristics", tmp_str) {
+ if (!MC_(parse_leak_heuristics)(tmp_str, &MC_(clo_leak_check_heuristics)))
+ return False;
+ }
else if (VG_BOOL_CLO(arg, "--show-reachable", tmp_show)) {
if (tmp_show) {
MC_(clo_show_leak_kinds) = RallS;
@@ -5182,6 +5236,9 @@
" --errors-for-leak-kinds=kind1,kind2,.. which leak kinds are errors?\n"
" [definite,possible]\n"
" where kind is one of definite indirect possible reachable all none\n"
+" --leak-check-heuristics=heur1,heur2,... which heuristics to use for\n"
+" improving leak search false positive [none]\n"
+" where heur is one of stdstring newarray multipleinheritance all none\n"
" --show-reachable=yes same as --show-leak-kinds=all\n"
" --show-reachable=no --show-possibly-lost=yes\n"
" same as --show-leak-kinds=definite,possible\n"
@@ -5313,10 +5370,12 @@
" and outputs a description of <addr>\n"
" leak_check [full*|summary]\n"
" [kinds kind1,kind2,...|reachable|possibleleak*|definiteleak]\n"
+" [heuristics heur1,heur2,...]\n"
" [increased*|changed|any]\n"
" [unlimited*|limited <max_loss_records_output>]\n"
" * = defaults\n"
" where kind is one of definite indirect possible reachable all none\n"
+" where heur is one of stdstring newarray multipleinheritance all none\n"
" Examples: leak_check\n"
" leak_check summary any\n"
" leak_check full kinds indirect,possible\n"
@@ -5408,6 +5467,7 @@
switch (VG_(keyword_id)
("full summary "
"kinds reachable possibleleak definiteleak "
+ "heuristics "
"increased changed any "
"unlimited limited ",
kw, kwd_report_all)) {
@@ -5436,15 +5496,24 @@
case 5: /* definiteleak */
lcp.show_leak_kinds = R2S(Unreached);
break;
- case 6: /* increased */
+ case 6: { /* heuristics */
+ wcmd = VG_(strtok_r) (NULL, " ", &ssaveptr);
+ if (wcmd == NULL || !MC_(parse_leak_heuristics)(wcmd,
+ &lcp.heuristics)) {
+ VG_(gdb_printf) ("missing or malformed heuristics set\n");
+ err++;
+ }
+ break;
+ }
+ case 7: /* increased */
lcp.deltamode = LCD_Increased; break;
- case 7: /* changed */
+ case 8: /* changed */
lcp.deltamode = LCD_Changed; break;
- case 8: /* any */
+ case 9: /* any */
lcp.deltamode = LCD_Any; break;
- case 9: /* unlimited */
+ case 10: /* unlimited */
lcp.max_loss_records_output = 999999999; break;
- case 10: { /* limited */
+ case 11: { /* limited */
Int int_value;
const HChar* endptr;
@@ -5515,7 +5584,7 @@
switch (kwdid) {
case -2: break;
case -1: break;
- case 0:
+ case 0: /* addressable */
if (is_mem_addressable ( address, szB, &bad_addr ))
VG_(printf) ("Address %p len %ld addressable\n",
(void *)address, szB);
@@ -5525,7 +5594,8 @@
(void *)address, szB, (void *) bad_addr);
MC_(pp_describe_addr) (address);
break;
- case 1: res = is_mem_defined ( address, szB, &bad_addr, &otag );
+ case 1: /* defined */
+ res = is_mem_defined ( address, szB, &bad_addr, &otag );
if (MC_AddrErr == res)
VG_(printf)
("Address %p len %ld not addressable:\nbad address %p\n",
@@ -5679,6 +5749,7 @@
lcp.show_leak_kinds = MC_(clo_show_leak_kinds);
lcp.errors_for_leak_kinds = MC_(clo_error_for_leak_kinds);
+ lcp.heuristics = MC_(clo_leak_check_heuristics);
if (arg[2] == 0)
lcp.deltamode = LCD_Any;
@@ -6458,6 +6529,7 @@
LeakCheckParams lcp;
lcp.mode = MC_(clo_leak_check);
lcp.show_leak_kinds = MC_(clo_show_leak_kinds);
+ lcp.heuristics = MC_(clo_leak_check_heuristics);
lcp.errors_for_leak_kinds = MC_(clo_error_for_leak_kinds);
lcp.deltamode = LCD_Any;
lcp.max_loss_records_output = 999999999;
Modified: trunk/memcheck/tests/Makefile.am
==============================================================================
--- trunk/memcheck/tests/Makefile.am (original)
+++ trunk/memcheck/tests/Makefile.am Sun Sep 29 13:47:32 2013
@@ -88,6 +88,7 @@
cond_st.vgtest cond_st.stdout.exp cond_st.stderr.exp-arm \
cond_st.stderr.exp-64bit-non-arm \
cond_st.stderr.exp-32bit-non-arm \
+ leak_cpp_interior.stderr.exp leak_cpp_interior.stderr.exp-64bit leak_cpp_interior.vgtest \
custom_alloc.stderr.exp custom_alloc.vgtest \
custom_alloc.stderr.exp-s390x-mvc \
custom-overlap.stderr.exp custom-overlap.vgtest \
@@ -282,6 +283,7 @@
clireq_nofill \
clo_redzone \
cond_ld_st \
+ leak_cpp_interior \
custom_alloc \
custom-overlap \
deep-backtrace \
@@ -365,6 +367,8 @@
atomic_incs_CFLAGS = $(AM_CFLAGS)
endif
+leak_cpp_interior_SOURCES = leak_cpp_interior.cpp
+
deep_templates_SOURCES = deep_templates.cpp
deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
Added: trunk/memcheck/tests/leak_cpp_interior.cpp
==============================================================================
--- trunk/memcheck/tests/leak_cpp_interior.cpp (added)
+++ trunk/memcheck/tests/leak_cpp_interior.cpp Sun Sep 29 13:47:32 2013
@@ -0,0 +1,105 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <string>
+#include "../memcheck.h"
+// Derived from test provided by Timur Iskhodzhanov (bug 280271)
+
+
+class MyClass
+{
+public:
+ ~MyClass()
+ { fprintf(stderr, "destruct MyClass\n");
+ }
+};
+
+// Two hierarchies using MI, one with no fields,
+// the other one with some data.
+struct Ae
+{
+ virtual ~Ae()
+ { fprintf(stderr, "destruct Ae\n");
+ }
+};
+struct Be
+{
+ virtual ~Be()
+ { fprintf(stderr, "destruct Be\n");
+ }
+};
+struct Ce : public Ae, public Be
+{
+ virtual ~Ce()
+ { fprintf(stderr, "destruct Ce\n");
+ }
+};
+
+struct A
+{
+ char a;
+ A()
+ { a = 'a';
+ }
+ virtual ~A()
+ { fprintf(stderr, "destruct A\n");
+ }
+};
+struct B
+{
+ char b;
+ B()
+ { b = 'b';
+ }
+ virtual ~B()
+ { fprintf(stderr, "destruct B\n");
+ }
+};
+struct C : public A, public B
+{
+ char c;
+ C()
+ { c = 'c';
+ }
+ virtual ~C()
+ { fprintf(stderr, "destruct C\n");
+ }
+};
+
+int main() {
+ std::string str = "Valgrind"; // interior ptr.
+ std::string str2 = str;
+ MyClass *ptr = new MyClass[3]; // interior ptr.
+ MyClass *ptr2 = new MyClass[0]; // "interior but exterior ptr".
+ // ptr2 points after the chunk, is wrongly considered by memcheck as definitely leaked.
+
+ Be *ptrBCe = new Ce; // interior ptr.
+ Ae *ptrACe = new Ce; // not an interior pointer.
+ B *ptrBC = new C; // interior ptr.
+ A *ptrAC = new C; // not an interior pointer.
+
+
+ str2 += " rocks (str2)\n"; // interior ptr.
+
+ VALGRIND_MONITOR_COMMAND("v.set log_output");
+
+ fprintf(stderr, "VALGRIND_DO_LEAK_CHECK\n");
+ VALGRIND_DO_LEAK_CHECK; // All possible leaks should be detected, giving only reachable data.
+
+ // Check individually each heuristic
+ fprintf(stderr, "leak_check summary heuristics multipleinheritance\n");
+ VALGRIND_MONITOR_COMMAND("leak_check summary heuristics multipleinheritance");
+ fprintf(stderr, "leak_check summary any heuristics newarray\n");
+ VALGRIND_MONITOR_COMMAND("leak_check summary heuristics newarray");
+ fprintf(stderr, "leak_check summary heuristics stdstring\n");
+ VALGRIND_MONITOR_COMMAND("leak_check summary heuristics stdstring");
+
+ delete [] ptr;
+ delete [] ptr2;
+ delete ptrBCe;
+ delete ptrACe;
+ delete ptrBC;
+ delete ptrAC;
+ fprintf(stderr, "Finished!\n");
+ return 0;
+}
+
Added: trunk/memcheck/tests/leak_cpp_interior.stderr.exp
==============================================================================
--- trunk/memcheck/tests/leak_cpp_interior.stderr.exp (added)
+++ trunk/memcheck/tests/leak_cpp_interior.stderr.exp Sun Sep 29 13:47:32 2013
@@ -0,0 +1,81 @@
+
+valgrind output will go to log
+VALGRIND_DO_LEAK_CHECK
+4 bytes in 1 blocks are definitely lost in loss record ... of ...
+ by 0x........: main (leak_cpp_interior.cpp:72)
+
+LEAK SUMMARY:
+ definitely lost: 4 bytes in 1 blocks
+ indirectly lost: 0 bytes in 0 blocks
+ possibly lost: 0 bytes in 0 blocks
+ still reachable: 111 bytes in 7 blocks
+ of which reachable via heuristic:
+ stdstring : 56 bytes in 2 blocks
+ newarray : 7 bytes in 1 blocks
+ multipleinheritance: 24 bytes in 2 blocks
+ suppressed: 0 bytes in 0 blocks
+Reachable blocks (those to which a pointer was found) are not shown.
+To see them, rerun with: --leak-check=full --show-leak-kinds=all
+
+leak_check summary heuristics multipleinheritance
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 63 (+63) bytes in 3 (+3) blocks
+ still reachable: 48 (-63) bytes in 4 (-3) blocks
+ of which reachable via heuristic:
+ stdstring : 0 (-56) bytes in 0 (-2) blocks
+ newarray : 0 (-7) bytes in 0 (-1) blocks
+ multipleinheritance: 24 (+0) bytes in 2 (+0) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary any heuristics newarray
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 80 (+17) bytes in 4 (+1) blocks
+ still reachable: 31 (-17) bytes in 3 (-1) blocks
+ of which reachable via heuristic:
+ newarray : 7 (+7) bytes in 1 (+1) blocks
+ multipleinheritance: 0 (-24) bytes in 0 (-2) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics stdstring
+LEAK SUMMARY:
+ definitely lost: 4 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 31 (-49) bytes in 3 (-1) blocks
+ still reachable: 80 (+49) bytes in 4 (+1) blocks
+ of which reachable via heuristic:
+ stdstring : 56 (+56) bytes in 2 (+2) blocks
+ newarray : 0 (-7) bytes in 0 (-1) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+destruct MyClass
+destruct MyClass
+destruct MyClass
+destruct Ce
+destruct Be
+destruct Ae
+destruct Ce
+destruct Be
+destruct Ae
+destruct C
+destruct B
+destruct A
+destruct C
+destruct B
+destruct A
+Finished!
+
+HEAP SUMMARY:
+ in use at exit: 0 bytes in 0 blocks
+ total heap usage: 8 allocs, 8 frees, 115 bytes allocated
+
+All heap blocks were freed -- no leaks are possible
+
+For counts of detected and suppressed errors, rerun with: -v
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/memcheck/tests/leak_cpp_interior.stderr.exp-64bit
==============================================================================
--- trunk/memcheck/tests/leak_cpp_interior.stderr.exp-64bit (added)
+++ trunk/memcheck/tests/leak_cpp_interior.stderr.exp-64bit Sun Sep 29 13:47:32 2013
@@ -0,0 +1,81 @@
+
+valgrind output will go to log
+VALGRIND_DO_LEAK_CHECK
+8 bytes in 1 blocks are definitely lost in loss record ... of ...
+ by 0x........: main (leak_cpp_interior.cpp:72)
+
+LEAK SUMMARY:
+ definitely lost: 8 bytes in 1 blocks
+ indirectly lost: 0 bytes in 0 blocks
+ possibly lost: 0 bytes in 0 blocks
+ still reachable: 187 bytes in 7 blocks
+ of which reachable via heuristic:
+ stdstring : 80 bytes in 2 blocks
+ newarray : 11 bytes in 1 blocks
+ multipleinheritance: 48 bytes in 2 blocks
+ suppressed: 0 bytes in 0 blocks
+Reachable blocks (those to which a pointer was found) are not shown.
+To see them, rerun with: --leak-check=full --show-leak-kinds=all
+
+leak_check summary heuristics multipleinheritance
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 91 (+91) bytes in 3 (+3) blocks
+ still reachable: 96 (-91) bytes in 4 (-3) blocks
+ of which reachable via heuristic:
+ stdstring : 0 (-80) bytes in 0 (-2) blocks
+ newarray : 0 (-11) bytes in 0 (-1) blocks
+ multipleinheritance: 48 (+0) bytes in 2 (+0) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary any heuristics newarray
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 128 (+37) bytes in 4 (+1) blocks
+ still reachable: 59 (-37) bytes in 3 (-1) blocks
+ of which reachable via heuristic:
+ newarray : 11 (+11) bytes in 1 (+1) blocks
+ multipleinheritance: 0 (-48) bytes in 0 (-2) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+leak_check summary heuristics stdstring
+LEAK SUMMARY:
+ definitely lost: 8 (+0) bytes in 1 (+0) blocks
+ indirectly lost: 0 (+0) bytes in 0 (+0) blocks
+ possibly lost: 59 (-69) bytes in 3 (-1) blocks
+ still reachable: 128 (+69) bytes in 4 (+1) blocks
+ of which reachable via heuristic:
+ stdstring : 80 (+80) bytes in 2 (+2) blocks
+ newarray : 0 (-11) bytes in 0 (-1) blocks
+ suppressed: 0 (+0) bytes in 0 (+0) blocks
+To see details of leaked memory, give 'full' arg to leak_check
+
+destruct MyClass
+destruct MyClass
+destruct MyClass
+destruct Ce
+destruct Be
+destruct Ae
+destruct Ce
+destruct Be
+destruct Ae
+destruct C
+destruct B
+destruct A
+destruct C
+destruct B
+destruct A
+Finished!
+
+HEAP SUMMARY:
+ in use at exit: 0 bytes in 0 blocks
+ total heap usage: 8 allocs, 8 frees, 195 bytes allocated
+
+All heap blocks were freed -- no leaks are possible
+
+For counts of detected and suppressed errors, rerun with: -v
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/memcheck/tests/leak_cpp_interior.vgtest
==============================================================================
--- trunk/memcheck/tests/leak_cpp_interior.vgtest (added)
+++ trunk/memcheck/tests/leak_cpp_interior.vgtest Sun Sep 29 13:47:32 2013
@@ -0,0 +1,2 @@
+prog: leak_cpp_interior
+vgopts: --leak-check=summary --leak-check-heuristics=multipleinheritance,stdstring,newarray
|
|
From: <sv...@va...> - 2013-09-29 10:00:02
|
Author: sewardj
Date: Sun Sep 29 09:59:50 2013
New Revision: 13581
Log:
Update bug status.
Modified:
trunk/NEWS
trunk/docs/internals/3_8_BUGSTATUS.txt
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Sep 29 09:59:50 2013
@@ -571,6 +571,13 @@
308930 syscall name_to_handle_at (303 on amd64) not handled
FIXED 13304
+307113 s390x: DFP support
+ FIXED
+
+164485 VG_N_SEGNAMES and VG_N_SEGMENTS are (still) too small
+ == https://bugzilla.redhat.com/show_bug.cgi?id=730303
+ FIXED 13567
+
Release 3.8.1 (19 September 2012)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/docs/internals/3_8_BUGSTATUS.txt
==============================================================================
--- trunk/docs/internals/3_8_BUGSTATUS.txt (original)
+++ trunk/docs/internals/3_8_BUGSTATUS.txt Sun Sep 29 09:59:50 2013
@@ -130,10 +130,6 @@
gkw extra suppression?
gcp libnss3.so debuginfo read hang
-164485 VG_N_SEGNAMES and VG_N_SEGMENTS are (still) too small
- == https://bugzilla.redhat.com/show_bug.cgi?id=730303
- FIX THIS **PRIO
-
306947 s390x: BFP rounding mode improvements
Proposal, no action
@@ -143,15 +139,12 @@
211352 helgrind races in helgrind's own mythread_wrapper
NEEDINFO
-307113 s390x: DFP support
- Huge; in progress. Queried as to status.
-
307367 amd64->IR: 0xF2 0x48 0xF 0x5F 0x3E 0xF2 0x48 0xF
redundant-REX, should be easy to fix
307399 amd64->IR: 0xC4 0x62 0x55 0x2E 0x18 0x44 0x39 0x87
(vmaskmovps %ymm11,%ymm5,(%rax))
- CONDITIONAL STORES
+ CONDITIONAL STORES -- probably fixed?
307415 3.8.1 build error - OSX Lion 10.7.4 duplicate symbol
_mach_make_memory_entry
@@ -161,7 +154,7 @@
QUERIED (unclear how to fix)
Severity: low
-307557 Leaks on Mac OS X 10.7.5 libraries at
+307557 *Leaks on Mac OS X 10.7.5 libraries at
ImageLoader::recursiveInitialization
SHOULD FIX (simple extra supp)
FIX 3.9
@@ -169,7 +162,7 @@
308027 Warning: negative range in .debug_loc section
QUERIED -- not sure this needs fixing or not
-308135 PPC32 MPC8xx has 16 bytes cache size
+308135 *PPC32 MPC8xx has 16 bytes cache size
HAS_PATCH -- should take this
79362 Debug info is lost for .so files when they are dlclose'd
@@ -180,7 +173,7 @@
------ Thu Oct 11 18:51:26 CEST 2012
-289578 Backtraces with ARM unwind tables (=without debug symbols) and
+289578 *Backtraces with ARM unwind tables (=without debug symbols) and
support for offline symbol resolving
3.9 FIX (cleanup and partial commit -- stack scan)
@@ -201,7 +194,7 @@
308729 vex x86->IR: unhandled instruction bytes 0xf 0x5
HAS_PATCH, but NEEDINFO
-243232 Inconsistent Lock Orderings report with trylock
+243232 *Inconsistent Lock Orderings report with trylock (PBOS?)
Almost certainly real (+ probably a dup). No action so far.
237920 valgrind segfault on fork failure
@@ -228,7 +221,7 @@
Has patch, but needs further checking
Does not appear to be much enthusiasm for this
-309827 add support for nvidia (nvmem) ioctls
+309827 *add support for nvidia (nvmem) ioctls
A bunch of Android hackery from VladV; needs pulling apart
FIX 3.9 (commit)
@@ -249,7 +242,6 @@
Probably INVALID
-- Wed Dec 5 23:41:20 CET 2012
-XXX 20 Sept 2013: triaged back to here
311544 sys_fork() calls VG_(do_atfork_pre)() AFTER forking()
FIX 3.9 (easy)
@@ -381,7 +373,7 @@
No action so far
Needs review; would be nice to redo this with a more robust API
-318050 libmpiwrap fails to compile with out-of-source build
+318050 *libmpiwrap fails to compile with out-of-source build
FIX 3.9 (commit)
Thu Apr 11 18:16:04 CEST 2013
@@ -424,7 +416,7 @@
A bigger patch depends on it, but that has not appeared yet
Wishlist, + as yet incomplete
-320131 WARNING: unhandled syscall: 369 on ARM (prlimit64)
+320131 *WARNING: unhandled syscall: 369 on ARM (prlimit64)
FIX 3.9 (the simple patch)
320546 valgrind exits with "Assertion 'in_rx' failed"
@@ -432,7 +424,7 @@
Need more info (the .so); queried.
MAYBE FIX 3.9 (potentially serious)
-320661 vgModuleLocal_read_elf_debug_info(): "Assertion '!di->soname'
+320661 *vgModuleLocal_read_elf_debug_info(): "Assertion '!di->soname'
failed" on weird files
Has patch;
FIX 3.9 (commit); looks very simple
@@ -441,7 +433,7 @@
Not sure what this is. Queried.
Severity: high Audience: low (??)
-320998 vex amd64->IR pcmpestri and pcmpestrm SSE4.2 instructions are
+320998 *vex amd64->IR pcmpestri and pcmpestrm SSE4.2 instructions are
unsupported (by version 3.8.1)
PCMPxSTRx $0x30, $0x40
Severity: high Audience: low
@@ -463,19 +455,19 @@
Tue Jul 2 12:15:07 CEST 2013
-321888 Unhandled instruction: LDRH (Thumb)
+321888 *Unhandled instruction: LDRH (Thumb)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-321891 Unhandled instruction: LDRHT (Thumb)
+321891 *Unhandled instruction: LDRHT (Thumb)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-321892 Unhandled instruction: LDRSH (Thumb)
+321892 *Unhandled instruction: LDRSH (Thumb)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-321902 disInstr(ARM): 0xECECA102
+321902 *disInstr(ARM): 0xECECA102
321903 == 321902
MAYBE 3.9 (query vgolubev)
@@ -483,7 +475,7 @@
MIPS64; has patch; assigned to Petar
MAYBE 3.9 (query Petar)
-322254 Show threadname together with tid if set by application
+322254 *Show threadname together with tid if set by application
Contains plausible looking patch (what's with XML output??)
FIX 3.9 (commit)
@@ -496,7 +488,7 @@
Contains plausible patch. Is bug fix. (should take)
FIX 3.9 (commit)
-322563 vex mips->IR: unhandled instruction bytes: 0x70 0x83 0xF0 0x3A
+322563 *vex mips->IR: unhandled instruction bytes: 0x70 0x83 0xF0 0x3A
MIPS; assigned to Petar
MAYBE 3.9 (query Petar)
@@ -515,11 +507,11 @@
QUERIED
Severity: med Audience: low
-323035 Unhandled instruction: LDRSHT(Thumb)
+323035 *Unhandled instruction: LDRSHT(Thumb)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-323036 Unhandled instruction: SMMLS (ARM and Thumb)
+323036 *Unhandled instruction: SMMLS (ARM and Thumb)
Has patch; plausible (needs checking) (duplication?)
FIX 3.9 (commit)
@@ -528,19 +520,19 @@
QUERIED .. is 322254 good enough?
Severity: low Audience: med
-323175 Unhandled instruction: SMLALD (ARM + Thumb)
+323175 *Unhandled instruction: SMLALD (ARM + Thumb)
Has patch; plausible (needs checking) (duplication?)
FIX 3.9 (commit)
-323177 Unhandled instruction: SMLSLD (ARM + Thumb)
+323177 *Unhandled instruction: SMLSLD (ARM + Thumb)
Has patch; plausible (needs checking) (duplication?)
FIX 3.9 (commit)
-323178 Unhandled instruction: PLDW register (ARM)
+323178 *Unhandled instruction: PLDW register (ARM)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
-323179 Unhandled instruction: PLDW immediate (ARM)
+323179 *Unhandled instruction: PLDW immediate (ARM)
Has patch; plausible (needs checking)
FIX 3.9 (commit)
@@ -554,7 +546,7 @@
FIX 3.9 if can do it at no risk and no CPUID hassle
-- ask mjw
-323432 Calling pthread_cond_destroy() or pthread_mutex_destroy()
+323432 *Calling pthread_cond_destroy() or pthread_mutex_destroy()
with PTHREAD_COND_INITIALIZER/PTHREAD_MUTEX_INITIALIZER
triggers false positive
Has patch from pbos
@@ -567,14 +559,14 @@
64-bit uncleanness; no action so far; QUERIED
Severity: med Audience: low
-323777 Documentation does not warn of sgcheck+darwin incompatibility
+323777 *Documentation does not warn of sgcheck+darwin incompatibility
FIX 3.9
-323803 Transactional memory instructions are not supported for Power
+323803 *Transactional memory instructions are not supported for Power
This is TM scheme 1 (immediate fail). Needs landing.
FIX 3.9 (?? queried Carl)
-324047 Valgrind doesn't support [LDR,ST]{S}[B,H]T ARM instructions
+324047 *Valgrind doesn't support [LDR,ST]{S}[B,H]T ARM instructions
Has patch; plausible (needs checking) (aren't these done already?)
FIX 3.9 (commit)
@@ -590,12 +582,12 @@
324081 3.8.1 Valgrind periodically hangs in long-running application
NEEDINFO (requested)
-324149 helgrind: When pthread_cond_timedwait returns ETIMEDOUT, helgrind
+324149 *helgrind: When pthread_cond_timedwait returns ETIMEDOUT, helgrind
thinks the condvar is still waited on
Has patches; needs looking at (LOOKS OK)
FIX 3.9 (commit)
-324181 mmap does not handle MAP_32BIT
+324181 *mmap does not handle MAP_32BIT
Should at least detect and fail this case
FIX 3.9 (to fail MAP_32BIT; should be easy)
@@ -608,7 +600,7 @@
Hmm, looks like a real bug.
Severity: med Audience: low
-324421 Support for fanotify API on ARM architecture
+324421 *Support for fanotify API on ARM architecture
Has simple patch; should apply.
FIX 3.9 (trivial patch)
@@ -626,15 +618,15 @@
In progress
Severity: low Audience: low
-324834 Unhandled instructions in Microsoft C run-time (msvcrt.dll) for x86_64
+324834 *Unhandled instructions in Microsoft C run-time (msvcrt.dll) for x86_64
Should be easy to fix; queried
Severity: high Audience: low
324882 CPUID should depend on VEX capabilities, not on underlying CPU
Middle-term cleanup; not urgent
-324894 Phase 3 support for IBM Power ISA 2.07
- Waiting for review (but by who?)
+324894 *Phase 3 support for IBM Power ISA 2.07
+ Waiting to land
MAYBE 3.9
Thu Sep 19 10:34:49 CEST 2013
|
|
From: Julian S. <js...@ac...> - 2013-09-29 09:58:43
|
It's well overdue for another release. I propose to release 3.9.0 on
the last day of October, Thursday 31st, so we really need to have the
trunk stable for branching by the 15th.
There is a huge list of open bugs to choose from, far more than we
have resources to fix. There's a fairly up to date summary in the
trunk, in docs/internals/3_8_BUGSTATUS.txt. Please look there for
the overall top level current state.
Here are the ones I'd really like to have fixed for the release. More
than half of these have patches attached, which just need to be checked
over and committed. Please take some of these and land or fix them, if
they fall in your area of expertise. I will make a start by landing the
ARM/Thumb ones.
307557 Leaks on Mac OS X 10.7.5 libraries at ImageLoader::recursiveInit[..]
308135 PPC32 MPC8xx has 16 bytes cache size
289578 Backtraces with ARM unwind tables (stack scan flags) (/me to take)
243232 Inconsistent Lock Orderings report with trylock (PBOS?)
309827 add support for nvidia (nvmem) ioctls
318050 libmpiwrap fails to compile with out-of-source build
320131 WARNING: unhandled syscall: 369 on ARM (prlimit64)
320661 vgModuleLocal_read_elf_debug_info(): "Assertion '!di->soname'
320998 vex amd64->IR pcmpestri and pcmpestrm SSE4.2 instruction (easy)
321888 Unhandled instruction: LDRH (Thumb)
321891 Unhandled instruction: LDRHT (Thumb)
321892 Unhandled instruction: LDRSH (Thumb)
321902 disInstr(ARM): 0xECECA102
322254 Show threadname together with tid if set by application
322563 vex mips->IR: unhandled instruction bytes: 0x70 0x83 0xF0 0x3A
323035 Unhandled instruction: LDRSHT(Thumb)
323036 Unhandled instruction: SMMLS (ARM and Thumb)
323175 Unhandled instruction: SMLALD (ARM + Thumb)
323177 Unhandled instruction: SMLSLD (ARM + Thumb)
323178 Unhandled instruction: PLDW register (ARM)
323179 Unhandled instruction: PLDW immediate (ARM)
323432 Calling pthread_cond_destroy() or pthread_mutex_destroy()
323777 Documentation does not warn of sgcheck+darwin incompatibility
323803 Transactional memory instructions are not supported for Power
324047 Valgrind doesn't support [LDR,ST]{S}[B,H]T ARM instructions
324149 helgrind: When pthread_cond_timedwait returns ETIMEDOUT, helgrind
324181 mmap does not handle MAP_32BIT
324421 Support for fanotify API on ARM architecture
324834 Unhandled instructions in Microsoft C run-time for x86_64 (easy)
324894 Phase 3 support for IBM Power ISA 2.07
Other fixes that I'd like to ship:
* There's been some discussion on the users list, about Helgrind's
lock order checker giving false reports in the case of trylocks.
There may be a simple fix. 243232 is an example of this. PBos?
* Support for Haswell RTM (restricted transactional memory insns) is
in, but Haswell HLE isn't supported yet. To make this work requires
the x86_64 insn decoder to accept XACQUIRE/XRELEASE prefixes (F2/F3)
on certain memory instructions as listed by the Intel documentation.
Should be easy.
* Initial support for Power TM instructions needs to land (323803).
CarlL is on the case, I think.
* Syscall/Mach trap/ioctl tidyups for OSX10.8, if fixes appear in
time.
Apart from that, testing on recent distros and with the latest GCCs
and glibcs would be helpful. I'd particularly like to know that it
works OK on cutting edge Fedora on as many architectures as we can
test. Testing on recent Android release would also be appreciated.
Anything critical that I forgot?
J
|