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
(12) |
2
(14) |
3
(8) |
|
4
(6) |
5
(15) |
6
(14) |
7
(13) |
8
(14) |
9
(13) |
10
(9) |
|
11
(6) |
12
(12) |
13
(10) |
14
(12) |
15
(9) |
16
(9) |
17
(2) |
|
18
(16) |
19
(21) |
20
(17) |
21
(6) |
22
(5) |
23
(3) |
24
(12) |
|
25
(10) |
26
(5) |
27
(15) |
28
(16) |
29
(12) |
30
(11) |
31
(11) |
|
From: <sv...@va...> - 2015-01-14 13:03:58
|
Author: rhyskidd
Date: Wed Jan 14 13:03:51 2015
New Revision: 14871
Log:
Retroactive NEWS update for r14859, r14860 and r14861
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Jan 14 13:03:51 2015
@@ -67,6 +67,8 @@
tronical and pushfpopf tests)
339706 Fix false positive for ioctl(TIOCSIG) on linux
339721 assertion 'check_sibling == sibling' failed in readdwarf3.c ...
+339755 Fix known deliberate memory leak in setenv() on Mac OS X 10.9
+339780 Fix known uninitialised read in pthread_rwlock_init() on Mac OS X 10.9
339789 Fix none/tests/execve test on Mac OS X 10.9
339808 Fix none/tests/rlimit64_nofile test on Mac OS X 10.9
339853 arm64 times syscall unknown
@@ -96,6 +98,7 @@
341238 Recognize GCC5/DWARFv5 DW_LANG constants (Go, C11, C++11, C++14)
341539 VG_(describe_addr) should not describe address as belonging to client
segment if it is past the heap end
+341613 Enable building of manythreads and thread-exits tests on Mac OS X
341789 aarch64: shmat fails with valgrind on ARMv8
342063 wrong format specifier for test mcblocklistsearch in gdbserver_tests
342221 socket connect false positive uninit memory for unknown af family
|
|
From: Julian S. <js...@ac...> - 2015-01-14 10:43:55
|
An initial implementation of partial inlining of instrumentation fast paths that would have been, until now, in C helper functions, is now available at svn://svn.valgrind.org/valgrind/branches/NCODE This is the first runnable code. What it does (atm) is: instead of generating calls to MC_(helperc_LOADV64le) -- the most common helper for 64-bit Memcheck -- it generates in-line the abstract machine code template shown below, which is defined at mk_tmpl__LOADV64le_on_64. None of the other Memcheck helper functions have been template-ised yet. Each template is divided into two sections, the hot part, really in-line, and the cold part, placed at the end of the translation in the hope of not trashing the instruction cache too much. The template is translated into amd64 machine code by emit_AMD64NInstr, which will have to be reimplemented for each target. But it's pretty short, about 340 lines of code. I believe the implementation is correct. Unfortunately it doesn't seem to give much of a speedup :-/. Is under investigation. J # a0 is an arg register, r0 is a result register, s0 is a scratch register NCode [r0] = "LOADV64le_on_64" [a0] s0 { hot: 0 tst.w a0, #0xFFFFFFF000000007 1 bnz cold.4 2 shr.w s0, a0, #16 3 ld.64 s0, [0x3847D880 + s0 << #3] 4 and.w r0, a0, #0xFFFF 5 shr.w r0, r0, #3 6 ld.16 r0, [s0 + r0 << #1] 7 cmp.w r0, #0xAAAA 8 bnz cold.0 9 imm.w r0, #0x0 10 nop cold: 0 mov.w s0, r0 1 imm.w r0, #0xFFFFFFFFFFFFFFFF 2 cmp.w s0, #0x5555 3 bz hot.10 4 call r0 = mc_LOADV64le_slow[3800AE40](a0) 5 b hot.10 } An example instantiation on amd64 is as shown below. One of the first things to do is reduce the number of registers saved around the slow-path function call. NCode-AMD64:LOADV64le_on_64 [%r10] <= [%r13] scratch [%r9] hot.0: tst.w a0, #0xFFFFFFF000000007 movabsq $0xFFFFFFF000000007,%r11 andq %r13,%r11 hot.1: bnz cold.4 jnz rel32 hot.2: shr.w s0, a0, #16 movq %r13,%r9 shrq $16,%r9 hot.3: ld.64 s0, [0x3847D880 + s0 << #3] movabsq $0x0,%r11 movq 0x3847D880(%r11,%r9,8),%r9 hot.4: and.w r0, a0, #0xFFFF movq %r13,%r10 andq $0xFFFF,%r10 hot.5: shr.w r0, r0, #3 shrq $3,%r10 hot.6: ld.16 r0, [s0 + r0 << #1] movzwq 0x0(%r9,%r10,2),%r10 hot.7: cmp.w r0, #0xAAAA cmpq $0xAAAA,%r10 hot.8: bnz cold.0 jnz rel32 hot.9: imm.w r0, #0x0 movabsq $0x0,%r10 hot.10: nop cold.0: mov.w s0, r0 movq %r10,%r9 cold.1: imm.w r0, #0xFFFFFFFFFFFFFFFF movabsq $0xFFFFFFFFFFFFFFFF,%r10 cold.2: cmp.w s0, #0x5555 cmpq $0x5555,%r9 cold.3: bz hot.10 jz rel32 cold.4: call r0 = mc_LOADV64le_slow[3800AE40](a0) # set1: {%rbx,%rsi,%rdi,%r8,%r9,%r10,%r12,%r13,%r14,%r15,%xmm3,%xmm4,%xmm5,%xmm6,%xmm7,%xmm8,%xmm9,%xmm10,%xmm11,%xmm12} # set2: {%r9,%r10,%r13} # set3: {%rbx,%rbp,%r12,%r13,%r14,%r15} # set4: {%r10} # pres: {%rsi,%rdi,%r8,%r9,%xmm3,%xmm4,%xmm5,%xmm6,%xmm7,%xmm8,%xmm9,%xmm10,%xmm11,%xmm12} subq $0xE0,%rsp movq %rsi,(%rsp) movq %rdi,0x10(%rsp) movq %r8,0x20(%rsp) movq %r9,0x30(%rsp) movups %xmm3,0x40(%rsp) movups %xmm4,0x50(%rsp) movups %xmm5,0x60(%rsp) movups %xmm6,0x70(%rsp) movups %xmm7,0x80(%rsp) movups %xmm8,0x90(%rsp) movups %xmm9,0xA0(%rsp) movups %xmm10,0xB0(%rsp) movups %xmm11,0xC0(%rsp) movups %xmm12,0xD0(%rsp) movq %r13,%rdi movabsq $0x3800AE40,%r11 call* %r11 movq %rax,%r10 movq (%rsp),%rsi movq 0x10(%rsp),%rdi movq 0x20(%rsp),%r8 movq 0x30(%rsp),%r9 movups 0x40(%rsp),%xmm3 movups 0x50(%rsp),%xmm4 movups 0x60(%rsp),%xmm5 movups 0x70(%rsp),%xmm6 movups 0x80(%rsp),%xmm7 movups 0x90(%rsp),%xmm8 movups 0xA0(%rsp),%xmm9 movups 0xB0(%rsp),%xmm10 movups 0xC0(%rsp),%xmm11 movups 0xD0(%rsp),%xmm12 addq $0xE0,%rsp cold.5: b hot.10 jmp rel32 reloc: (hot[273] bits[31..0]) refers-to (cold.4) bias -4 rshift 0 reloc: (hot[273] bits[31..0]) refers-to (cold[302]) bias -4 rshift 0 reloc: (hot[327] bits[31..0]) refers-to (cold.0) bias -4 rshift 0 reloc: (hot[327] bits[31..0]) refers-to (cold[276]) bias -4 rshift 0 reloc: (cold[298] bits[31..0]) refers-to (hot.10) bias -4 rshift 0 reloc: (cold[298] bits[31..0]) refers-to (hot[337]) bias -4 rshift 0 reloc: (cold[532] bits[31..0]) refers-to (hot.10) bias -4 rshift 0 reloc: (cold[532] bits[31..0]) refers-to (hot[337]) bias -4 rshift 0 |
Author: sewardj
Date: Wed Jan 14 10:18:32 2015
New Revision: 14870
Log:
First running code for the NCode experiment -- infrastructure for
abstract machine code templates for inline instrumentation. Contains
initial implementation of Memcheck "LOADV64le" template, on amd64 only.
(Valgrind side)
Modified:
branches/NCODE/Makefile.all.am
branches/NCODE/Makefile.am
branches/NCODE/coregrind/m_translate.c
branches/NCODE/memcheck/mc_include.h
branches/NCODE/memcheck/mc_main.c
branches/NCODE/memcheck/mc_translate.c
Modified: branches/NCODE/Makefile.all.am
==============================================================================
--- branches/NCODE/Makefile.all.am (original)
+++ branches/NCODE/Makefile.all.am Wed Jan 14 10:18:32 2015
@@ -112,7 +112,7 @@
@FLAG_W_FORMAT_SECURITY@ \
@FLAG_FNO_STACK_PROTECTOR@ \
-fno-strict-aliasing \
- -fno-builtin
+ -fno-builtin -O -g
if COMPILER_IS_CLANG
AM_CFLAGS_BASE += -Wno-cast-align -Wno-self-assign \
Modified: branches/NCODE/Makefile.am
==============================================================================
--- branches/NCODE/Makefile.am (original)
+++ branches/NCODE/Makefile.am Wed Jan 14 10:18:32 2015
@@ -3,18 +3,20 @@
include $(top_srcdir)/Makefile.all.am
-TOOLS = memcheck \
- cachegrind \
- callgrind \
- massif \
- lackey \
- none \
- helgrind \
- drd
-
-EXP_TOOLS = exp-sgcheck \
- exp-bbv \
- exp-dhat
+#TOOLS = memcheck \
+# cachegrind \
+# callgrind \
+# massif \
+# lackey \
+# none \
+# helgrind \
+# drd
+#
+#EXP_TOOLS = exp-sgcheck \
+# exp-bbv \
+# exp-dhat
+TOOLS = none memcheck
+EXP_TOOLS =
# Put docs last because building the HTML is slow and we want to get
# everything else working before we try it.
Modified: branches/NCODE/coregrind/m_translate.c
==============================================================================
--- branches/NCODE/coregrind/m_translate.c (original)
+++ branches/NCODE/coregrind/m_translate.c Wed Jan 14 10:18:32 2015
@@ -1664,19 +1664,19 @@
hassle, because we don't expect them to get used often. So
don't bother. */
if (allow_redirection) {
- vta.disp_cp_chain_me_to_slowEP
+ vta.vda.disp_cp_chain_me_to_slowEP
= VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_slowEP) );
- vta.disp_cp_chain_me_to_fastEP
+ vta.vda.disp_cp_chain_me_to_fastEP
= VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_fastEP) );
- vta.disp_cp_xindir
+ vta.vda.disp_cp_xindir
= VG_(fnptr_to_fnentry)( &VG_(disp_cp_xindir) );
} else {
- vta.disp_cp_chain_me_to_slowEP = NULL;
- vta.disp_cp_chain_me_to_fastEP = NULL;
- vta.disp_cp_xindir = NULL;
+ vta.vda.disp_cp_chain_me_to_slowEP = NULL;
+ vta.vda.disp_cp_chain_me_to_fastEP = NULL;
+ vta.vda.disp_cp_xindir = NULL;
}
/* This doesn't involve chaining and so is always allowable. */
- vta.disp_cp_xassisted
+ vta.vda.disp_cp_xassisted
= VG_(fnptr_to_fnentry)( &VG_(disp_cp_xassisted) );
/* Sheesh. Finally, actually _do_ the translation! */
Modified: branches/NCODE/memcheck/mc_include.h
==============================================================================
--- branches/NCODE/memcheck/mc_include.h (original)
+++ branches/NCODE/memcheck/mc_include.h Wed Jan 14 10:18:32 2015
@@ -596,7 +596,14 @@
/*--- Instrumentation ---*/
/*------------------------------------------------------------*/
-/* Functions defined in mc_main.c */
+/* NCode templates and template generators, defined in mc_main.c */
+
+void MC_(create_ncode_templates) ( void );
+
+extern NCodeTemplate* MC_(tmpl__LOADV64le_on_64);
+
+
+/* Helper functions defined in mc_main.c */
/* For the fail_w_o functions, the UWord arg is actually the 32-bit
origin tag and should really be UInt, but to be simple and safe
Modified: branches/NCODE/memcheck/mc_main.c
==============================================================================
--- branches/NCODE/memcheck/mc_main.c (original)
+++ branches/NCODE/memcheck/mc_main.c Wed Jan 14 10:18:32 2015
@@ -4192,21 +4192,9 @@
/*------------------------------------------------------------*/
-/*--- Functions called directly from generated code: ---*/
-/*--- Load/store handlers. ---*/
+/*--- Definition of MASK ---*/
/*------------------------------------------------------------*/
-/* Types: LOADV32, LOADV16, LOADV8 are:
- UWord fn ( Addr a )
- so they return 32-bits on 32-bit machines and 64-bits on
- 64-bit machines. Addr has the same size as a host word.
-
- LOADV64 is always ULong fn ( Addr a )
-
- Similarly for STOREV8, STOREV16, STOREV32, the supplied vbits
- are a UWord, and for STOREV64 they are a ULong.
-*/
-
/* If any part of '_a' indicated by the mask is 1, either '_a' is not
naturally '_sz/8'-aligned, or it exceeds the range covered by the
primary map. This is all very tricky (and important!), so let's
@@ -4282,6 +4270,92 @@
*/
+/*------------------------------------------------------------*/
+/*--- Creating NCode templates ---*/
+/*------------------------------------------------------------*/
+
+static ULong mc_LOADV64le_slow ( Addr a );
+
+static void* ncode_alloc ( UInt n ) {
+ return VG_(malloc)("mc.ncode_alloc (NCode, permanent)", n);
+}
+
+static NReg mkNRegINVALID ( void ) {
+ return mkNReg(Nrr_INVALID, 0);
+}
+
+static NReg* mkNRegVec1 ( NAlloc na, NReg r0 ) {
+ NReg* vec = na(2 * sizeof(NReg));
+ vec[0] = r0;
+ vec[1] = mkNRegINVALID();
+ return vec;
+}
+
+NCodeTemplate* MC_(tmpl__LOADV64le_on_64) = NULL;
+
+static NCodeTemplate* mk_tmpl__LOADV64le_on_64 ( NAlloc na )
+{
+ NInstr** hot = na((11+1) * sizeof(NInstr*));
+ NInstr** cold = na((6+1) * sizeof(NInstr*));
+
+ NReg rINVALID = mkNRegINVALID();
+
+ NReg r0 = mkNReg(Nrr_Result, 0);
+ NReg a0 = mkNReg(Nrr_Argument, 0);
+ NReg s0 = mkNReg(Nrr_Scratch, 0);
+
+ hot[0] = NInstr_SetFlagsWri (na, Nsf_TEST, a0, MASK(8));
+ hot[1] = NInstr_Branch (na, Ncc_NZ, mkNLabel(Nlz_Cold, 4));
+ hot[2] = NInstr_ShiftWri (na, Nsh_SHR, s0, a0, 16);
+ hot[3] = NInstr_LoadU (na, s0, NEA_IRS(na, (HWord)&primary_map[0],
+ s0, 3), 8);
+ hot[4] = NInstr_AluWri (na, Nalu_AND, r0, a0, 0xFFFF);
+ hot[5] = NInstr_ShiftWri (na, Nsh_SHR, r0, r0, 3);
+ hot[6] = NInstr_LoadU (na, r0, NEA_RRS(na, s0, r0, 1), 2);
+ hot[7] = NInstr_SetFlagsWri (na, Nsf_CMP, r0, VA_BITS16_DEFINED);
+ hot[8] = NInstr_Branch (na, Ncc_NZ, mkNLabel(Nlz_Cold, 0));
+ hot[9] = NInstr_ImmW (na, r0, V_BITS64_DEFINED);
+ hot[10] = NInstr_Nop (na);
+
+ cold[0] = NInstr_MovW (na, s0, r0);
+ cold[1] = NInstr_ImmW (na, r0, V_BITS64_UNDEFINED);
+ cold[2] = NInstr_SetFlagsWri (na, Nsf_CMP, s0, VA_BITS16_UNDEFINED);
+ cold[3] = NInstr_Branch (na, Ncc_Z, mkNLabel(Nlz_Hot, 10));
+ cold[4] = NInstr_Call (na, rINVALID, r0, mkNRegVec1(na, a0),
+ (void*)& mc_LOADV64le_slow,
+ "mc_LOADV64le_slow");
+ cold[5] = NInstr_Branch(na, Ncc_ALWAYS, mkNLabel(Nlz_Hot, 10));
+
+ hot[11] = cold[6] = NULL;
+ NCodeTemplate* tmpl
+ = mkNCodeTemplate(na,"LOADV64le_on_64",
+ /*res, parms, scratch*/1, 1, 1, hot, cold);
+ return tmpl;
+}
+
+void MC_(create_ncode_templates) ( void )
+{
+ tl_assert(MC_(tmpl__LOADV64le_on_64) == NULL);
+ MC_(tmpl__LOADV64le_on_64) = mk_tmpl__LOADV64le_on_64(ncode_alloc);
+}
+
+
+/*------------------------------------------------------------*/
+/*--- Functions called directly from generated code: ---*/
+/*--- Load/store handlers. ---*/
+/*------------------------------------------------------------*/
+
+/* Types: LOADV32, LOADV16, LOADV8 are:
+ UWord fn ( Addr a )
+ so they return 32-bits on 32-bit machines and 64-bits on
+ 64-bit machines. Addr has the same size as a host word.
+
+ LOADV64 is always ULong fn ( Addr a )
+
+ Similarly for STOREV8, STOREV16, STOREV32, the supplied vbits
+ are a UWord, and for STOREV64 they are a ULong.
+*/
+
/* ------------------------ Size = 16 ------------------------ */
static INLINE
@@ -4398,6 +4472,10 @@
return mc_LOADV64(a, False);
}
+static ULong mc_LOADV64le_slow ( Addr a )
+{
+ return mc_LOADVn_slow( a, 64, False/*!isBigEndian*/ );
+}
static INLINE
void mc_STOREV64 ( Addr a, ULong vbits64, Bool isBigEndian )
@@ -6660,6 +6738,12 @@
/* Do not check definedness of guest state if --undef-value-errors=no */
if (MC_(clo_mc_level) >= 2)
VG_(track_pre_reg_read) ( mc_pre_reg_read );
+
+ /* The NCode templates also need to be created, but this is done
+ later, at the first call to MC_(instrument), so as to allow VEX
+ to more be more fully initialised. In particular, at this
+ point, we can create the templates, but we can't yet print them,
+ which is inconvenient for debugging. Create them later on. */
}
static void print_SM_info(const HChar* type, Int n_SMs)
Modified: branches/NCODE/memcheck/mc_translate.c
==============================================================================
--- branches/NCODE/memcheck/mc_translate.c (original)
+++ branches/NCODE/memcheck/mc_translate.c Wed Jan 14 10:18:32 2015
@@ -4582,9 +4582,39 @@
the address (shadow) to 'defined' following the test. */
complainIfUndefined( mce, addr, guard );
+ /* Generate the actual address into addrAct. */
+ IRAtom* addrAct;
+ if (bias == 0) {
+ addrAct = addr;
+ } else {
+ IROp mkAdd;
+ IRAtom* eBias;
+ IRType tyAddr = mce->hWordTy;
+ tl_assert( tyAddr == Ity_I32 || tyAddr == Ity_I64 );
+ mkAdd = tyAddr==Ity_I32 ? Iop_Add32 : Iop_Add64;
+ eBias = tyAddr==Ity_I32 ? mkU32(bias) : mkU64(bias);
+ addrAct = assignNew('V', mce, tyAddr, binop(mkAdd, addr, eBias) );
+ }
+
+ /* We need to have a place to park the V bits we're just about to
+ read. */
+ ty = shadowTypeV(ty);
+ IRTemp datavbits = newTemp(mce, ty, VSh);
+
+ /* ------ BEGIN inline NCode ? ------ */
+ if (guard == NULL
+ && end == Iend_LE && ty == Ity_I64 && mce->hWordTy == Ity_I64) {
+ /* Unconditional LOAD64le on 64 bit host. Generate inline code. */
+ NCodeTemplate* tmpl = MC_(tmpl__LOADV64le_on_64);
+ IRAtom** args = mkIRExprVec_1( addrAct );
+ IRTemp* ress = mkIRTempVec_1( datavbits );
+ stmt( 'V', mce, IRStmt_NCode(tmpl, args, ress) );
+ return mkexpr(datavbits);
+ }
+ /* ------ END inline NCode ? ------ */
+
/* Now cook up a call to the relevant helper function, to read the
data V bits from shadow memory. */
- ty = shadowTypeV(ty);
void* helper = NULL;
const HChar* hname = NULL;
@@ -4645,24 +4675,6 @@
tl_assert(helper);
tl_assert(hname);
- /* Generate the actual address into addrAct. */
- IRAtom* addrAct;
- if (bias == 0) {
- addrAct = addr;
- } else {
- IROp mkAdd;
- IRAtom* eBias;
- IRType tyAddr = mce->hWordTy;
- tl_assert( tyAddr == Ity_I32 || tyAddr == Ity_I64 );
- mkAdd = tyAddr==Ity_I32 ? Iop_Add32 : Iop_Add64;
- eBias = tyAddr==Ity_I32 ? mkU32(bias) : mkU64(bias);
- addrAct = assignNew('V', mce, tyAddr, binop(mkAdd, addr, eBias) );
- }
-
- /* We need to have a place to park the V bits we're just about to
- read. */
- IRTemp datavbits = newTemp(mce, ty, VSh);
-
/* Here's the call. */
IRDirty* di;
if (ret_via_outparam) {
@@ -6226,6 +6238,13 @@
tl_assert(MC_(clo_mc_level) >= 1 && MC_(clo_mc_level) <= 3);
+ /* If this is the first call, set up the NCode templates. */
+ static Bool ncode_templates_created = False;
+ if (!ncode_templates_created) {
+ ncode_templates_created = True;
+ MC_(create_ncode_templates)();
+ }
+
/* Set up SB */
sb_out = deepCopyIRSBExceptStmts(sb_in);
|
|
From: <sv...@va...> - 2015-01-14 10:18:30
|
Author: sewardj
Date: Wed Jan 14 10:18:18 2015
New Revision: 3065
Log:
First running code for the NCode experiment -- infrastructure for
abstract machine code templates for inline instrumentation. Contains
initial implementation of Memcheck "LOADV64le" template, on amd64 only.
(VEX side)
Modified:
branches/NCODE/priv/host_amd64_defs.c
branches/NCODE/priv/host_amd64_defs.h
branches/NCODE/priv/host_amd64_isel.c
branches/NCODE/priv/host_arm64_isel.c
branches/NCODE/priv/host_arm_isel.c
branches/NCODE/priv/host_generic_reg_alloc2.c
branches/NCODE/priv/host_generic_regs.c
branches/NCODE/priv/host_generic_regs.h
branches/NCODE/priv/host_mips_isel.c
branches/NCODE/priv/host_ppc_isel.c
branches/NCODE/priv/host_s390_defs.c
branches/NCODE/priv/host_s390_isel.c
branches/NCODE/priv/host_x86_defs.c
branches/NCODE/priv/host_x86_isel.c
branches/NCODE/priv/ir_defs.c
branches/NCODE/priv/ir_opt.c
branches/NCODE/priv/main_main.c
branches/NCODE/pub/libvex.h
branches/NCODE/pub/libvex_ir.h
Modified: branches/NCODE/priv/host_amd64_defs.c
==============================================================================
--- branches/NCODE/priv/host_amd64_defs.c (original)
+++ branches/NCODE/priv/host_amd64_defs.c Wed Jan 14 10:18:18 2015
@@ -101,37 +101,6 @@
}
}
-HReg hregAMD64_RAX ( void ) { return mkHReg( 0, HRcInt64, False); }
-HReg hregAMD64_RCX ( void ) { return mkHReg( 1, HRcInt64, False); }
-HReg hregAMD64_RDX ( void ) { return mkHReg( 2, HRcInt64, False); }
-HReg hregAMD64_RBX ( void ) { return mkHReg( 3, HRcInt64, False); }
-HReg hregAMD64_RSP ( void ) { return mkHReg( 4, HRcInt64, False); }
-HReg hregAMD64_RBP ( void ) { return mkHReg( 5, HRcInt64, False); }
-HReg hregAMD64_RSI ( void ) { return mkHReg( 6, HRcInt64, False); }
-HReg hregAMD64_RDI ( void ) { return mkHReg( 7, HRcInt64, False); }
-HReg hregAMD64_R8 ( void ) { return mkHReg( 8, HRcInt64, False); }
-HReg hregAMD64_R9 ( void ) { return mkHReg( 9, HRcInt64, False); }
-HReg hregAMD64_R10 ( void ) { return mkHReg(10, HRcInt64, False); }
-HReg hregAMD64_R11 ( void ) { return mkHReg(11, HRcInt64, False); }
-HReg hregAMD64_R12 ( void ) { return mkHReg(12, HRcInt64, False); }
-HReg hregAMD64_R13 ( void ) { return mkHReg(13, HRcInt64, False); }
-HReg hregAMD64_R14 ( void ) { return mkHReg(14, HRcInt64, False); }
-HReg hregAMD64_R15 ( void ) { return mkHReg(15, HRcInt64, False); }
-
-HReg hregAMD64_XMM0 ( void ) { return mkHReg( 0, HRcVec128, False); }
-HReg hregAMD64_XMM1 ( void ) { return mkHReg( 1, HRcVec128, False); }
-HReg hregAMD64_XMM3 ( void ) { return mkHReg( 3, HRcVec128, False); }
-HReg hregAMD64_XMM4 ( void ) { return mkHReg( 4, HRcVec128, False); }
-HReg hregAMD64_XMM5 ( void ) { return mkHReg( 5, HRcVec128, False); }
-HReg hregAMD64_XMM6 ( void ) { return mkHReg( 6, HRcVec128, False); }
-HReg hregAMD64_XMM7 ( void ) { return mkHReg( 7, HRcVec128, False); }
-HReg hregAMD64_XMM8 ( void ) { return mkHReg( 8, HRcVec128, False); }
-HReg hregAMD64_XMM9 ( void ) { return mkHReg( 9, HRcVec128, False); }
-HReg hregAMD64_XMM10 ( void ) { return mkHReg(10, HRcVec128, False); }
-HReg hregAMD64_XMM11 ( void ) { return mkHReg(11, HRcVec128, False); }
-HReg hregAMD64_XMM12 ( void ) { return mkHReg(12, HRcVec128, False); }
-
-
void getAllocableRegs_AMD64 ( Int* nregs, HReg** arr )
{
#if 0
@@ -1009,6 +978,27 @@
i->tag = Ain_ProfInc;
return i;
}
+AMD64Instr* AMD64Instr_NCode ( NCodeTemplate* tmpl, HReg* regsR,
+ HReg* regsA, HReg* regsS ) {
+ AMD64Instr* i = LibVEX_Alloc(sizeof(AMD64Instr));
+ i->tag = Ain_NCode;
+ i->Ain.NCode.tmpl = tmpl;
+ i->Ain.NCode.regsR = regsR;
+ i->Ain.NCode.regsA = regsA;
+ i->Ain.NCode.regsS = regsS;
+ return i;
+}
+AMD64Instr* AMD64Instr_NC_Jmp32 ( AMD64CondCode cc ) {
+ AMD64Instr* i = LibVEX_Alloc(sizeof(AMD64Instr));
+ i->tag = Ain_NC_Jmp32;
+ i->Ain.NC_Jmp32.cc = cc;
+ return i;
+}
+AMD64Instr* AMD64Instr_NC_CallR11 ( void ) {
+ AMD64Instr* i = LibVEX_Alloc(sizeof(AMD64Instr));
+ i->tag = Ain_NC_CallR11;
+ return i;
+}
void ppAMD64Instr ( const AMD64Instr* i, Bool mode64 )
{
@@ -1320,6 +1310,37 @@
case Ain_ProfInc:
vex_printf("(profInc) movabsq $NotKnownYet, %%r11; incq (%%r11)");
return;
+ case Ain_NCode: {
+ UInt j;
+ NCodeTemplate* tmpl = i->Ain.NCode.tmpl;
+ vex_printf("NCode-AMD64:%s [", tmpl->name);
+ for (j = 0; j < tmpl->nres; j++) {
+ ppHRegAMD64(i->Ain.NCode.regsR[j]);
+ if (j != tmpl->nres-1) vex_printf(" ");
+ }
+ vex_printf("] <= [");
+ for (j = 0; j < tmpl->narg; j++) {
+ ppHRegAMD64(i->Ain.NCode.regsA[j]);
+ if (j != tmpl->narg-1) vex_printf(" ");
+ }
+ vex_printf("] scratch [");
+ for (j = 0; j < tmpl->nscr; j++) {
+ ppHRegAMD64(i->Ain.NCode.regsS[j]);
+ if (j != tmpl->nscr-1) vex_printf(" ");
+ }
+ vex_printf("]");
+ return;
+ }
+ case Ain_NC_Jmp32: {
+ vex_printf("j%s rel32",
+ i->Ain.NC_Jmp32.cc == Acc_ALWAYS
+ ? "mp" : showAMD64CondCode(i->Ain.NC_Jmp32.cc));
+ return;
+ }
+ case Ain_NC_CallR11: {
+ vex_printf("call* %%r11");
+ return;
+ }
default:
vpanic("ppAMD64Instr");
}
@@ -1625,6 +1646,24 @@
case Ain_ProfInc:
addHRegUse(u, HRmWrite, hregAMD64_R11());
return;
+ case Ain_NCode: {
+ UInt j;
+ NCodeTemplate* tmpl = i->Ain.NCode.tmpl;
+ // It writes the result and scratch registers.
+ for (j = 0; j < tmpl->nres; j++)
+ addHRegUse(u, HRmWrite, i->Ain.NCode.regsR[j]);
+ for (j = 0; j < tmpl->nscr; j++)
+ addHRegUse(u, HRmWrite, i->Ain.NCode.regsS[j]);
+ // It both reads and writes the arg regs. We have to say
+ // they are written in order to force them to be allocated
+ // different registers from the arg and scratch registers,
+ // since we have no way to ensure that the NCode block
+ // doesn't write its scratch and result registers and later
+ // on read the argument registers.
+ for (j = 0; j < tmpl->narg; j++)
+ addHRegUse(u, HRmModify, i->Ain.NCode.regsA[j]);
+ return;
+ }
default:
ppAMD64Instr(i, mode64);
vpanic("getRegUsage_AMD64Instr");
@@ -1808,6 +1847,17 @@
case Ain_ProfInc:
/* hardwires r11 -- nothing to modify. */
return;
+ case Ain_NCode: {
+ UInt j;
+ NCodeTemplate* tmpl = i->Ain.NCode.tmpl;
+ for (j = 0; j < tmpl->nres; j++)
+ mapReg(m, &i->Ain.NCode.regsR[j]);
+ for (j = 0; j < tmpl->nscr; j++)
+ mapReg(m, &i->Ain.NCode.regsS[j]);
+ for (j = 0; j < tmpl->narg; j++)
+ mapReg(m, &i->Ain.NCode.regsA[j]);
+ return;
+ }
default:
ppAMD64Instr(i, mode64);
vpanic("mapRegs_AMD64Instr");
@@ -1856,14 +1906,14 @@
condition codes. */
void genSpill_AMD64 ( /*OUT*/HInstr** i1, /*OUT*/HInstr** i2,
- HReg rreg, Int offsetB, Bool mode64 )
+ HReg rreg, Bool spRel, Int offsetB, Bool mode64 )
{
AMD64AMode* am;
vassert(offsetB >= 0);
vassert(!hregIsVirtual(rreg));
vassert(mode64 == True);
*i1 = *i2 = NULL;
- am = AMD64AMode_IR(offsetB, hregAMD64_RBP());
+ am = AMD64AMode_IR(offsetB, spRel ? hregAMD64_RSP() : hregAMD64_RBP());
switch (hregClass(rreg)) {
case HRcInt64:
*i1 = AMD64Instr_Alu64M ( Aalu_MOV, AMD64RI_Reg(rreg), am );
@@ -1878,14 +1928,14 @@
}
void genReload_AMD64 ( /*OUT*/HInstr** i1, /*OUT*/HInstr** i2,
- HReg rreg, Int offsetB, Bool mode64 )
+ HReg rreg, Bool spRel, Int offsetB, Bool mode64 )
{
AMD64AMode* am;
vassert(offsetB >= 0);
vassert(!hregIsVirtual(rreg));
vassert(mode64 == True);
*i1 = *i2 = NULL;
- am = AMD64AMode_IR(offsetB, hregAMD64_RBP());
+ am = AMD64AMode_IR(offsetB, spRel ? hregAMD64_RSP() : hregAMD64_RBP());
switch (hregClass(rreg)) {
case HRcInt64:
*i1 = AMD64Instr_Alu64R ( Aalu_MOV, AMD64RMI_Mem(am), rreg );
@@ -1902,6 +1952,12 @@
/* --------- The amd64 assembler (bleh.) --------- */
+#define PUT(_ab, _byte) \
+ do { UInt _off = (_ab)->bufUsed; \
+ (_ab)->buf[_off] = (_byte); \
+ (_ab)->bufUsed = _off + 1; \
+ } while (0)
+
/* Produce the low three bits of an integer register number. */
static UChar iregBits210 ( HReg r )
{
@@ -1979,20 +2035,18 @@
| (regbase & 7) );
}
-static UChar* emit32 ( UChar* p, UInt w32 )
+static void emit32 ( /*MOD*/AssemblyBuffer* ab, UInt w32 )
{
- *p++ = toUChar((w32) & 0x000000FF);
- *p++ = toUChar((w32 >> 8) & 0x000000FF);
- *p++ = toUChar((w32 >> 16) & 0x000000FF);
- *p++ = toUChar((w32 >> 24) & 0x000000FF);
- return p;
+ PUT(ab, toUChar((w32) & 0x000000FF));
+ PUT(ab, toUChar((w32 >> 8) & 0x000000FF));
+ PUT(ab, toUChar((w32 >> 16) & 0x000000FF));
+ PUT(ab, toUChar((w32 >> 24) & 0x000000FF));
}
-static UChar* emit64 ( UChar* p, ULong w64 )
+static void emit64 ( /*MOD*/AssemblyBuffer* ab, ULong w64 )
{
- p = emit32(p, toUInt(w64 & 0xFFFFFFFF));
- p = emit32(p, toUInt((w64 >> 32) & 0xFFFFFFFF));
- return p;
+ emit32(ab, toUInt(w64 & 0xFFFFFFFF));
+ emit32(ab, toUInt((w64 >> 32) & 0xFFFFFFFF));
}
/* Does a sign-extend of the lowest 8 bits give
@@ -2044,7 +2098,7 @@
| index != RSP
= 10 greg 100, scale index base, d32
*/
-static UChar* doAMode_M ( UChar* p, HReg greg, AMD64AMode* am )
+static void doAMode_M ( /*MOD*/AssemblyBuffer* ab, HReg greg, AMD64AMode* am )
{
if (am->tag == Aam_IR) {
if (am->Aam.IR.imm == 0
@@ -2053,42 +2107,41 @@
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R13())
) {
- *p++ = mkModRegRM(0, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
- return p;
+ PUT(ab, mkModRegRM(0, iregBits210(greg),
+ iregBits210(am->Aam.IR.reg)));
+ return;
}
if (fits8bits(am->Aam.IR.imm)
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
) {
- *p++ = mkModRegRM(1, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
- *p++ = toUChar(am->Aam.IR.imm & 0xFF);
- return p;
+ PUT(ab, mkModRegRM(1, iregBits210(greg),
+ iregBits210(am->Aam.IR.reg)));
+ PUT(ab, toUChar(am->Aam.IR.imm & 0xFF));
+ return;
}
if (! sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
&& ! sameHReg(am->Aam.IR.reg, hregAMD64_R12())
) {
- *p++ = mkModRegRM(2, iregBits210(greg),
- iregBits210(am->Aam.IR.reg));
- p = emit32(p, am->Aam.IR.imm);
- return p;
+ PUT(ab, mkModRegRM(2, iregBits210(greg),
+ iregBits210(am->Aam.IR.reg)));
+ emit32(ab, am->Aam.IR.imm);
+ return;
}
if ((sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
|| sameHReg(am->Aam.IR.reg, hregAMD64_R12()))
&& fits8bits(am->Aam.IR.imm)) {
- *p++ = mkModRegRM(1, iregBits210(greg), 4);
- *p++ = 0x24;
- *p++ = toUChar(am->Aam.IR.imm & 0xFF);
- return p;
- }
- if (/* (sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
- || wait for test case for RSP case */
- sameHReg(am->Aam.IR.reg, hregAMD64_R12())) {
- *p++ = mkModRegRM(2, iregBits210(greg), 4);
- *p++ = 0x24;
- p = emit32(p, am->Aam.IR.imm);
- return p;
+ PUT(ab, mkModRegRM(1, iregBits210(greg), 4));
+ PUT(ab, 0x24);
+ PUT(ab, toUChar(am->Aam.IR.imm & 0xFF));
+ return;
+ }
+ if (sameHReg(am->Aam.IR.reg, hregAMD64_RSP())
+ || sameHReg(am->Aam.IR.reg, hregAMD64_R12())) {
+ PUT(ab, mkModRegRM(2, iregBits210(greg), 4));
+ PUT(ab, 0x24);
+ emit32(ab, am->Aam.IR.imm);
+ return;
}
ppAMD64AMode(am);
vpanic("doAMode_M: can't emit amode IR");
@@ -2097,18 +2150,18 @@
if (am->tag == Aam_IRRS) {
if (fits8bits(am->Aam.IRRS.imm)
&& ! sameHReg(am->Aam.IRRS.index, hregAMD64_RSP())) {
- *p++ = mkModRegRM(1, iregBits210(greg), 4);
- *p++ = mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
- iregBits210(am->Aam.IRRS.base));
- *p++ = toUChar(am->Aam.IRRS.imm & 0xFF);
- return p;
+ PUT(ab, mkModRegRM(1, iregBits210(greg), 4));
+ PUT(ab, mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
+ iregBits210(am->Aam.IRRS.base)));
+ PUT(ab, toUChar(am->Aam.IRRS.imm & 0xFF));
+ return;
}
if (! sameHReg(am->Aam.IRRS.index, hregAMD64_RSP())) {
- *p++ = mkModRegRM(2, iregBits210(greg), 4);
- *p++ = mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
- iregBits210(am->Aam.IRRS.base));
- p = emit32(p, am->Aam.IRRS.imm);
- return p;
+ PUT(ab, mkModRegRM(2, iregBits210(greg), 4));
+ PUT(ab, mkSIB(am->Aam.IRRS.shift, iregBits210(am->Aam.IRRS.index),
+ iregBits210(am->Aam.IRRS.base)));
+ emit32(ab, am->Aam.IRRS.imm);
+ return;
}
ppAMD64AMode(am);
vpanic("doAMode_M: can't emit amode IRRS");
@@ -2120,10 +2173,9 @@
/* Emit a mod-reg-rm byte when the rm bit denotes a reg. */
-static UChar* doAMode_R ( UChar* p, HReg greg, HReg ereg )
+static void doAMode_R ( /*MOD*/AssemblyBuffer* ab, HReg greg, HReg ereg )
{
- *p++ = mkModRegRM(3, iregBits210(greg), iregBits210(ereg));
- return p;
+ PUT(ab, mkModRegRM(3, iregBits210(greg), iregBits210(ereg)));
}
@@ -2231,14 +2283,14 @@
//uu {
//uu switch (vex & 0xFF) {
//uu case 0xC5:
-//uu *p++ = 0xC5;
-//uu *p++ = (vex >> 8) & 0xFF;
+//uu PUT(ab, 0xC5);
+//uu PUT(ab, (vex >> 8) & 0xFF);
//uu vassert(0 == (vex >> 16));
//uu break;
//uu case 0xC4:
-//uu *p++ = 0xC4;
-//uu *p++ = (vex >> 8) & 0xFF;
-//uu *p++ = (vex >> 16) & 0xFF;
+//uu PUT(ab, 0xC4);
+//uu PUT(ab, (vex >> 8) & 0xFF);
+//uu PUT(ab, (vex >> 16) & 0xFF);
//uu vassert(0 == (vex >> 24));
//uu break;
//uu default:
@@ -2249,36 +2301,31 @@
/* Emit ffree %st(N) */
-static UChar* do_ffree_st ( UChar* p, Int n )
+static void do_ffree_st ( /*MOD*/AssemblyBuffer* ab, Int n )
{
vassert(n >= 0 && n <= 7);
- *p++ = 0xDD;
- *p++ = toUChar(0xC0 + n);
- return p;
-}
-
-/* Emit an instruction into buf and return the number of bytes used.
- Note that buf is not the insn's final place, and therefore it is
- imperative to emit position-independent code. If the emitted
- instruction was a profiler inc, set *is_profInc to True, else
- leave it unchanged. */
-
-Int emit_AMD64Instr ( /*MB_MOD*/Bool* is_profInc,
- UChar* buf, Int nbuf, const AMD64Instr* i,
- Bool mode64, VexEndness endness_host,
- const void* disp_cp_chain_me_to_slowEP,
- const void* disp_cp_chain_me_to_fastEP,
- const void* disp_cp_xindir,
- const void* disp_cp_xassisted )
+ PUT(ab, 0xDD);
+ PUT(ab, toUChar(0xC0 + n));
+}
+
+/* Emit an instruction into |ab|. Note that |ab->buf| is not the
+ insn's final place, and therefore it is imperative to emit
+ position-independent code. If the emitted instruction was a
+ profiler inc, return True, else return False. This function must
+ also guarantee to generate 256 or fewer bytes for each instr, so
+ as to facilitate range checking in the caller. */
+
+Bool emit_AMD64Instr ( /*MOD*/AssemblyBuffer* ab,
+ const AMD64Instr* i,
+ Bool mode64, VexEndness endness_host,
+ const VexDispatcherAddresses* vda )
{
- UInt /*irno,*/ opc, opc_rr, subopc_imm, opc_imma, opc_cl, opc_imm, subopc;
+ UInt opc, opc_rr, subopc_imm, opc_imma, opc_cl, opc_imm, subopc;
UInt xtra;
UInt reg;
UChar rex;
- UChar* p = &buf[0];
- UChar* ptmp;
- Int j;
- vassert(nbuf >= 32);
+ Bool is_profInc = False;
+ UChar* initialCursor = AssemblyBuffer__getCursor(ab);
vassert(mode64 == True);
/* Wrap an integer as a int register, for use assembling
@@ -2297,13 +2344,13 @@
use this form for the range 0 to 0x7FFFFFFF inclusive, but
limit it to a smaller range for verifiability purposes. */
if (1 & iregBit3(i->Ain.Imm64.dst))
- *p++ = 0x41;
- *p++ = 0xB8 + iregBits210(i->Ain.Imm64.dst);
- p = emit32(p, (UInt)i->Ain.Imm64.imm64);
+ PUT(ab, 0x41);
+ PUT(ab, 0xB8 + iregBits210(i->Ain.Imm64.dst));
+ emit32(ab, (UInt)i->Ain.Imm64.imm64);
} else {
- *p++ = toUChar(0x48 + (1 & iregBit3(i->Ain.Imm64.dst)));
- *p++ = toUChar(0xB8 + iregBits210(i->Ain.Imm64.dst));
- p = emit64(p, i->Ain.Imm64.imm64);
+ PUT(ab, toUChar(0x48 + (1 & iregBit3(i->Ain.Imm64.dst))));
+ PUT(ab, toUChar(0xB8 + iregBits210(i->Ain.Imm64.dst)));
+ emit64(ab, i->Ain.Imm64.imm64);
}
goto done;
@@ -2323,29 +2370,29 @@
and sometimes 2 bytes compared to the more
obvious encoding in the 'else' branch. */
if (1 & iregBit3(i->Ain.Alu64R.dst))
- *p++ = 0x41;
- *p++ = 0xB8 + iregBits210(i->Ain.Alu64R.dst);
- p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, 0x41);
+ PUT(ab, 0xB8 + iregBits210(i->Ain.Alu64R.dst));
+ emit32(ab, i->Ain.Alu64R.src->Armi.Imm.imm32);
} else {
- *p++ = toUChar(0x48 + (1 & iregBit3(i->Ain.Alu64R.dst)));
- *p++ = 0xC7;
- *p++ = toUChar(0xC0 + iregBits210(i->Ain.Alu64R.dst));
- p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, toUChar(0x48 + (1 & iregBit3(i->Ain.Alu64R.dst))));
+ PUT(ab, 0xC7);
+ PUT(ab, toUChar(0xC0 + iregBits210(i->Ain.Alu64R.dst)));
+ emit32(ab, i->Ain.Alu64R.src->Armi.Imm.imm32);
}
goto done;
case Armi_Reg:
- *p++ = rexAMode_R( i->Ain.Alu64R.src->Armi.Reg.reg,
- i->Ain.Alu64R.dst );
- *p++ = 0x89;
- p = doAMode_R(p, i->Ain.Alu64R.src->Armi.Reg.reg,
- i->Ain.Alu64R.dst);
+ PUT(ab, rexAMode_R( i->Ain.Alu64R.src->Armi.Reg.reg,
+ i->Ain.Alu64R.dst ));
+ PUT(ab, 0x89);
+ doAMode_R(ab, i->Ain.Alu64R.src->Armi.Reg.reg,
+ i->Ain.Alu64R.dst);
goto done;
case Armi_Mem:
- *p++ = rexAMode_M(i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
- *p++ = 0x8B;
- p = doAMode_M(p, i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
+ PUT(ab, rexAMode_M(i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am));
+ PUT(ab, 0x8B);
+ doAMode_M(ab, i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am);
goto done;
default:
goto bad;
@@ -2355,32 +2402,32 @@
if (i->Ain.Alu64R.op == Aalu_MUL) {
switch (i->Ain.Alu64R.src->tag) {
case Armi_Reg:
- *p++ = rexAMode_R( i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Reg.reg);
- *p++ = 0x0F;
- *p++ = 0xAF;
- p = doAMode_R(p, i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Reg.reg);
+ PUT(ab, rexAMode_R( i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Reg.reg));
+ PUT(ab, 0x0F);
+ PUT(ab, 0xAF);
+ doAMode_R(ab, i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Reg.reg);
goto done;
case Armi_Mem:
- *p++ = rexAMode_M(i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
- *p++ = 0x0F;
- *p++ = 0xAF;
- p = doAMode_M(p, i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
+ PUT(ab, rexAMode_M(i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am));
+ PUT(ab, 0x0F);
+ PUT(ab, 0xAF);
+ doAMode_M(ab, i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am);
goto done;
case Armi_Imm:
if (fits8bits(i->Ain.Alu64R.src->Armi.Imm.imm32)) {
- *p++ = rexAMode_R(i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
- *p++ = 0x6B;
- p = doAMode_R(p, i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
- *p++ = toUChar(0xFF & i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, rexAMode_R(i->Ain.Alu64R.dst, i->Ain.Alu64R.dst));
+ PUT(ab, 0x6B);
+ doAMode_R(ab, i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
+ PUT(ab, toUChar(0xFF & i->Ain.Alu64R.src->Armi.Imm.imm32));
} else {
- *p++ = rexAMode_R(i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
- *p++ = 0x69;
- p = doAMode_R(p, i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
- p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, rexAMode_R(i->Ain.Alu64R.dst, i->Ain.Alu64R.dst));
+ PUT(ab, 0x69);
+ doAMode_R(ab, i->Ain.Alu64R.dst, i->Ain.Alu64R.dst);
+ emit32(ab, i->Ain.Alu64R.src->Armi.Imm.imm32);
}
goto done;
default:
@@ -2413,34 +2460,34 @@
if (sameHReg(i->Ain.Alu64R.dst, hregAMD64_RAX())
&& !fits8bits(i->Ain.Alu64R.src->Armi.Imm.imm32)) {
goto bad; /* FIXME: awaiting test case */
- *p++ = toUChar(opc_imma);
- p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, toUChar(opc_imma));
+ emit32(ab, i->Ain.Alu64R.src->Armi.Imm.imm32);
} else
if (fits8bits(i->Ain.Alu64R.src->Armi.Imm.imm32)) {
- *p++ = rexAMode_R( fake(0), i->Ain.Alu64R.dst );
- *p++ = 0x83;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu64R.dst);
- *p++ = toUChar(0xFF & i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, rexAMode_R( fake(0), i->Ain.Alu64R.dst ));
+ PUT(ab, 0x83);
+ doAMode_R(ab, fake(subopc_imm), i->Ain.Alu64R.dst);
+ PUT(ab, toUChar(0xFF & i->Ain.Alu64R.src->Armi.Imm.imm32));
} else {
- *p++ = rexAMode_R( fake(0), i->Ain.Alu64R.dst);
- *p++ = 0x81;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu64R.dst);
- p = emit32(p, i->Ain.Alu64R.src->Armi.Imm.imm32);
+ PUT(ab, rexAMode_R( fake(0), i->Ain.Alu64R.dst));
+ PUT(ab, 0x81);
+ doAMode_R(ab, fake(subopc_imm), i->Ain.Alu64R.dst);
+ emit32(ab, i->Ain.Alu64R.src->Armi.Imm.imm32);
}
goto done;
case Armi_Reg:
- *p++ = rexAMode_R( i->Ain.Alu64R.src->Armi.Reg.reg,
- i->Ain.Alu64R.dst);
- *p++ = toUChar(opc_rr);
- p = doAMode_R(p, i->Ain.Alu64R.src->Armi.Reg.reg,
- i->Ain.Alu64R.dst);
+ PUT(ab, rexAMode_R( i->Ain.Alu64R.src->Armi.Reg.reg,
+ i->Ain.Alu64R.dst));
+ PUT(ab, toUChar(opc_rr));
+ doAMode_R(ab, i->Ain.Alu64R.src->Armi.Reg.reg,
+ i->Ain.Alu64R.dst);
goto done;
case Armi_Mem:
- *p++ = rexAMode_M( i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
- *p++ = toUChar(opc);
- p = doAMode_M(p, i->Ain.Alu64R.dst,
- i->Ain.Alu64R.src->Armi.Mem.am);
+ PUT(ab, rexAMode_M( i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am));
+ PUT(ab, toUChar(opc));
+ doAMode_M(ab, i->Ain.Alu64R.dst,
+ i->Ain.Alu64R.src->Armi.Mem.am);
goto done;
default:
goto bad;
@@ -2452,17 +2499,17 @@
if (i->Ain.Alu64M.op == Aalu_MOV) {
switch (i->Ain.Alu64M.src->tag) {
case Ari_Reg:
- *p++ = rexAMode_M(i->Ain.Alu64M.src->Ari.Reg.reg,
- i->Ain.Alu64M.dst);
- *p++ = 0x89;
- p = doAMode_M(p, i->Ain.Alu64M.src->Ari.Reg.reg,
- i->Ain.Alu64M.dst);
+ PUT(ab, rexAMode_M(i->Ain.Alu64M.src->Ari.Reg.reg,
+ i->Ain.Alu64M.dst));
+ PUT(ab, 0x89);
+ doAMode_M(ab, i->Ain.Alu64M.src->Ari.Reg.reg,
+ i->Ain.Alu64M.dst);
goto done;
case Ari_Imm:
- *p++ = rexAMode_M(fake(0), i->Ain.Alu64M.dst);
- *p++ = 0xC7;
- p = doAMode_M(p, fake(0), i->Ain.Alu64M.dst);
- p = emit32(p, i->Ain.Alu64M.src->Ari.Imm.imm32);
+ PUT(ab, rexAMode_M(fake(0), i->Ain.Alu64M.dst));
+ PUT(ab, 0xC7);
+ doAMode_M(ab, fake(0), i->Ain.Alu64M.dst);
+ emit32(ab, i->Ain.Alu64M.src->Ari.Imm.imm32);
goto done;
default:
goto bad;
@@ -2479,46 +2526,46 @@
default: goto bad;
}
if (i->Ain.Sh64.src == 0) {
- *p++ = rexAMode_R(fake(0), i->Ain.Sh64.dst);
- *p++ = toUChar(opc_cl);
- p = doAMode_R(p, fake(subopc), i->Ain.Sh64.dst);
+ PUT(ab, rexAMode_R(fake(0), i->Ain.Sh64.dst));
+ PUT(ab, toUChar(opc_cl));
+ doAMode_R(ab, fake(subopc), i->Ain.Sh64.dst);
goto done;
} else {
- *p++ = rexAMode_R(fake(0), i->Ain.Sh64.dst);
- *p++ = toUChar(opc_imm);
- p = doAMode_R(p, fake(subopc), i->Ain.Sh64.dst);
- *p++ = (UChar)(i->Ain.Sh64.src);
+ PUT(ab, rexAMode_R(fake(0), i->Ain.Sh64.dst));
+ PUT(ab, toUChar(opc_imm));
+ doAMode_R(ab, fake(subopc), i->Ain.Sh64.dst);
+ PUT(ab, (UChar)(i->Ain.Sh64.src));
goto done;
}
break;
case Ain_Test64:
/* testq sign-extend($imm32), %reg */
- *p++ = rexAMode_R(fake(0), i->Ain.Test64.dst);
- *p++ = 0xF7;
- p = doAMode_R(p, fake(0), i->Ain.Test64.dst);
- p = emit32(p, i->Ain.Test64.imm32);
+ PUT(ab, rexAMode_R(fake(0), i->Ain.Test64.dst));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(0), i->Ain.Test64.dst);
+ emit32(ab, i->Ain.Test64.imm32);
goto done;
case Ain_Unary64:
if (i->Ain.Unary64.op == Aun_NOT) {
- *p++ = rexAMode_R(fake(0), i->Ain.Unary64.dst);
- *p++ = 0xF7;
- p = doAMode_R(p, fake(2), i->Ain.Unary64.dst);
+ PUT(ab, rexAMode_R(fake(0), i->Ain.Unary64.dst));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(2), i->Ain.Unary64.dst);
goto done;
}
if (i->Ain.Unary64.op == Aun_NEG) {
- *p++ = rexAMode_R(fake(0), i->Ain.Unary64.dst);
- *p++ = 0xF7;
- p = doAMode_R(p, fake(3), i->Ain.Unary64.dst);
+ PUT(ab, rexAMode_R(fake(0), i->Ain.Unary64.dst));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(3), i->Ain.Unary64.dst);
goto done;
}
break;
case Ain_Lea64:
- *p++ = rexAMode_M(i->Ain.Lea64.dst, i->Ain.Lea64.am);
- *p++ = 0x8D;
- p = doAMode_M(p, i->Ain.Lea64.dst, i->Ain.Lea64.am);
+ PUT(ab, rexAMode_M(i->Ain.Lea64.dst, i->Ain.Lea64.am));
+ PUT(ab, 0x8D);
+ doAMode_M(ab, i->Ain.Lea64.dst, i->Ain.Lea64.am);
goto done;
case Ain_Alu32R:
@@ -2544,40 +2591,40 @@
if (sameHReg(i->Ain.Alu32R.dst, hregAMD64_RAX())
&& !fits8bits(i->Ain.Alu32R.src->Armi.Imm.imm32)) {
goto bad; /* FIXME: awaiting test case */
- *p++ = toUChar(opc_imma);
- p = emit32(p, i->Ain.Alu32R.src->Armi.Imm.imm32);
+ PUT(ab, toUChar(opc_imma));
+ emit32(ab, i->Ain.Alu32R.src->Armi.Imm.imm32);
} else
if (fits8bits(i->Ain.Alu32R.src->Armi.Imm.imm32)) {
rex = clearWBit( rexAMode_R( fake(0), i->Ain.Alu32R.dst ) );
- if (rex != 0x40) *p++ = rex;
- *p++ = 0x83;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
- *p++ = toUChar(0xFF & i->Ain.Alu32R.src->Armi.Imm.imm32);
+ if (rex != 0x40) PUT(ab, rex);
+ PUT(ab, 0x83);
+ doAMode_R(ab, fake(subopc_imm), i->Ain.Alu32R.dst);
+ PUT(ab, toUChar(0xFF & i->Ain.Alu32R.src->Armi.Imm.imm32));
} else {
rex = clearWBit( rexAMode_R( fake(0), i->Ain.Alu32R.dst) );
- if (rex != 0x40) *p++ = rex;
- *p++ = 0x81;
- p = doAMode_R(p, fake(subopc_imm), i->Ain.Alu32R.dst);
- p = emit32(p, i->Ain.Alu32R.src->Armi.Imm.imm32);
+ if (rex != 0x40) PUT(ab, rex);
+ PUT(ab, 0x81);
+ doAMode_R(ab, fake(subopc_imm), i->Ain.Alu32R.dst);
+ emit32(ab, i->Ain.Alu32R.src->Armi.Imm.imm32);
}
goto done;
case Armi_Reg:
rex = clearWBit(
rexAMode_R( i->Ain.Alu32R.src->Armi.Reg.reg,
i->Ain.Alu32R.dst) );
- if (rex != 0x40) *p++ = rex;
- *p++ = toUChar(opc_rr);
- p = doAMode_R(p, i->Ain.Alu32R.src->Armi.Reg.reg,
- i->Ain.Alu32R.dst);
+ if (rex != 0x40) PUT(ab, rex);
+ PUT(ab, toUChar(opc_rr));
+ doAMode_R(ab, i->Ain.Alu32R.src->Armi.Reg.reg,
+ i->Ain.Alu32R.dst);
goto done;
case Armi_Mem:
rex = clearWBit(
rexAMode_M( i->Ain.Alu32R.dst,
i->Ain.Alu32R.src->Armi.Mem.am) );
- if (rex != 0x40) *p++ = rex;
- *p++ = toUChar(opc);
- p = doAMode_M(p, i->Ain.Alu32R.dst,
- i->Ain.Alu32R.src->Armi.Mem.am);
+ if (rex != 0x40) PUT(ab, rex);
+ PUT(ab, toUChar(opc));
+ doAMode_M(ab, i->Ain.Alu32R.dst,
+ i->Ain.Alu32R.src->Armi.Mem.am);
goto done;
default:
goto bad;
@@ -2588,18 +2635,18 @@
subopc = i->Ain.MulL.syned ? 5 : 4;
switch (i->Ain.MulL.src->tag) {
case Arm_Mem:
- *p++ = rexAMode_M( fake(0),
- i->Ain.MulL.src->Arm.Mem.am);
- *p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.MulL.src->Arm.Mem.am);
+ PUT(ab, rexAMode_M( fake(0),
+ i->Ain.MulL.src->Arm.Mem.am));
+ PUT(ab, 0xF7);
+ doAMode_M(ab, fake(subopc),
+ i->Ain.MulL.src->Arm.Mem.am);
goto done;
case Arm_Reg:
- *p++ = rexAMode_R(fake(0),
- i->Ain.MulL.src->Arm.Reg.reg);
- *p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.MulL.src->Arm.Reg.reg);
+ PUT(ab, rexAMode_R(fake(0),
+ i->Ain.MulL.src->Arm.Reg.reg));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(subopc),
+ i->Ain.MulL.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2613,16 +2660,16 @@
case Arm_Mem:
goto bad;
/*FIXME*/
- *p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.Div.src->Arm.Mem.am);
+ PUT(ab, 0xF7);
+ doAMode_M(ab, fake(subopc),
+ i->Ain.Div.src->Arm.Mem.am);
goto done;
case Arm_Reg:
- *p++ = clearWBit(
- rexAMode_R( fake(0), i->Ain.Div.src->Arm.Reg.reg));
- *p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.Div.src->Arm.Reg.reg);
+ PUT(ab, clearWBit(
+ rexAMode_R( fake(0), i->Ain.Div.src->Arm.Reg.reg)));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(subopc),
+ i->Ain.Div.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2631,18 +2678,18 @@
if (i->Ain.Div.sz == 8) {
switch (i->Ain.Div.src->tag) {
case Arm_Mem:
- *p++ = rexAMode_M( fake(0),
- i->Ain.Div.src->Arm.Mem.am);
- *p++ = 0xF7;
- p = doAMode_M(p, fake(subopc),
- i->Ain.Div.src->Arm.Mem.am);
+ PUT(ab, rexAMode_M( fake(0),
+ i->Ain.Div.src->Arm.Mem.am));
+ PUT(ab, 0xF7);
+ doAMode_M(ab, fake(subopc),
+ i->Ain.Div.src->Arm.Mem.am);
goto done;
case Arm_Reg:
- *p++ = rexAMode_R( fake(0),
- i->Ain.Div.src->Arm.Reg.reg);
- *p++ = 0xF7;
- p = doAMode_R(p, fake(subopc),
- i->Ain.Div.src->Arm.Reg.reg);
+ PUT(ab, rexAMode_R( fake(0),
+ i->Ain.Div.src->Arm.Reg.reg));
+ PUT(ab, 0xF7);
+ doAMode_R(ab, fake(subopc),
+ i->Ain.Div.src->Arm.Reg.reg);
goto done;
default:
goto bad;
@@ -2653,18 +2700,19 @@
case Ain_Push:
switch (i->Ain.Push.src->tag) {
case Armi_Mem:
- *p++ = clearWBit(
- rexAMode_M(fake(0), i->Ain.Push.src->Armi.Mem.am));
- *p++ = 0xFF;
- p = doAMode_M(p, fake(6), i->Ain.Push.src->Armi.Mem.am);
+ PUT(ab, clearWBit(
+ rexAMode_M(fake(0), i->Ain.Push.src->Armi.Mem.am)));
+ PUT(ab, 0xFF);
+ doAMode_M(ab, fake(6), i->Ain.Push.src->Armi.Mem.am);
goto done;
case Armi_Imm:
- *p++ = 0x68;
- p = emit32(p, i->Ain.Push.src->Armi.Imm.imm32);
+ PUT(ab, 0x68);
+ emit32(ab, i->Ain.Push.src->Armi.Imm.imm32);
goto done;
case Armi_Reg:
- *p++ = toUChar(0x40 + (1 & iregBit3(i->Ain.Push.src->Armi.Reg.reg)));
- *p++ = toUChar(0x50 + iregBits210(i->Ain.Push.src->Armi.Reg.reg));
+ PUT(ab, toUChar(0x40 + (1 & iregBit3(i->Ain.Push.src
+ ->Armi.Reg.reg))));
+ PUT(ab, toUChar(0x50 + iregBits210(i->Ain.Push.src->Armi.Reg.reg)));
goto done;
default:
goto bad;
@@ -2688,26 +2736,26 @@
hold */
Bool shortImm = fitsIn32Bits(i->Ain.Call.target);
if (i->Ain.Call.cond != Acc_ALWAYS) {
- *p++ = toUChar(0x70 + (0xF & (i->Ain.Call.cond ^ 1)));
- *p++ = shortImm ? 10 : 13;
+ PUT(ab, toUChar(0x70 + (0xF & (i->Ain.Call.cond ^ 1))));
+ PUT(ab, shortImm ? 10 : 13);
/* 10 or 13 bytes in the next two insns */
}
if (shortImm) {
/* 7 bytes: movl sign-extend(imm32), %r11 */
- *p++ = 0x49;
- *p++ = 0xC7;
- *p++ = 0xC3;
- p = emit32(p, (UInt)i->Ain.Call.target);
+ PUT(ab, 0x49);
+ PUT(ab, 0xC7);
+ PUT(ab, 0xC3);
+ emit32(ab, (UInt)i->Ain.Call.target);
} else {
/* 10 bytes: movabsq $target, %r11 */
- *p++ = 0x49;
- *p++ = 0xBB;
- p = emit64(p, i->Ain.Call.target);
+ PUT(ab, 0x49);
+ PUT(ab, 0xBB);
+ emit64(ab, i->Ain.Call.target);
}
/* 3 bytes: call *%r11 */
- *p++ = 0x41;
- *p++ = 0xFF;
- *p++ = 0xD3;
+ PUT(ab, 0x41);
+ PUT(ab, 0xFF);
+ PUT(ab, 0xD3);
goto done;
}
@@ -2717,42 +2765,42 @@
/* We're generating chain-me requests here, so we need to be
sure this is actually allowed -- no-redir translations can't
use chain-me's. Hence: */
- vassert(disp_cp_chain_me_to_slowEP != NULL);
- vassert(disp_cp_chain_me_to_fastEP != NULL);
+ vassert(vda->disp_cp_chain_me_to_slowEP != NULL);
+ vassert(vda->disp_cp_chain_me_to_fastEP != NULL);
HReg r11 = hregAMD64_R11();
/* Use ptmp for backpatching conditional jumps. */
- ptmp = NULL;
+ UChar* ptmp = NULL;
/* First off, if this is conditional, create a conditional
jump over the rest of it. */
if (i->Ain.XDirect.cond != Acc_ALWAYS) {
/* jmp fwds if !condition */
- *p++ = toUChar(0x70 + (0xF & (i->Ain.XDirect.cond ^ 1)));
- ptmp = p; /* fill in this bit later */
- *p++ = 0; /* # of bytes to jump over; don't know how many yet. */
+ PUT(ab, toUChar(0x70 + (0xF & (i->Ain.XDirect.cond ^ 1))));
+ ptmp = AssemblyBuffer__getCursor(ab); /* fill in this bit later */
+ PUT(ab, 0); /* # of bytes to jump over; don't know how many yet. */
}
/* Update the guest RIP. */
if (fitsIn32Bits(i->Ain.XDirect.dstGA)) {
/* use a shorter encoding */
/* movl sign-extend(dstGA), %r11 */
- *p++ = 0x49;
- *p++ = 0xC7;
- *p++ = 0xC3;
- p = emit32(p, (UInt)i->Ain.XDirect.dstGA);
+ PUT(ab, 0x49);
+ PUT(ab, 0xC7);
+ PUT(ab, 0xC3);
+ emit32(ab, (UInt)i->Ain.XDirect.dstGA);
} else {
/* movabsq $dstGA, %r11 */
- *p++ = 0x49;
- *p++ = 0xBB;
- p = emit64(p, i->Ain.XDirect.dstGA);
+ PUT(ab, 0x49);
+ PUT(ab, 0xBB);
+ emit64(ab, i->Ain.XDirect.dstGA);
}
/* movq %r11, amRIP */
- *p++ = rexAMode_M(r11, i->Ain.XDirect.amRIP);
- *p++ = 0x89;
- p = doAMode_M(p, r11, i->Ain.XDirect.amRIP);
+ PUT(ab, rexAMode_M(r11, i->Ain.XDirect.amRIP));
+ PUT(ab, 0x89);
+ doAMode_M(ab, r11, i->Ain.XDirect.amRIP);
/* --- FIRST PATCHABLE BYTE follows --- */
/* VG_(disp_cp_chain_me_to_{slowEP,fastEP}) (where we're calling
@@ -2760,21 +2808,21 @@
the first patchable byte. So: don't change the length of the
two instructions below. */
/* movabsq $disp_cp_chain_me_to_{slow,fast}EP,%r11; */
- *p++ = 0x49;
- *p++ = 0xBB;
+ PUT(ab, 0x49);
+ PUT(ab, 0xBB);
const void* disp_cp_chain_me
- = i->Ain.XDirect.toFastEP ? disp_cp_chain_me_to_fastEP
- : disp_cp_chain_me_to_slowEP;
- p = emit64(p, (Addr)disp_cp_chain_me);
+ = i->Ain.XDirect.toFastEP ? vda->disp_cp_chain_me_to_fastEP
+ : vda->disp_cp_chain_me_to_slowEP;
+ emit64(ab, (ULong)(Addr)disp_cp_chain_me);
/* call *%r11 */
- *p++ = 0x41;
- *p++ = 0xFF;
- *p++ = 0xD3;
+ PUT(ab, 0x41);
+ PUT(ab, 0xFF);
+ PUT(ab, 0xD3);
/* --- END of PATCHABLE BYTES --- */
/* Fix up the conditional jump, if there was one. */
if (i->Ain.XDirect.cond != Acc_ALWAYS) {
- Int delta = p - ptmp;
+ Long delta = AssemblyBuffer__getCursor(ab) - ptmp;
vassert(delta > 0 && delta < 40);
*ptmp = toUChar(delta-1);
}
@@ -2788,48 +2836,48 @@
translations without going through the scheduler. That means
no XDirects or XIndirs out from no-redir translations.
Hence: */
- vassert(disp_cp_xindir != NULL);
+ vassert(vda->disp_cp_xindir != NULL);
/* Use ptmp for backpatching conditional jumps. */
- ptmp = NULL;
+ UChar* ptmp = NULL;
/* First off, if this is conditional, create a conditional
jump over the rest of it. */
if (i->Ain.XIndir.cond != Acc_ALWAYS) {
/* jmp fwds if !condition */
- *p++ = toUChar(0x70 + (0xF & (i->Ain.XIndir.cond ^ 1)));
- ptmp = p; /* fill in this bit later */
- *p++ = 0; /* # of bytes to jump over; don't know how many yet. */
+ PUT(ab, toUChar(0x70 + (0xF & (i->Ain.XIndir.cond ^ 1))));
+ ptmp = AssemblyBuffer__getCursor(ab); /* fill in this bit later */
+ PUT(ab, 0); /* # of bytes to jump over; don't know how many yet. */
}
/* movq dstGA(a reg), amRIP -- copied from Alu64M MOV case */
- *p++ = rexAMode_M(i->Ain.XIndir.dstGA, i->Ain.XIndir.amRIP);
- *p++ = 0x89;
- p = doAMode_M(p, i->Ain.XIndir.dstGA, i->Ain.XIndir.amRIP);
+ PUT(ab, rexAMode_M(i->Ain.XIndir.dstGA, i->Ain.XIndir.amRIP));
+ PUT(ab, 0x89);
+ doAMode_M(ab, i->Ain.XIndir.dstGA, i->Ain.XIndir.amRIP);
/* get $disp_cp_xindir into %r11 */
- if (fitsIn32Bits((Addr)disp_cp_xindir)) {
+ if (fitsIn32Bits((Addr)vda->disp_cp_xindir)) {
/* use a shorter encoding */
/* movl sign-extend(disp_cp_xindir), %r11 */
- *p++ = 0x49;
- *p++ = 0xC7;
- *p++ = 0xC3;
- p = emit32(p, (UInt)(Addr)disp_cp_xindir);
+ PUT(ab, 0x49);
+ PUT(ab, 0xC7);
+ PUT(ab, 0xC3);
+ emit32(ab, (UInt)(Addr)vda->disp_cp_xindir);
} else {
/* movabsq $disp_cp_xindir, %r11 */
- *p++ = 0x49;
- *p++ = 0xBB;
- p = emit64(p, (Addr)disp_cp_xindir);
+ PUT(ab, 0x49);
+ PUT(ab, 0xBB);
+ emit64(ab, (ULong)(Addr)vda->disp_cp_xindir);
}
/* jmp *%r11 */
- *p++ = 0x41;
- *p++ = 0xFF;
- *p++ = 0xE3;
+ PUT(ab, 0x41);
+ PUT(ab, 0xFF);
+ PUT(ab, 0xE3);
/* Fix up the conditional jump, if there was one. */
if (i->Ain.XIndir.cond != Acc_ALWAYS) {
- Int delta = p - ptmp;
+ Long delta = AssemblyBuffer__getCursor(ab) - ptmp;
vassert(delta > 0 && delta < 40);
*ptmp = toUChar(delta-1);
}
@@ -2838,21 +2886,21 @@
case Ain_XAssisted: {
/* Use ptmp for backpatching conditional jumps. */
- ptmp = NULL;
+ UChar* ptmp = NULL;
/* First off, if this is conditional, create a conditional
jump over the rest of it. */
if (i->Ain.XAssisted.cond != Acc_ALWAYS) {
/* jmp fwds if !condition */
- *p++ = toUChar(0x70 + (0xF & (i->Ain.XAssisted.cond ^ 1)));
- ptmp = p; /* fill in this bit later */
- *p++ = 0; /* # of bytes to jump over; don't know how many yet. */
+ PUT(ab, toUChar(0x70 + (0xF & (i->Ain.XAssisted.cond ^ 1))));
+ ptmp = AssemblyBuffer__getCursor(ab); /* fill in this bit later */
+ PUT(ab, 0); /* # of bytes to jump over; don't know how many yet. */
}
/* movq dstGA(a reg), amRIP -- copied from Alu64M MOV case */
- *p++ = rexAMode_M(i->Ain.XAssisted.dstGA, i->Ain.XAssisted.amRIP);
- *p++ = 0x89;
- p = doAMode_M(p, i->Ain.XAssisted.dstGA, i->Ain.XAssisted.amRIP);
+ PUT(ab, rexAMode_M(i->Ain.XAssisted.dstGA, i->Ain.XAssisted.amRIP));
+ PUT(ab, 0x89);
+ doAMode_M(ab, i->Ain.XAssisted.dstGA, i->Ain.XAssisted.amRIP);
/* movl $magic_number, %ebp. Since these numbers are all small positive
integers, we can get away with "movl $N, %ebp" rather than
the longer "movq $N, %rbp". */
@@ -2879,20 +2927,20 @@
vpanic("emit_AMD64Instr.Ain_XAssisted: unexpected jump kind");
}
vassert(trcval != 0);
- *p++ = 0xBD;
- p = emit32(p, trcval);
+ PUT(ab, 0xBD);
+ emit32(ab, trcval);
/* movabsq $disp_assisted, %r11 */
- *p++ = 0x49;
- *p++ = 0xBB;
- p = emit64(p, (Addr)disp_cp_xassisted);
+ PUT(ab, 0x49);
+ PUT(ab, 0xBB);
+ emit64(ab, (ULong)(Addr)vda->disp_cp_xassisted);
/* jmp *%r11 */
- *p++ = 0x41;
- *p++ = 0xFF;
- *p++ = 0xE3;
+ PUT(ab, 0x41);
+ PUT(ab, 0xFF);
+ PUT(ab, 0xE3);
/* Fix up the conditional jump, if there was one. */
if (i->Ain.XAssisted.cond != Acc_ALWAYS) {
- Int delta = p - ptmp;
+ Long delta = AssemblyBuffer__getCursor(ab) - ptmp;
vassert(delta > 0 && delta < 40);
*ptmp = toUChar(delta-1);
}
@@ -2902,17 +2950,17 @@
case Ain_CMov64:
vassert(i->Ain.CMov64.cond != Acc_ALWAYS);
if (i->Ain.CMov64.src->tag == Arm_Reg) {
- *p++ = rexAMode_R(i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Reg.reg);
- *p++ = 0x0F;
- *p++ = toUChar(0x40 + (0xF & i->Ain.CMov64.cond));
- p = doAMode_R(p, i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Reg.reg);
+ PUT(ab, rexAMode_R(i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Reg.reg));
+ PUT(ab, 0x0F);
+ PUT(ab, toUChar(0x40 + (0xF & i->Ain.CMov64.cond)));
+ doAMode_R(ab, i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Reg.reg);
goto done;
}
if (i->Ain.CMov64.src->tag == Arm_Mem) {
- *p++ = rexAMode_M(i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Mem.am);
- *p++ = 0x0F;
- *p++ = toUChar(0x40 + (0xF & i->Ain.CMov64.cond));
- p = doAMode_M(p, i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Mem.am);
+ PUT(ab, rexAMode_M(i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Mem.am));
+ PUT(ab, 0x0F);
+ PUT(ab, toUChar(0x40 + (0xF & i->Ain.CMov64.cond)));
+ doAMode_M(ab, i->Ain.CMov64.dst, i->Ain.CMov64.src->Arm.Mem.am);
goto done;
}
break;
@@ -2922,34 +2970,34 @@
different in the S vs Z case. I don't know. */
if (i->Ain.MovxLQ.syned) {
/* Need REX.W = 1 here, but rexAMode_R does that for us. */
- *p++ = rexAMode_R(i->Ain.MovxLQ.dst, i->Ain.MovxLQ.src);
- *p++ = 0x63;
- p = doAMode_R(p, i->Ain.MovxLQ.dst, i->Ain.MovxLQ.src);
+ PUT(ab, rexAMode_R(i->Ain.MovxLQ.dst, i->Ain.MovxLQ.src));
+ PUT(ab, 0x63);
+ doAMode_R(ab, i->Ain.MovxLQ.dst, i->Ain.MovxLQ.src);
} else {
/* Produce a 32-bit reg-reg move, since the implicit
zero-extend does what we want. */
- *p++ = clearWBit (
- rexAMode_R(i->Ain.MovxLQ.src, i->Ain.MovxLQ.dst));
- *p++ = 0x89;
- p = doAMode_R(p, i->Ain.MovxLQ.src, i->Ain.MovxLQ.dst);
+ PUT(ab, clearWBit (
+ rexAMode_R(i->Ain.MovxLQ.src, i->Ain.MovxLQ.dst)));
+ PUT(ab, 0x89);
+ doAMode_R(ab, i->Ain.MovxLQ.src, i->Ain.MovxLQ.dst);
}
goto done;
case Ain_LoadEX:
if (i->Ain.LoadEX.szSmall == 1 && !i->Ain.LoadEX.syned) {
/* movzbq */
- *p++ = rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
- *p++ = 0x0F;
- *p++ = 0xB6;
- p = doAMode_M(p, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
+ PUT(ab, rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src));
+ PUT(ab, 0x0F);
+ PUT(ab, 0xB6);
+ doAMode_M(ab, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
goto done;
}
if (i->Ain.LoadEX.szSmall == 2 && !i->Ain.LoadEX.syned) {
/* movzwq */
- *p++ = rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
- *p++ = 0x0F;
- *p++ = 0xB7;
- p = doAMode_M(p, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
+ PUT(ab, rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src));
+ PUT(ab, 0x0F);
+ PUT(ab, 0xB7);
+ doAMode_M(ab, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
goto done;
}
if (i->Ain.LoadEX.szSmall == 4 && !i->Ain.LoadEX.syned) {
@@ -2958,10 +3006,10 @@
Rather, we have to do a 32-bit load. Because a 32-bit
write implicitly clears the upper 32 bits of the target
register, we get what we want. */
- *p++ = clearWBit(
- rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src));
- *p++ = 0x8B;
- p = doAMode_M(p, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
+ PUT(ab, clearWBit(
+ rexAMode_M(i->Ain.LoadEX.dst, i->Ain.LoadEX.src)));
+ PUT(ab, 0x8B);
+ doAMode_M(ab, i->Ain.LoadEX.dst, i->Ain.LoadEX.src);
goto done;
}
break;
@@ -2976,39 +3024,39 @@
vassert(reg < 16);
/* movq $0, %dst */
- *p++ = toUChar(reg >= 8 ? 0x49 : 0x48);
- *p++ = 0xC7;
- *p++ = toUChar(0xC0 + (reg & 7));
- p = emit32(p, 0);
+ PUT(ab, toUChar(reg >= 8 ? 0x49 : 0x48));
+ PUT(ab, 0xC7);
+ PUT(ab, toUChar(0xC0 + (reg & 7)));
+ emit32(ab, 0);
/* setb lo8(%dst) */
/* note, 8-bit register rex trickyness. Be careful here. */
- *p++ = toUChar(reg >= 8 ? 0x41 : 0x40);
- *p++ = 0x0F;
- *p++ = toUChar(0x90 + (0x0F & i->Ain.Set64.cond));
- *p++ = toUChar(0xC0 + (reg & 7));
+ PUT(ab, toUChar(reg >= 8 ? 0x41 : 0x40));
+ PUT(ab, 0x0F);
+ PUT(ab, toUChar(0x90 + (0x0F & i->Ain.Set64.cond)));
+ PUT(ab, toUChar(0xC0 + (reg & 7)));
goto done;
case Ain_Bsfr64:
- *p++ = rexAMode_R(i->Ain.Bsfr64.dst, i->Ain.Bsfr64.src);
- *p++ = 0x0F;
+ PUT(ab, rexAMode_R(i->Ain.Bsfr64.dst, i->Ain.Bsfr64.src));
+ PUT(ab, 0x0F);
if (i->Ain.Bsfr64.isFwds) {
- *p++ = 0xBC;
+ PUT(ab, 0xBC);
} else {
- *p++ = 0xBD;
+ PUT(ab, 0xBD);
}
- p = doAMode_R(p, i->Ain.Bsfr64.dst, i->Ain.Bsfr64.src);
+ doAMode_R(ab, i->Ain.Bsfr64.dst, i->Ain.Bsfr64.src);
goto done;
case Ain_MFence:
/* mfence */
- *p++ = 0x0F; *p++ = 0xAE; *p++ = 0xF0;
+ PUT(ab, 0x0F); PUT(ab, 0xAE); PUT(ab, 0xF0);
goto done;
case Ain_ACAS:
/* lock */
- *p++ = 0xF0;
- if (i->Ain.ACAS.sz == 2) *p++ = 0x66;
+ PUT(ab, 0xF0);
+ if (i->Ain.ACAS.sz == 2) PUT(ab, 0x66);
/* cmpxchg{b,w,l,q} %rbx,mem. Expected-value in %rax, new value
in %rbx. The new-value register is hardwired to be %rbx
since dealing with byte integer registers is too much hassle,
@@ -3018,65 +3066,67 @@
if (i->Ain.ACAS.sz != 8)
rex = clearWBit(rex);
- *p++ = rex; /* this can emit 0x40, which is pointless. oh well. */
- *p++ = 0x0F;
- if (i->Ain.ACAS.sz == 1) *p++ = 0xB0; else *p++ = 0xB1;
- p = doAMode_M(p, hregAMD64_RBX(), i->Ain.ACAS.addr);
+ PUT(ab, rex); /* this can emit 0x40, which is pointless. oh well. */
+ PUT(ab, 0x0F);
+ if (i->Ain.ACAS.sz == 1) PUT(ab, 0xB0); else PUT(ab, 0xB1);
+ doAMode_M(ab, hregAMD64_RBX(), i->Ain.ACAS.addr);
goto done;
case Ain_DACAS:
/* lock */
- *p++ = 0xF0;
+ PUT(ab, 0xF0);
/* cmpxchg{8,16}b m{64,128}. Expected-value in %rdx:%rax, new
value in %rcx:%rbx. All 4 regs are hardwired in the ISA, so
aren't encoded in the insn. */
rex = rexAMode_M( fake(1), i->Ain.ACAS.addr );
if (i->Ain.ACAS.sz != 8)
rex = clearWBit(rex);
- *p++ = rex;
- *p++ = 0x0F;
- *p++ = 0xC7;
- p = doAMode_M(p, fake(1), i->Ain.DACAS.addr);
+ PUT(ab, rex);
+ PUT(ab, 0x0F);
+ PUT(ab, 0xC7);
+ doAMode_M(ab, fake(1), i->Ain.DACAS.addr);
goto done;
- case Ain_A87Free:
+ case Ain_A87Free: {
+ Int j;
vassert(i->Ain.A87Free.nregs > 0 && i->Ain.A87Free.nregs <= 7);
for (j = 0; j < i->Ain.A87Free.nregs; j++) {
- p = do_ffree_st(p, 7-j);
+ do_ffree_st(ab, 7-j);
}
goto done;
+ }
case Ain_A87PushPop:
vassert(i->Ain.A87PushPop.szB == 8 || i->Ain.A87PushPop.szB == 4);
if (i->Ain.A87PushPop.isPush) {
/* Load from memory into %st(0): flds/fldl amode */
- *p++ = clearWBit(
- rexAMode_M(fake(0), i->Ain.A87PushPop.addr) );
- *p++ = i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD;
- p = doAMode_M(p, fake(0)/*subopcode*/, i->Ain.A87PushPop.addr);
+ PUT(ab, clearWBit(
+ rexAMode_M(fake(0), i->Ain.A87PushPop.addr) ));
+ PUT(ab, i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD);
+ doAMode_M(ab, fake(0)/*subopcode*/, i->Ain.A87PushPop.addr);
} else {
/* Dump %st(0) to memory: fstps/fstpl amode */
- *p++ = clearWBit(
- rexAMode_M(fake(3), i->Ain.A87PushPop.addr) );
- *p++ = i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD;
- p = doAMode_M(p, fake(3)/*subopcode*/, i->Ain.A87PushPop.addr);
+ PUT(ab, clearWBit(
+ rexAMode_M(fake(3), i->Ain.A87PushPop.addr) ));
+ PUT(ab, i->Ain.A87PushPop.szB == 4 ? 0xD9 : 0xDD);
+ doAMode_M(ab, fake(3)/*subopcode*/, i->Ain.A87PushPop.addr);
goto done;
}
goto done;
case Ain_A87FpOp:
switch (i->Ain.A87FpOp.op) {
- case Afp_SQRT: *p++ = 0xD9; *p++ = 0xFA; break;
- case Afp_SIN: *p++ = 0xD9; *p++ = 0xFE; break;
- case Afp_COS: *p++ = 0xD9; *p++ = 0xFF; break;
- case Afp_ROUND: *p++ = 0xD9; *p++ = 0xFC; break;
- case Afp_2XM1: *p++ = 0xD9; *p++ = 0xF0; break;
- case Afp_SCALE: *p++ = 0xD9; *p++ = 0xFD; break;
- case Afp_ATAN: *p++ = 0xD9; *p++ = 0xF3; break;
- case Afp_YL2X: *p++ = 0xD9; *p++ = 0xF1; break;
- case Afp_YL2XP1: *p++ = 0xD9; *p++ = 0xF9; break;
- case Afp_PREM: *p++ = 0xD9; *p++ = 0xF8; break;
- case Afp_PREM1: *p++ = 0xD9; *p++ = 0xF5; break;
+ case Afp_SQRT: PUT(ab, 0xD9); PUT(ab, 0xFA); break;
+ case Afp_SIN: PUT(ab, 0xD9); PUT(ab, 0xFE); break;
+ case Afp_COS: PUT(ab, 0xD9); PUT(ab, 0xFF); break;
+ case Afp_ROUND: PUT(ab, 0xD9); PUT(ab, 0xFC); break;
+ case Afp_2XM1: PUT(ab, 0xD9); PUT(ab, 0xF0); break;
+ case Afp_SCALE: PUT(ab, 0xD9); PUT(ab, 0xFD); break;
+ case Afp_ATAN: PUT(ab, 0xD9); PUT(ab, 0xF3); break;
+ case Afp_YL2X: PUT(ab, 0xD9); PUT(ab, 0xF1); break;
+ case Afp_YL2XP1: PUT(ab, 0xD9); PUT(ab, 0xF9); break;
+ case Afp_PREM: PUT(ab, 0xD9); PUT(ab, 0xF8); break;
+ case Afp_PREM1: PUT(ab, 0xD9); PUT(ab, 0xF5); break;
case Afp_TAN:
/* fptan pushes 1.0 on the FP stack, except when the
argument is out of range. Hence we have to do the
@@ -3084,14 +3134,14 @@
of range condition. If there is, we skip the fincstp
that is used by the in-range case to get rid of this
extra 1.0 value. */
- *p++ = 0xD9; *p++ = 0xF2; // fptan
- *p++ = 0x50; // pushq %rax
- *p++ = 0xDF; *p++ = 0xE0; // fnstsw %ax
- *p++ = 0x66; *p++ = 0xA9;
- *p++ = 0x00; *p++ = 0x04; // testw $0x400,%ax
- *p++ = 0x75; *p++ = 0x02; // jnz after_fincstp
- *p++ = 0xD9; *p++ = 0xF7; // fincstp
- *p++ = 0x58; // after_fincstp: popq %rax
+ PUT(ab, 0xD9); PUT(ab, 0xF2); // fptan
+ PUT(ab, 0x50); // pushq %rax
+ PUT(ab, 0xDF); PUT(ab, 0xE0); // fnstsw %ax
+ PUT(ab, 0x66); PUT(ab, 0xA9);
+ PUT(ab, 0x00); PUT(ab, 0x04); // testw $0x400,%ax
+ PUT(ab, 0x75); PUT(ab, 0x02); // jnz after_fincstp
+ PUT(ab, 0xD9); PUT(ab, 0xF7); // fincstp
+ PUT(ab, 0x58); // after_fincstp: popq %rax
break;
default:
goto bad;
@@ -3099,17 +3149,17 @@
goto done;
case Ain_A87LdCW:
- *p++ = clearWBit(
- rexAMode_M(fake(5), i->Ain.A87LdCW.addr) );
- *p++ = 0xD9;
- p = doAMode_M(p, fake(5)/*subopcode*/, i->Ain.A87LdCW.addr);
+ PUT(ab, clearWBit(
+ rexAMode_M(fake(5), i->Ain.A87LdCW.addr) ));
+ PUT(ab, 0xD9);
+ doAMode_M(ab, fake(5)/*subopcode*/, i->Ain.A87LdCW.addr);
goto done;
case Ain_A87StSW:
- *p++ = clearWBit(
- rexAMode_M(fake(7), i->Ain.A87StSW.addr) );
- *p++ = 0xDD;
- p = doAMode_M(p, fake(7)/*subopcode*/, i->Ain.A87StSW.addr);
+ PUT(ab, clearWBit(
+ rexAMode_M(fake(7), i->Ain.A87StSW.addr) ));
+ PUT(ab, 0xDD);
+ doAMode_M(ab, fake(7)/*subopcode*/, i->Ain.A87StSW.addr);
goto done;
case Ain_Store:
@@ -3118,238 +3168,238 @@
set encoding. We have to insert two prefix bytes, but be
careful to avoid a conflict in what the size should be, by
ensuring that REX.W = 0. */
- *p++ = 0x66; /* override to 16-bits */
- *p++ = clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) );
- *p++ = 0x89;
- p = doAMode_M(p, i->Ain.Store.src, i->Ain.Store.dst);
+ PUT(ab, 0x66); /* override to 16-bits */
+ PUT(ab, clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) ));
+ PUT(ab, 0x89);
+ doAMode_M(ab, i->Ain.Store.src, i->Ain.Store.dst);
goto done;
}
if (i->Ain.Store.sz == 4) {
- *p++ = clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) );
- *p++ = 0x89;
- p = doAMode_M(p, i->Ain.Store.src, i->Ain.Store.dst);
+ PUT(ab, clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) ));
+ PUT(ab, 0x89);
+ doAMode_M(ab, i->Ain.Store.src, i->Ain.Store.dst);
goto done;
}
if (i->Ain.Store.sz == 1) {
/* This is one place where it would be wrong to skip emitting
a rex byte of 0x40, since the mere presence of rex changes
the meaning of the byte register access. Be careful. */
- *p++ = clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) );
- *p++ = 0x88;
- p = doAMode_M(p, i->Ain.Store.src, i->Ain.Store.dst);
+ PUT(ab, clearWBit( rexAMode_M( i->Ain.Store.src, i->Ain.Store.dst) ));
+ PUT(ab, 0x88);
+ doAMode_M(ab, i->Ain.Store.src, i->Ain.Store.dst);
goto done;
}
break;
case Ain_LdMXCSR:
- *p++ = clearWBit(rexAMode_M( fake(0), i->Ain.LdMXCSR.addr));
- *p++ = 0x0F;
- *p++ = 0xAE;
- p = doAMode_M(p, fake(2)/*subopcode*/, i->Ain.LdMXCSR.addr);
+ PUT(ab, clearWBit(rexAMode_M( fake(0), i->Ain.LdMXCSR.addr)));
+ PUT(ab, 0x0F);
+ PUT(ab, 0xAE);
+ doAMode_M(ab, fake(2)/*subopcode*/, i->Ain.LdMXCSR.addr);
goto done;
case Ain_SseUComIS:
/* ucomi[sd] %srcL, %srcR ; pushfq ; popq %dst */
/* ucomi[sd] %srcL, %srcR */
if (i->Ain.SseUComIS.sz == 8) {
- *p++ = 0x66;
+ PUT(ab, 0x66);
} else {
goto bad;
vassert(i->Ain.SseUComIS.sz == 4);
}
- *p++ = clearWBit (
- rexAMode_R( vreg2...
[truncated message content] |
|
From: <sv...@va...> - 2015-01-14 09:55:43
|
Author: sewardj
Date: Wed Jan 14 09:55:36 2015
New Revision: 14869
Log:
Swizzle external.
Modified:
branches/NCODE/ (props changed)
|
|
From: <sv...@va...> - 2015-01-14 09:50:27
|
Author: sewardj
Date: Wed Jan 14 09:50:20 2015
New Revision: 3064
Log:
Create branches/NCODE as a copy of trunk r3063.
Added:
branches/NCODE/
- copied from r3063, trunk/
|
|
From: Rich C. <rc...@wi...> - 2015-01-14 05:29:20
|
valgrind revision: 14867
VEX revision: 3063
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.6-2-desktop x86_64
Vendor version: Welcome to openSUSE 13.2 "Harlequin" - Kernel %r (%t).
Nightly build on rodan ( Linux 3.16.6-2-desktop x86_64 )
Started at 2015-01-13 19:22:01 CST
Ended at 2015-01-13 23:29:12 CST
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 615 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
+ perl perf/vg_perf --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old perf
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.48s no: 7.5s (15.7x, -----) me:15.5s (32.4x, -----) ca:61.0s (127.1x, -----) he: 9.5s (19.8x, -----) ca:17.1s (35.7x, -----) dr: 9.1s (19.0x, -----) ma: 8.9s (18.6x, -----)
bigcode1 valgrind-old:0.48s no: 7.5s (15.7x, 0.3%) me:15.1s (31.4x, 3.0%) ca:61.0s (127.1x, 0.0%) he: 9.5s (19.9x, -0.2%) ca:17.1s (35.7x, 0.1%) dr: 9.1s (19.0x, -0.1%) ma: 8.9s (18.6x, 0.1%)
-- bigcode2 --
bigcode2 valgrind-new:0.49s no:18.8s (38.3x, -----) me:39.7s (81.0x, -----) ca:105.6s (215.5x, -----) he:24.1s (49.2x, -----) ca:32.9s (67.1x, -----) dr:22.0s (45.0x, -----) ma:21.5s (43.9x, -----)
bigcode2 valgrind-old:0.49s no:18.7s (38.1x, 0.4%) me:39.5s (80.7x, 0.4%) ca:105.5s (215.3x, 0.1%) he:24.1s (49.2x, 0.0%) ca:32.8s (67.0x, 0.2%) dr:22.1s (45.0x, -0.1%) ma:21.5s (43.8x, 0.1%)
-- bz2 --
bz2 valgrind-new:2.32s no: 7.8s ( 3.4x, -----) me:25.4s (11.0x, -----) ca:56.8s (24.5x, -----) he:37.6s (16.2x, -----) ca:50.8s (21.9x, -----) dr:53.1s (22.9x, -----) ma: 7.4s ( 3.2x, -----)
bz2 valgrind-old:2.32s no: 7.8s ( 3.4x, 0.3%) me:25.4s (10.9x, 0.2%) ca:56.8s (24.5x, 0.0%) he:37.5s (16.2x, 0.1%) ca:50.6s (21.8x, 0.3%) dr:53.1s (22.9x, 0.0%) ma: 7.4s ( 3.2x, 0.0%)
-- fbench --
fbench valgrind-new:1.45s no: 5.2s ( 3.6x, -----) me:17.4s (12.0x, -----) ca:26.8s (18.5x, -----) he:13.2s ( 9.1x, -----) ca:16.3s (11.2x, -----) dr:13.3s ( 9.2x, -----) ma: 5.4s ( 3.7x, -----)
fbench valgrind-old:1.45s no: 5.2s ( 3.6x, 0.4%) me:17.5s (12.1x, -0.5%) ca:26.9s (18.5x, -0.1%) he:13.2s ( 9.1x, -0.5%) ca:16.2s (11.2x, 0.1%) dr:13.3s ( 9.2x, 0.1%) ma: 5.4s ( 3.7x, 0.0%)
-- ffbench --
ffbench valgrind-new:1.00s no: 3.4s ( 3.4x, -----) me:12.3s (12.3x, -----) ca: 7.8s ( 7.8x, -----) he:21.0s (21.0x, -----) ca:20.1s (20.1x, -----) dr:16.9s (16.9x, -----) ma: 3.4s ( 3.4x, -----)
ffbench valgrind-old:1.00s no: 3.4s ( 3.4x, 0.6%) me:12.3s (12.3x, 0.0%) ca: 7.8s ( 7.8x, -0.1%) he:21.1s (21.1x, -0.1%) ca:20.1s (20.1x, 0.0%) dr:16.9s (16.9x, 0.1%) ma: 3.4s ( 3.4x, -0.3%)
-- heap --
heap valgrind-new:0.42s no: 3.0s ( 7.2x, -----) me:22.1s (52.7x, -----) ca:30.2s (71.8x, -----) he:30.6s (72.9x, -----) ca:15.1s (35.9x, -----) dr:20.4s (48.7x, -----) ma:21.7s (51.7x, -----)
heap valgrind-old:0.42s no: 3.0s ( 7.1x, 0.7%) me:22.4s (53.5x, -1.5%) ca:30.1s (71.5x, 0.4%) he:30.4s (72.3x, 0.8%) ca:15.0s (35.8x, 0.1%) dr:20.6s (49.0x, -0.5%) ma:21.2s (50.6x, 2.2%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.56s no: 3.3s ( 5.9x, -----) me:38.0s (67.9x, -----) ca:33.4s (59.6x, -----) he:34.7s (61.9x, -----) ca:17.1s (30.5x, -----) dr:23.0s (41.1x, -----) ma:22.8s (40.8x, -----)
heap_pdb4 valgrind-old:0.56s no: 3.3s ( 6.0x, -0.3%) me:37.9s (67.7x, 0.2%) ca:33.4s (59.6x, -0.0%) he:34.5s (61.6x, 0.6%) ca:17.1s (30.5x, 0.0%) dr:23.2s (41.5x, -1.0%) ma:22.3s (39.9x, 2.2%)
-- many-loss-records --
many-loss-records valgrind-new:0.05s no: 1.0s (20.6x, -----) me: 6.0s (120.8x, -----) ca: 4.8s (95.4x, -----) he: 5.3s (107.0x, -----) ca: 2.9s (57.2x, -----) dr: 4.9s (97.8x, -----) ma: 4.8s (96.6x, -----)
many-loss-records valgrind-old:0.05s no: 1.0s (20.4x, 1.0%) me: 6.1s (121.6x, -0.7%) ca: 4.8s (95.6x, -0.2%) he: 5.3s (106.8x, 0.2%) ca: 2.9s (57.2x, 0.0%) dr: 4.9s (97.4x, 0.4%) ma: 4.7s (94.4x, 2.3%)
-- many-xpts --
many-xpts valgrind-new:0.16s no: 1.3s ( 8.2x, -----) me: 7.4s (46.2x, -----) ca:12.8s (79.9x, -----) he: 9.8s (61.5x, -----) ca: 4.2s (26.4x, -----) dr: 6.7s (41.8x, -----) ma: 7.0s (43.9x, -----)
many-xpts valgrind-old:0.16s no: 1.3s ( 8.1x, 1.5%) me: 7.4s (46.1x, 0.3%) ca:12.8s (79.8x, 0.2%) he: 9.8s (61.5x, 0.0%) ca: 4.2s (26.3x, 0.2%) dr: 6.7s (41.9x, -0.3%) ma: 6.9s (43.3x, 1.3%)
-- sarp --
sarp valgrind-new:0.11s no: 1.2s (11.3x, -----) me: 9.2s (83.5x, -----) ca: 7.8s (71.3x, -----) he:31.1s (283.1x, -----) ca: 4.3s (39.3x, -----) dr: 4.4s (40.2x, -----) ma: 1.3s (11.9x, -----)
sarp valgrind-old:0.11s no: 1.2s (11.2x, 0.8%) me: 9.1s (82.8x, 0.9%) ca: 7.7s (70.4x, 1.3%) he:31.1s (282.9x, 0.1%) ca: 4.3s (39.3x, 0.0%) dr: 4.4s (39.8x, 0.9%) ma: 1.3s (12.0x, -0.8%)
-- tinycc --
tinycc valgrind-new:0.74s no: 7.4s (10.0x, -----) me:37.6s (50.8x, -----) ca:47.0s (63.5x, -----) he:44.9s (60.6x, -----) ca:39.2s (53.0x, -----) dr:39.1s (52.8x, -----) ma:11.7s (15.8x, -----)
tinycc valgrind-old:0.74s no: 7.4s (10.0x, 0.1%) me:37.5s (50.7x, 0.2%) ca:46.9s (63.4x, 0.1%) he:44.8s (60.5x, 0.2%) ca:39.2s (52.9x, 0.0%) dr:39.0s (52.8x, 0.1%) ma:11.7s (15.8x, -0.5%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 151m23.900s
user 149m58.998s
sys 1m19.986s
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-01-13 20:10:05.640506883 -0600
+++ hgtls.stdoutB.out 2015-01-13 20:23:35.652962944 -0600
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-01-13 20:10:06.737522621 -0600
+++ err_disable3.stderr.out 2015-01-13 20:27:51.922524355 -0600
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-01-13 20:10:07.593534901 -0600
+++ err_disable4.stderr.out 2015-01-13 20:27:56.067581731 -0600
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-01-13 20:10:07.351531429 -0600
+++ threadname.stderr.out 2015-01-13 20:34:39.291130354 -0600
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-01-13 20:10:07.049527097 -0600
+++ threadname_xml.stderr.out 2015-01-13 20:34:41.597161906 -0600
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-01-13 19:22:17.925384986 -0600
+++ hgtls.stdoutB.out 2015-01-13 19:35:51.988109729 -0600
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-01-13 19:22:18.761396227 -0600
+++ err_disable3.stderr.out 2015-01-13 19:40:07.899397431 -0600
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-01-13 19:22:19.608407615 -0600
+++ err_disable4.stderr.out 2015-01-13 19:40:12.000449819 -0600
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-01-13 19:22:19.366404361 -0600
+++ threadname.stderr.out 2015-01-13 19:46:53.389137710 -0600
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-01-13 19:22:19.071400395 -0600
+++ threadname_xml.stderr.out 2015-01-13 19:46:55.681172027 -0600
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: <ma...@bu...> - 2015-01-14 04:34:16
|
valgrind revision: 14867
VEX revision: 3063
C compiler: gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
GDB: GNU gdb (GDB) Fedora 7.7.1-21.fc20
Assembler: GNU assembler version 2.23.2
C library: GNU C Library (GNU libc) stable release version 2.18
uname -mrs: Linux 3.17.7-200.fc20.s390x s390x
Vendor version: Fedora 20 (Heisenbug)
Nightly build on lfedora1 ( Fedora release 20 (Heisenbug), s390x )
Started at 2015-01-14 00:00:02 UTC
Ended at 2015-01-14 01:00:51 UTC
Results unchanged from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 670 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
helgrind/tests/locked_vs_unlocked2 (stderr)
helgrind/tests/pth_cond_destroy_busy (stderr)
helgrind/tests/tc22_exit_w_lock (stderr)
=================================================
./valgrind-new/helgrind/tests/locked_vs_unlocked2.stderr.diff
=================================================
--- locked_vs_unlocked2.stderr.exp 2015-01-14 00:30:05.193133218 +0000
+++ locked_vs_unlocked2.stderr.out 2015-01-14 00:49:05.843133218 +0000
@@ -16,13 +16,13 @@
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (locked_vs_unlocked2.c:58)
- Address 0x........ is 0 bytes inside data symbol "mx2a"
+ by 0x........: main (locked_vs_unlocked2.c:59)
+ Address 0x........ is 0 bytes inside data symbol "mx2b"
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (locked_vs_unlocked2.c:59)
- Address 0x........ is 0 bytes inside data symbol "mx2b"
+ by 0x........: main (locked_vs_unlocked2.c:58)
+ Address 0x........ is 0 bytes inside data symbol "mx2a"
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
=================================================
./valgrind-new/helgrind/tests/pth_cond_destroy_busy.stderr.diff
=================================================
--- pth_cond_destroy_busy.stderr.exp 2015-01-14 00:30:05.153133218 +0000
+++ pth_cond_destroy_busy.stderr.out 2015-01-14 00:49:14.963133218 +0000
@@ -47,4 +47,4 @@
First pthread_cond_destroy() call returned EBUSY.
Second pthread_cond_destroy() call returned success.
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc22_exit_w_lock.stderr.diff
=================================================
--- tc22_exit_w_lock.stderr.exp 2015-01-14 00:30:05.143133218 +0000
+++ tc22_exit_w_lock.stderr.out 2015-01-14 00:50:52.313133218 +0000
@@ -13,6 +13,23 @@
---Thread-Announcement------------------------------------------
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+Possible data race during write of size 8 at 0x........ by thread #x
+Locks held: none
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc22_exit_w_lock.c:42)
+
+This conflicts with a previous read of size 8 by thread #x
+Locks held: none
+ ...
+ Address 0x........ is in a rw- anonymous segment
+
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
@@ -23,10 +40,6 @@
Thread #x: Exiting thread still holds 1 lock
...
----Thread-Announcement------------------------------------------
-
-Thread #x is the program's root thread
-
----------------------------------------------------------------
Thread #x: Exiting thread still holds 1 lock
@@ -34,4 +47,4 @@
by 0x........: main (tc22_exit_w_lock.c:48)
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc22_exit_w_lock.stderr.diff-kfail-x86
=================================================
--- tc22_exit_w_lock.stderr.exp-kfail-x86 2015-01-14 00:30:05.153133218 +0000
+++ tc22_exit_w_lock.stderr.out 2015-01-14 00:50:52.313133218 +0000
@@ -3,7 +3,6 @@
Thread #x was created
...
- by 0x........: pthread_create_WRK (hg_intercepts.c:...)
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: main (tc22_exit_w_lock.c:39)
@@ -14,9 +13,25 @@
---Thread-Announcement------------------------------------------
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+Possible data race during write of size 8 at 0x........ by thread #x
+Locks held: none
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc22_exit_w_lock.c:42)
+
+This conflicts with a previous read of size 8 by thread #x
+Locks held: none
+ ...
+ Address 0x........ is in a rw- anonymous segment
+
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
- by 0x........: pthread_create_WRK (hg_intercepts.c:...)
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: main (tc22_exit_w_lock.c:42)
@@ -25,14 +40,11 @@
Thread #x: Exiting thread still holds 1 lock
...
----Thread-Announcement------------------------------------------
-
-Thread #x is the program's root thread
-
----------------------------------------------------------------
Thread #x: Exiting thread still holds 1 lock
...
+ by 0x........: main (tc22_exit_w_lock.c:48)
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/locked_vs_unlocked2.stderr.diff
=================================================
--- locked_vs_unlocked2.stderr.exp 2015-01-14 00:00:17.153133218 +0000
+++ locked_vs_unlocked2.stderr.out 2015-01-14 00:19:46.903133218 +0000
@@ -16,13 +16,13 @@
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (locked_vs_unlocked2.c:58)
- Address 0x........ is 0 bytes inside data symbol "mx2a"
+ by 0x........: main (locked_vs_unlocked2.c:59)
+ Address 0x........ is 0 bytes inside data symbol "mx2b"
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (locked_vs_unlocked2.c:59)
- Address 0x........ is 0 bytes inside data symbol "mx2b"
+ by 0x........: main (locked_vs_unlocked2.c:58)
+ Address 0x........ is 0 bytes inside data symbol "mx2a"
Lock at 0x........ was first observed
at 0x........: pthread_mutex_init (hg_intercepts.c:...)
=================================================
./valgrind-old/helgrind/tests/pth_cond_destroy_busy.stderr.diff
=================================================
--- pth_cond_destroy_busy.stderr.exp 2015-01-14 00:00:17.113133218 +0000
+++ pth_cond_destroy_busy.stderr.out 2015-01-14 00:19:53.883133218 +0000
@@ -47,4 +47,4 @@
First pthread_cond_destroy() call returned EBUSY.
Second pthread_cond_destroy() call returned success.
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 6 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc22_exit_w_lock.stderr.diff
=================================================
--- tc22_exit_w_lock.stderr.exp 2015-01-14 00:00:17.093133218 +0000
+++ tc22_exit_w_lock.stderr.out 2015-01-14 00:21:14.303133218 +0000
@@ -13,6 +13,23 @@
---Thread-Announcement------------------------------------------
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+Possible data race during write of size 8 at 0x........ by thread #x
+Locks held: none
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc22_exit_w_lock.c:42)
+
+This conflicts with a previous read of size 8 by thread #x
+Locks held: none
+ ...
+ Address 0x........ is in a rw- anonymous segment
+
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
by 0x........: pthread_create@* (hg_intercepts.c:...)
@@ -23,10 +40,6 @@
Thread #x: Exiting thread still holds 1 lock
...
----Thread-Announcement------------------------------------------
-
-Thread #x is the program's root thread
-
----------------------------------------------------------------
Thread #x: Exiting thread still holds 1 lock
@@ -34,4 +47,4 @@
by 0x........: main (tc22_exit_w_lock.c:48)
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc22_exit_w_lock.stderr.diff-kfail-x86
=================================================
--- tc22_exit_w_lock.stderr.exp-kfail-x86 2015-01-14 00:00:17.113133218 +0000
+++ tc22_exit_w_lock.stderr.out 2015-01-14 00:21:14.303133218 +0000
@@ -3,7 +3,6 @@
Thread #x was created
...
- by 0x........: pthread_create_WRK (hg_intercepts.c:...)
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: main (tc22_exit_w_lock.c:39)
@@ -14,9 +13,25 @@
---Thread-Announcement------------------------------------------
+Thread #x is the program's root thread
+
+----------------------------------------------------------------
+
+Possible data race during write of size 8 at 0x........ by thread #x
+Locks held: none
+ ...
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc22_exit_w_lock.c:42)
+
+This conflicts with a previous read of size 8 by thread #x
+Locks held: none
+ ...
+ Address 0x........ is in a rw- anonymous segment
+
+---Thread-Announcement------------------------------------------
+
Thread #x was created
...
- by 0x........: pthread_create_WRK (hg_intercepts.c:...)
by 0x........: pthread_create@* (hg_intercepts.c:...)
by 0x........: main (tc22_exit_w_lock.c:42)
@@ -25,14 +40,11 @@
Thread #x: Exiting thread still holds 1 lock
...
----Thread-Announcement------------------------------------------
-
-Thread #x is the program's root thread
-
----------------------------------------------------------------
Thread #x: Exiting thread still holds 1 lock
...
+ by 0x........: main (tc22_exit_w_lock.c:48)
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 0 from 0)
|
|
From: Tom H. <to...@co...> - 2015-01-14 04:15:17
|
valgrind revision: 14867 VEX revision: 3063 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) GDB: GNU gdb (GDB) Fedora (7.3.1-48.fc15) Assembler: GNU assembler version 2.21.51.0.6-6.fc15 20110118 C library: GNU C Library stable release version 2.14.1 uname -mrs: Linux 3.17.7-300.fc21.x86_64 x86_64 Vendor version: Nightly build on bristol ( x86_64, Fedora 15 ) Started at 2015-01-14 03:02:55 GMT Ended at 2015-01-14 04:15:03 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 698 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.10s no: 1.6s (16.5x, -----) me: 3.3s (33.4x, -----) ca:14.4s (144.2x, -----) he: 2.0s (20.5x, -----) ca: 3.8s (38.4x, -----) dr: 2.0s (20.0x, -----) ma: 1.9s (19.5x, -----) bigcode1 valgrind-old:0.10s no: 1.6s (16.5x, 0.0%) me: 3.3s (33.4x, 0.0%) ca:14.3s (143.5x, 0.5%) he: 2.0s (20.5x, 0.0%) ca: 3.9s (38.6x, -0.5%) dr: 2.0s (19.8x, 1.0%) ma: 1.9s (19.5x, 0.0%) -- bigcode2 -- bigcode2 valgrind-new:0.10s no: 4.0s (40.2x, -----) me: 8.5s (85.2x, -----) ca:25.9s (258.6x, -----) he: 5.0s (50.2x, -----) ca: 7.2s (72.5x, -----) dr: 4.7s (47.2x, -----) ma: 4.6s (46.1x, -----) bigcode2 valgrind-old:0.10s no: 4.0s (39.8x, 1.0%) me: 8.5s (84.9x, 0.4%) ca:25.6s (256.3x, 0.9%) he: 5.0s (50.1x, 0.2%) ca: 7.3s (73.1x, -0.8%) dr: 4.7s (46.7x, 1.1%) ma: 4.5s (45.5x, 1.3%) -- bz2 -- bz2 valgrind-new:0.52s no: 1.6s ( 3.1x, -----) me: 5.7s (11.0x, -----) ca:13.2s (25.4x, -----) he: 8.4s (16.1x, -----) ca:10.9s (21.0x, -----) dr:10.4s (20.1x, -----) ma: 1.6s ( 3.1x, -----) bz2 valgrind-old:0.52s no: 1.6s ( 3.1x, 0.6%) me: 5.7s (11.0x, -0.4%) ca:13.2s (25.4x, 0.0%) he: 8.3s (16.0x, 1.1%) ca:10.9s (21.1x, -0.3%) dr:10.4s (19.9x, 0.7%) ma: 1.6s ( 3.1x, -0.0%) -- fbench -- fbench valgrind-new:0.22s no: 1.0s ( 4.5x, -----) me: 3.8s (17.1x, -----) ca: 5.6s (25.4x, -----) he: 2.9s (13.1x, -----) ca: 3.1s (14.1x, -----) dr: 2.6s (11.6x, -----) ma: 1.0s ( 4.7x, -----) fbench valgrind-old:0.22s no: 1.0s ( 4.4x, 4.0%) me: 3.6s (16.5x, 3.7%) ca: 5.4s (24.5x, 3.6%) he: 2.8s (12.7x, 3.1%) ca: 3.1s (14.0x, 0.6%) dr: 2.6s (11.6x, 0.0%) ma: 1.0s ( 4.6x, 1.0%) -- ffbench -- ffbench valgrind-new:0.20s no: 0.9s ( 4.5x, -----) me: 2.8s (13.9x, -----) ca: 1.8s ( 9.0x, -----) he: 5.5s (27.2x, -----) ca: 4.1s (20.4x, -----) dr: 3.2s (16.2x, -----) ma: 0.9s ( 4.3x, -----) ffbench valgrind-old:0.20s no: 0.9s ( 4.5x, 0.0%) me: 2.8s (13.9x, -0.4%) ca: 1.8s ( 9.0x, 0.6%) he: 5.3s (26.7x, 2.0%) ca: 4.1s (20.4x, 0.0%) dr: 3.2s (16.0x, 1.2%) ma: 0.8s ( 4.2x, 1.2%) -- heap -- heap valgrind-new:0.07s no: 0.6s ( 8.1x, -----) me: 4.9s (69.7x, -----) ca: 6.2s (88.3x, -----) he: 6.6s (94.7x, -----) ca: 3.2s (45.4x, -----) dr: 4.2s (59.9x, -----) ma: 4.5s (65.0x, -----) heap valgrind-old:0.07s no: 0.6s ( 8.3x, -1.8%) me: 4.8s (68.9x, 1.2%) ca: 6.1s (87.4x, 1.0%) he: 6.5s (93.3x, 1.5%) ca: 3.2s (46.1x, -1.6%) dr: 4.2s (60.7x, -1.4%) ma: 4.6s (66.0x, -1.5%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.10s no: 0.7s ( 6.7x, -----) me: 8.2s (81.9x, -----) ca: 6.8s (68.3x, -----) he: 7.6s (76.4x, -----) ca: 3.5s (35.2x, -----) dr: 4.9s (48.9x, -----) ma: 4.7s (46.9x, -----) heap_pdb4 valgrind-old:0.10s no: 0.6s ( 6.3x, 6.0%) me: 8.3s (83.0x, -1.3%) ca: 6.7s (66.9x, 2.0%) he: 7.5s (74.9x, 2.0%) ca: 3.5s (35.3x, -0.3%) dr: 4.9s (49.2x, -0.6%) ma: 4.8s (48.0x, -2.3%) -- many-loss-records -- many-loss-records valgrind-new:0.01s no: 0.3s (26.0x, -----) me: 1.4s (143.0x, -----) ca: 1.1s (107.0x, -----) he: 1.2s (122.0x, -----) ca: 0.7s (69.0x, -----) dr: 1.1s (109.0x, -----) ma: 1.0s (99.0x, -----) many-loss-records valgrind-old:0.01s no: 0.3s (26.0x, 0.0%) me: 1.4s (141.0x, 1.4%) ca: 1.1s (106.0x, 0.9%) he: 1.2s (121.0x, 0.8%) ca: 0.7s (70.0x, -1.4%) dr: 1.1s (112.0x, -2.8%) ma: 1.0s (100.0x, -1.0%) -- many-xpts -- many-xpts valgrind-new:0.03s no: 0.3s (10.7x, -----) me: 2.0s (66.0x, -----) ca: 2.8s (91.7x, -----) he: 2.3s (77.3x, -----) ca: 1.0s (32.7x, -----) dr: 1.5s (51.0x, -----) ma: 1.5s (49.0x, -----) many-xpts valgrind-old:0.03s no: 0.3s (10.7x, 0.0%) me: 2.0s (66.0x, 0.0%) ca: 2.7s (90.7x, 1.1%) he: 2.3s (77.0x, 0.4%) ca: 1.0s (32.3x, 1.0%) dr: 1.6s (51.7x, -1.3%) ma: 1.5s (49.0x, 0.0%) -- sarp -- sarp valgrind-new:0.02s no: 0.3s (14.0x, -----) me: 2.6s (128.5x, -----) ca: 1.9s (93.5x, -----) he: 6.6s (329.0x, -----) ca: 1.0s (48.0x, -----) dr: 1.0s (51.0x, -----) ma: 0.3s (15.5x, -----) sarp valgrind-old:0.02s no: 0.3s (14.0x, 0.0%) me: 2.6s (128.5x, 0.0%) ca: 1.8s (91.5x, 2.1%) he: 6.6s (331.0x, -0.6%) ca: 0.9s (47.5x, 1.0%) dr: 1.0s (51.5x, -1.0%) ma: 0.3s (15.0x, 3.2%) -- tinycc -- tinycc valgrind-new:0.17s no: 1.4s ( 8.5x, -----) me: 9.3s (54.8x, -----) ca:11.3s (66.3x, -----) he: 9.9s (58.2x, -----) ca: 8.3s (49.0x, -----) dr: 8.2s (48.4x, -----) ma: 2.5s (14.8x, -----) tinycc valgrind-old:0.17s no: 1.4s ( 8.5x, 0.0%) me: 9.2s (54.2x, 1.2%) ca:11.2s (66.1x, 0.3%) he: 9.9s (58.0x, 0.4%) ca: 8.3s (49.1x, -0.1%) dr: 8.2s (48.5x, -0.1%) ma: 2.5s (14.8x, 0.4%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 34m5.012s user 33m14.194s sys 0m22.241s |
|
From: Tom H. <to...@co...> - 2015-01-14 04:06:16
|
valgrind revision: 14867
VEX revision: 3063
C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
GDB: GNU gdb (GDB) Fedora (7.3.50.20110722-16.fc16)
Assembler: GNU assembler version 2.21.53.0.1-6.fc16 20110716
C library: GNU C Library development release version 2.14.90
uname -mrs: Linux 3.17.7-300.fc21.x86_64 x86_64
Vendor version:
Nightly build on bristol ( x86_64, Fedora 16 )
Started at 2015-01-14 02:51:57 GMT
Ended at 2015-01-14 04:06:02 GMT
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... done
Regression test results follow
== 698 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 698 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
none/tests/fdleak_ipv4 (stdout)
none/tests/fdleak_ipv4 (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short 2015-01-14 03:11:51.221864199 +0000
--- new.short 2015-01-14 03:31:45.624895302 +0000
***************
*** 4,6 ****
Building valgrind ... done
! Running regression tests ... failed
--- 4,6 ----
Building valgrind ... done
! Running regression tests ... done
***************
*** 8,12 ****
! == 698 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
! none/tests/fdleak_ipv4 (stdout)
! none/tests/fdleak_ipv4 (stderr)
--- 8,10 ----
! == 698 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
--tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old
-- Running tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 valgrind-new:0.11s no: 1.7s (15.1x, -----) me: 3.4s (31.1x, -----) ca:14.2s (128.9x, -----) he: 2.1s (18.9x, -----) ca: 3.9s (35.1x, -----) dr: 2.0s (18.5x, -----) ma: 2.0s (18.0x, -----)
bigcode1 valgrind-old:0.11s no: 1.7s (15.2x, -0.6%) me: 3.4s (31.1x, 0.0%) ca:14.4s (130.5x, -1.3%) he: 2.1s (18.8x, 0.5%) ca: 3.9s (35.3x, -0.5%) dr: 2.1s (18.8x, -2.0%) ma: 2.0s (17.9x, 0.5%)
-- bigcode2 --
bigcode2 valgrind-new:0.11s no: 4.0s (36.5x, -----) me: 8.5s (77.5x, -----) ca:26.6s (241.5x, -----) he: 5.0s (45.8x, -----) ca: 7.3s (66.4x, -----) dr: 4.7s (42.9x, -----) ma: 4.7s (42.3x, -----)
bigcode2 valgrind-old:0.11s no: 4.1s (37.0x, -1.5%) me: 8.6s (77.9x, -0.5%) ca:25.6s (232.8x, 3.6%) he: 5.0s (45.9x, -0.2%) ca: 7.3s (66.5x, -0.3%) dr: 4.8s (43.5x, -1.5%) ma: 4.6s (41.9x, 0.9%)
-- bz2 --
bz2 valgrind-new:0.53s no: 1.6s ( 3.0x, -----) me: 5.8s (10.9x, -----) ca:13.2s (25.0x, -----) he: 8.4s (15.8x, -----) ca:10.9s (20.7x, -----) dr:10.5s (19.9x, -----) ma: 1.6s ( 3.0x, -----)
bz2 valgrind-old:0.53s no: 1.6s ( 3.1x, -0.6%) me: 5.8s (10.9x, 0.0%) ca:13.2s (25.0x, 0.1%) he: 8.4s (15.8x, 0.2%) ca:11.0s (20.7x, -0.4%) dr:10.6s (20.1x, -0.9%) ma: 1.6s ( 3.0x, 0.6%)
-- fbench --
fbench valgrind-new:0.22s no: 1.0s ( 4.6x, -----) me: 3.8s (17.1x, -----) ca: 5.6s (25.5x, -----) he: 2.9s (13.0x, -----) ca: 3.1s (14.3x, -----) dr: 2.7s (12.1x, -----) ma: 1.1s ( 4.8x, -----)
fbench valgrind-old:0.22s no: 1.0s ( 4.6x, -1.0%) me: 3.8s (17.1x, 0.3%) ca: 5.6s (25.5x, -0.2%) he: 2.8s (12.8x, 1.1%) ca: 3.2s (14.5x, -1.0%) dr: 2.7s (12.1x, 0.0%) ma: 1.1s ( 4.8x, -1.0%)
-- ffbench --
ffbench valgrind-new:0.21s no: 0.9s ( 4.5x, -----) me: 2.9s (14.0x, -----) ca: 1.9s ( 8.9x, -----) he: 7.0s (33.3x, -----) ca: 4.3s (20.5x, -----) dr: 3.4s (16.3x, -----) ma: 0.9s ( 4.2x, -----)
ffbench valgrind-old:0.21s no: 0.9s ( 4.5x, 1.1%) me: 2.9s (14.0x, 0.0%) ca: 1.9s ( 9.0x, -0.5%) he: 5.4s (25.6x, 23.1%) ca: 4.2s (20.0x, 2.6%) dr: 3.4s (16.0x, 2.3%) ma: 0.9s ( 4.2x, 0.0%)
-- heap --
heap valgrind-new:0.08s no: 0.6s ( 7.9x, -----) me: 5.0s (63.1x, -----) ca: 6.7s (83.2x, -----) he: 7.0s (87.7x, -----) ca: 3.3s (41.2x, -----) dr: 4.3s (54.4x, -----) ma: 4.5s (56.9x, -----)
heap valgrind-old:0.08s no: 0.6s ( 7.9x, 0.0%) me: 5.1s (63.5x, -0.6%) ca: 6.6s (82.5x, 0.9%) he: 7.0s (87.1x, 0.7%) ca: 3.3s (41.2x, 0.0%) dr: 4.4s (54.5x, -0.2%) ma: 4.7s (58.5x, -2.9%)
-- heap_pdb4 --
heap_pdb4 valgrind-new:0.10s no: 0.7s ( 6.8x, -----) me: 8.6s (85.8x, -----) ca: 7.2s (72.2x, -----) he: 8.1s (81.1x, -----) ca: 3.6s (36.5x, -----) dr: 5.0s (50.3x, -----) ma: 4.8s (47.7x, -----)
heap_pdb4 valgrind-old:0.10s no: 0.7s ( 6.8x, 0.0%) me: 8.5s (84.9x, 1.0%) ca: 7.0s (69.9x, 3.2%) he: 7.9s (79.0x, 2.6%) ca: 3.5s (35.4x, 3.0%) dr: 5.2s (52.2x, -3.8%) ma: 4.8s (48.1x, -0.8%)
-- many-loss-records --
many-loss-records valgrind-new:0.01s no: 0.2s (25.0x, -----) me: 1.4s (140.0x, -----) ca: 1.1s (106.0x, -----) he: 1.2s (120.0x, -----) ca: 0.7s (66.0x, -----) dr: 1.1s (106.0x, -----) ma: 0.9s (94.0x, -----)
many-loss-records valgrind-old:0.01s no: 0.2s (25.0x, 0.0%) me: 1.4s (137.0x, 2.1%) ca: 1.0s (103.0x, 2.8%) he: 1.2s (119.0x, 0.8%) ca: 0.7s (67.0x, -1.5%) dr: 1.1s (107.0x, -0.9%) ma: 0.9s (94.0x, 0.0%)
-- many-xpts --
many-xpts valgrind-new:0.03s no: 0.3s (10.3x, -----) me: 1.9s (63.3x, -----) ca: 2.7s (88.7x, -----) he: 2.2s (72.7x, -----) ca: 1.0s (32.0x, -----) dr: 1.5s (49.7x, -----) ma: 1.4s (46.0x, -----)
many-xpts valgrind-old:0.03s no: 0.3s (10.3x, 0.0%) me: 1.9s (63.0x, 0.5%) ca: 2.7s (88.7x, 0.0%) he: 2.3s (75.3x, -3.7%) ca: 1.0s (32.0x, 0.0%) dr: 1.5s (50.3x, -1.3%) ma: 1.4s (46.0x, -0.0%)
-- sarp --
sarp valgrind-new:0.02s no: 0.3s (14.0x, -----) me: 2.5s (122.5x, -----) ca: 1.7s (85.0x, -----) he: 6.6s (330.5x, -----) ca: 0.9s (45.5x, -----) dr: 1.0s (51.5x, -----) ma: 0.3s (15.0x, -----)
sarp valgrind-old:0.02s no: 0.3s (14.0x, 0.0%) me: 2.5s (122.5x, 0.0%) ca: 1.7s (85.0x, 0.0%) he: 6.7s (332.5x, -0.6%) ca: 0.9s (45.5x, 0.0%) dr: 1.0s (50.0x, 2.9%) ma: 0.3s (14.5x, 3.3%)
-- tinycc --
tinycc valgrind-new:0.15s no: 1.4s ( 9.3x, -----) me: 8.7s (58.1x, -----) ca:10.8s (72.0x, -----) he: 9.3s (62.3x, -----) ca: 7.8s (52.1x, -----) dr: 7.7s (51.6x, -----) ma: 2.4s (15.9x, -----)
tinycc valgrind-old:0.15s no: 1.4s ( 9.2x, 0.7%) me: 8.7s (57.8x, 0.5%) ca:10.7s (71.5x, 0.6%) he: 9.2s (61.7x, 1.0%) ca: 7.8s (52.1x, 0.0%) dr: 7.8s (51.9x, -0.6%) ma: 2.4s (16.0x, -0.4%)
-- Finished tests in perf ----------------------------------------------
== 11 programs, 154 timings =================
real 34m16.854s
user 33m26.480s
sys 0m23.128s
|
|
From: Rich C. <rc...@wi...> - 2015-01-14 04:02:11
|
valgrind revision: 14867
VEX revision: 3063
C compiler: gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
GDB: GNU gdb (GDB; openSUSE 13.2) 7.8
Assembler: GNU assembler (GNU Binutils; openSUSE 13.2) 2.24.0.20140403-6.1
C library: GNU C Library (GNU libc) stable release version 2.19 (git 9a869d822025)
uname -mrs: Linux 3.16.6-2-desktop x86_64
Vendor version: openSUSE 13.2 (Harlequin)
Nightly build on ultra ( gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064] Linux 3.16.6-2-desktop x86_64 )
Started at 2015-01-13 21:30:01 CST
Ended at 2015-01-13 22:02:00 CST
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 615 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
helgrind/tests/hg05_race2 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 615 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
memcheck/tests/err_disable3 (stderr)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/threadname (stderr)
memcheck/tests/threadname_xml (stderr)
helgrind/tests/hg05_race2 (stderr)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Tue Jan 13 21:46:46 2015
--- new.short Tue Jan 13 22:02:00 2015
***************
*** 8,10 ****
! == 615 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
--- 8,10 ----
! == 615 tests, 6 stderr failures, 0 stdout failures, 0 stderrB failures, 1 stdoutB failure, 0 post failures ==
gdbserver_tests/hgtls (stdoutB)
***************
*** 15,16 ****
--- 15,17 ----
helgrind/tests/hg05_race2 (stderr)
+ helgrind/tests/tc09_bad_unlock (stderr)
=================================================
./valgrind-new/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-01-13 21:46:51.611652083 -0600
+++ hgtls.stdoutB.out 2015-01-13 21:49:58.214424730 -0600
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-new/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-01-13 21:46:58.618455625 -0600
+++ hg05_race2.stderr.out 2015-01-13 21:56:32.634480637 -0600
@@ -26,8 +26,7 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2015-01-13 21:46:58.641454980 -0600
+++ tc09_bad_unlock.stderr.out 2015-01-13 21:56:59.934722888 -0600
@@ -37,7 +37,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:31)
by 0x........: main (tc09_bad_unlock.c:49)
Address 0x........ is on thread #x's stack
- in frame #x, created by nearly_main (tc09_bad_unlock.c:16)
----------------------------------------------------------------
=================================================
./valgrind-new/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-01-13 21:46:52.577624999 -0600
+++ err_disable3.stderr.out 2015-01-13 21:51:49.059349756 -0600
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-new/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-01-13 21:46:53.237606494 -0600
+++ err_disable4.stderr.out 2015-01-13 21:51:50.355313801 -0600
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-new/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-01-13 21:46:52.979613728 -0600
+++ threadname.stderr.out 2015-01-13 21:53:50.098991359 -0600
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-new/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-01-13 21:46:52.809618494 -0600
+++ threadname_xml.stderr.out 2015-01-13 21:53:50.744973434 -0600
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/hgtls.stdoutB.diff
=================================================
--- hgtls.stdoutB.exp 2015-01-13 21:30:19.222321596 -0600
+++ hgtls.stdoutB.out 2015-01-13 21:34:41.000119019 -0600
@@ -35,11 +35,11 @@
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
-test so_extern tls_ip 0x........ ip 0x........ equal 1
+test so_extern tls_ip 0x........ ip 0x........ equal 0
[New Thread ....]
Breakpoint 1, tls_ptr (p=0x........) at tls.c:55
55 int here = 0;
=================================================
./valgrind-old/helgrind/tests/hg05_race2.stderr.diff
=================================================
--- hg05_race2.stderr.exp 2015-01-13 21:30:53.392381764 -0600
+++ hg05_race2.stderr.out 2015-01-13 21:41:17.324026547 -0600
@@ -26,8 +26,7 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack
----------------------------------------------------------------
@@ -42,8 +41,7 @@
at 0x........: th (hg05_race2.c:17)
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
- Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
- declared at hg05_race2.c:24, in frame #x of thread x
+ Address 0x........ is on thread #x's stack
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/err_disable3.stderr.diff
=================================================
--- err_disable3.stderr.exp 2015-01-13 21:30:20.289292251 -0600
+++ err_disable3.stderr.out 2015-01-13 21:36:31.497044696 -0600
@@ -10,8 +10,6 @@
Thread 2:
Invalid read of size 1
at 0x........: err (err_disable3.c:25)
- by 0x........: child_fn (err_disable3.c:31)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable3.c:42)
=================================================
./valgrind-old/memcheck/tests/err_disable4.stderr.diff
=================================================
--- err_disable4.stderr.exp 2015-01-13 21:30:21.417261228 -0600
+++ err_disable4.stderr.out 2015-01-13 21:36:32.759009289 -0600
@@ -1501,8 +1501,6 @@
Thread x:
Invalid read of size 1
at 0x........: err (err_disable4.c:41)
- by 0x........: child_fn_2 (err_disable4.c:55)
- ...
Address 0x........ is 5 bytes inside a block of size 10 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (err_disable4.c:68)
=================================================
./valgrind-old/memcheck/tests/threadname.stderr.diff
=================================================
--- threadname.stderr.exp 2015-01-13 21:30:20.868276327 -0600
+++ threadname.stderr.out 2015-01-13 21:38:32.113660790 -0600
@@ -9,36 +9,12 @@
Thread 2:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_0 (threadname.c:61)
- ...
Address 0x........ is 0 bytes after a block of size 2 alloc'd
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: bad_things (threadname.c:15)
by 0x........: child_fn_0 (threadname.c:61)
...
-Thread 3 try1:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
- Address 0x........ is 0 bytes after a block of size 3 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_1 (threadname.c:46)
- ...
-
-Thread 4 012345678901234:
-Invalid write of size 1
- at 0x........: bad_things (threadname.c:16)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
- Address 0x........ is 0 bytes after a block of size 4 alloc'd
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: bad_things (threadname.c:15)
- by 0x........: child_fn_2 (threadname.c:30)
- ...
-
Thread 1:
Invalid write of size 1
at 0x........: bad_things (threadname.c:16)
=================================================
./valgrind-old/memcheck/tests/threadname_xml.stderr.diff
=================================================
--- threadname_xml.stderr.exp 2015-01-13 21:30:20.520285896 -0600
+++ threadname_xml.stderr.out 2015-01-13 21:38:32.753642837 -0600
@@ -94,14 +94,6 @@
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_0</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
@@ -135,112 +127,6 @@
<error>
<unique>0x........</unique>
<tid>...</tid>
- <threadname>try1</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>malloc</fn>
- <dir>...</dir>
- <file>vg_replace_malloc.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_1</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
-</error>
-
-<error>
- <unique>0x........</unique>
- <tid>...</tid>
- <threadname>012345678901234</threadname>
- <kind>InvalidWrite</kind>
- <what>Invalid write of size 1</what>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>bad_things</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>child_fn_2</fn>
- <dir>...</dir>
- <file>threadname.c</file>
- <line>...</line>
- </frame>
- </stack>
- <auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
- <stack>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
<truncated beyond 100 lines>
|
|
From: Tom H. <to...@co...> - 2015-01-14 03:56:11
|
valgrind revision: 14867 VEX revision: 3063 C compiler: gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7) GDB: GNU gdb (GDB) Fedora 7.6.1-46.fc19 Assembler: GNU assembler version 2.23.52.0.1-9.fc19 20130226 C library: GNU C Library (GNU libc) stable release version 2.17 uname -mrs: Linux 3.17.7-300.fc21.x86_64 x86_64 Vendor version: Nightly build on bristol ( x86_64, Fedora 19 (Schrödingerâs Cat) ) Started at 2015-01-14 02:41:29 GMT Ended at 2015-01-14 03:56:00 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 698 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == --tools=none,memcheck,callgrind,helgrind,cachegrind,drd,massif --reps=3 --vg=../valgrind-new --vg=../valgrind-old -- Running tests in perf ---------------------------------------------- -- bigcode1 -- bigcode1 valgrind-new:0.11s no: 1.6s (15.0x, -----) me: 3.4s (30.6x, -----) ca:13.2s (119.5x, -----) he: 2.1s (18.8x, -----) ca: 3.8s (34.4x, -----) dr: 2.0s (18.5x, -----) ma: 1.9s (17.7x, -----) bigcode1 valgrind-old:0.11s no: 1.6s (14.9x, 0.6%) me: 3.5s (31.4x, -2.4%) ca:13.3s (120.5x, -0.8%) he: 2.1s (18.8x, 0.0%) ca: 3.8s (34.6x, -0.8%) dr: 2.0s (18.4x, 1.0%) ma: 1.9s (17.7x, 0.0%) -- bigcode2 -- bigcode2 valgrind-new:0.11s no: 4.0s (36.0x, -----) me: 8.6s (78.1x, -----) ca:25.2s (229.5x, -----) he: 5.0s (45.1x, -----) ca: 7.2s (65.0x, -----) dr: 4.7s (42.4x, -----) ma: 4.5s (41.2x, -----) bigcode2 valgrind-old:0.11s no: 3.9s (35.5x, 1.5%) me: 8.4s (76.2x, 2.4%) ca:26.5s (240.7x, -4.9%) he: 5.0s (45.2x, -0.2%) ca: 7.2s (65.4x, -0.6%) dr: 4.7s (42.6x, -0.6%) ma: 4.6s (41.5x, -0.9%) -- bz2 -- bz2 valgrind-new:0.49s no: 1.6s ( 3.2x, -----) me: 5.7s (11.7x, -----) ca:12.7s (25.9x, -----) he: 8.6s (17.6x, -----) ca:10.4s (21.2x, -----) dr:10.7s (21.9x, -----) ma: 1.6s ( 3.2x, -----) bz2 valgrind-old:0.49s no: 1.6s ( 3.2x, 0.6%) me: 5.7s (11.7x, 0.5%) ca:12.6s (25.8x, 0.3%) he: 8.7s (17.7x, -0.7%) ca:10.4s (21.3x, -0.2%) dr:10.8s (22.0x, -0.5%) ma: 1.6s ( 3.2x, 0.0%) -- fbench -- fbench valgrind-new:0.22s no: 1.0s ( 4.6x, -----) me: 3.5s (15.9x, -----) ca: 5.5s (25.0x, -----) he: 2.9s (13.4x, -----) ca: 3.1s (14.0x, -----) dr: 2.7s (12.2x, -----) ma: 1.1s ( 4.9x, -----) fbench valgrind-old:0.22s no: 1.0s ( 4.6x, 0.0%) me: 3.5s (15.8x, 0.6%) ca: 5.5s (25.0x, 0.4%) he: 2.8s (12.7x, 4.8%) ca: 3.0s (13.9x, 0.7%) dr: 2.7s (12.1x, 0.7%) ma: 1.1s ( 4.8x, 0.9%) -- ffbench -- ffbench valgrind-new:0.22s no: 1.0s ( 4.4x, -----) me: 3.0s (13.5x, -----) ca: 1.9s ( 8.7x, -----) he: 6.3s (28.5x, -----) ca: 4.5s (20.5x, -----) dr: 3.4s (15.4x, -----) ma: 0.9s ( 4.2x, -----) ffbench valgrind-old:0.22s no: 1.0s ( 4.4x, 0.0%) me: 3.0s (13.5x, -0.0%) ca: 1.9s ( 8.6x, 0.5%) he: 5.6s (25.4x, 11.0%) ca: 4.3s (19.7x, 3.8%) dr: 3.4s (15.4x, 0.3%) ma: 0.9s ( 4.1x, 3.2%) -- heap -- heap valgrind-new:0.08s no: 0.6s ( 7.6x, -----) me: 5.5s (68.8x, -----) ca: 6.1s (76.1x, -----) he: 6.7s (84.1x, -----) ca: 3.2s (39.6x, -----) dr: 4.4s (54.6x, -----) ma: 4.7s (58.1x, -----) heap valgrind-old:0.08s no: 0.6s ( 7.6x, 0.0%) me: 5.1s (63.6x, 7.5%) ca: 6.1s (75.9x, 0.3%) he: 6.7s (83.8x, 0.4%) ca: 3.2s (39.5x, 0.3%) dr: 4.4s (54.8x, -0.2%) ma: 4.6s (57.8x, 0.6%) -- heap_pdb4 -- heap_pdb4 valgrind-new:0.10s no: 0.7s ( 6.7x, -----) me: 9.3s (93.1x, -----) ca: 6.7s (66.8x, -----) he: 7.8s (78.2x, -----) ca: 3.5s (35.4x, -----) dr: 5.2s (52.5x, -----) ma: 5.0s (49.6x, -----) heap_pdb4 valgrind-old:0.10s no: 0.7s ( 6.7x, 0.0%) me: 8.9s (89.5x, 3.9%) ca: 6.7s (66.5x, 0.4%) he: 7.8s (78.0x, 0.3%) ca: 3.5s (35.2x, 0.6%) dr: 5.2s (51.9x, 1.1%) ma: 4.9s (49.2x, 0.8%) -- many-loss-records -- many-loss-records valgrind-new:0.01s no: 0.3s (26.0x, -----) me: 1.4s (144.0x, -----) ca: 1.0s (100.0x, -----) he: 1.3s (129.0x, -----) ca: 0.7s (67.0x, -----) dr: 1.1s (114.0x, -----) ma: 1.0s (104.0x, -----) many-loss-records valgrind-old:0.01s no: 0.3s (26.0x, 0.0%) me: 1.4s (144.0x, 0.0%) ca: 1.0s (100.0x, 0.0%) he: 1.3s (128.0x, 0.8%) ca: 0.7s (66.0x, 1.5%) dr: 1.1s (113.0x, 0.9%) ma: 1.0s (104.0x, 0.0%) -- many-xpts -- many-xpts valgrind-new:0.03s no: 0.3s (10.7x, -----) me: 1.7s (55.3x, -----) ca: 2.5s (84.3x, -----) he: 2.2s (74.7x, -----) ca: 0.9s (31.7x, -----) dr: 1.5s (51.3x, -----) ma: 1.6s (52.7x, -----) many-xpts valgrind-old:0.03s no: 0.3s (10.7x, 0.0%) me: 1.6s (54.7x, 1.2%) ca: 2.5s (84.7x, -0.4%) he: 2.2s (73.7x, 1.3%) ca: 0.9s (31.3x, 1.1%) dr: 1.5s (50.7x, 1.3%) ma: 1.6s (51.7x, 1.9%) -- sarp -- sarp valgrind-new:0.02s no: 0.3s (14.5x, -----) me: 2.3s (115.5x, -----) ca: 1.7s (86.5x, -----) he: 6.7s (332.5x, -----) ca: 0.9s (46.5x, -----) dr: 1.1s (54.0x, -----) ma: 0.3s (15.5x, -----) sarp valgrind-old:0.02s no: 0.3s (14.5x, 0.0%) me: 2.3s (115.0x, 0.4%) ca: 1.7s (87.0x, -0.6%) he: 6.6s (332.0x, 0.2%) ca: 0.9s (46.0x, 1.1%) dr: 1.1s (54.0x, 0.0%) ma: 0.3s (15.0x, 3.2%) -- tinycc -- tinycc valgrind-new:0.16s no: 1.4s ( 8.5x, -----) me: 7.8s (49.1x, -----) ca:10.6s (66.4x, -----) he: 9.8s (61.4x, -----) ca: 7.6s (47.6x, -----) dr: 8.1s (50.6x, -----) ma: 2.4s (14.9x, -----) tinycc valgrind-old:0.16s no: 1.4s ( 8.6x, -0.7%) me: 7.8s (49.1x, 0.0%) ca:10.6s (66.4x, 0.1%) he: 9.8s (61.4x, 0.0%) ca: 7.7s (47.9x, -0.7%) dr: 8.1s (50.4x, 0.5%) ma: 2.4s (14.9x, 0.0%) -- Finished tests in perf ---------------------------------------------- == 11 programs, 154 timings ================= real 34m2.410s user 33m4.844s sys 0m24.191s |