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
(3) |
2
(26) |
3
(15) |
4
(19) |
5
(16) |
6
(16) |
7
(13) |
|
8
(1) |
9
(12) |
10
|
11
(4) |
12
(17) |
13
(21) |
14
(15) |
|
15
(12) |
16
(14) |
17
(14) |
18
(12) |
19
(16) |
20
(27) |
21
(37) |
|
22
(25) |
23
(23) |
24
(14) |
25
(14) |
26
(14) |
27
(14) |
28
(11) |
|
29
(3) |
30
(13) |
|
|
|
|
|
|
From: <sv...@va...> - 2012-04-20 23:59:04
|
sewardj 2012-04-21 00:58:55 +0100 (Sat, 21 Apr 2012)
New Revision: 12517
Log:
Merge branches/TCHAIN from r12476 (its creation point) into trunk.
Copied files:
trunk/docs/internals/t-chaining-notes.txt
(from rev 12516, branches/TCHAIN/docs/internals/t-chaining-notes.txt)
Modified directories:
trunk/
Modified files:
trunk/cachegrind/cg-x86-amd64.c
trunk/callgrind/docs/callgrind_annotate-manpage.xml
trunk/callgrind/docs/callgrind_control-manpage.xml
trunk/coregrind/m_coredump/coredump-macho.c
trunk/coregrind/m_dispatch/dispatch-amd64-linux.S
trunk/coregrind/m_dispatch/dispatch-arm-linux.S
trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
trunk/coregrind/m_dispatch/dispatch-s390x-linux.S
trunk/coregrind/m_dispatch/dispatch-x86-linux.S
trunk/coregrind/m_libcproc.c
trunk/coregrind/m_main.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_translate.c
trunk/coregrind/m_transtab.c
trunk/coregrind/m_xarray.c
trunk/coregrind/pub_core_dispatch.h
trunk/coregrind/pub_core_dispatch_asm.h
trunk/coregrind/pub_core_libcproc.h
trunk/coregrind/pub_core_transtab.h
trunk/coregrind/pub_core_transtab_asm.h
trunk/docs/Makefile.am
trunk/docs/xml/design-impl.xml
trunk/drd/drd_load_store.c
trunk/drd/tests/atomic_var.stderr.exp
trunk/drd/tests/circular_buffer.stderr.exp
trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc
trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86
trunk/drd/tests/unit_bitmap.c
trunk/drd/tests/unit_bitmap.stderr.exp
trunk/drd/tests/unit_bitmap.vgtest
trunk/glibc-2.X.supp.in
trunk/helgrind/hg_main.c
trunk/include/pub_tool_xarray.h
trunk/memcheck/mc_main.c
trunk/memcheck/tests/unit_oset.c
trunk/mpi/Makefile.am
trunk/mpi/libmpiwrap.c
trunk/mpi/mpiwrap_type_test.c
Modified: trunk/
Property changed: trunk/mpi/Makefile.am (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/drd/tests/unit_bitmap.vgtest (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/coregrind/pub_core_dispatch_asm.h (+9 -5)
===================================================================
--- trunk/coregrind/pub_core_dispatch_asm.h 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/pub_core_dispatch_asm.h 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -43,16 +43,20 @@
/* And some more of our own. These must not have the same values as
those from libvex_trc_values.h. (viz, 60 or below is safe).
+ (The following comment is no longer relevant, but is retained
+ for historical purposes.)
These values *must* be odd (have bit 0 set) because the dispatchers
(coregrind/m_dispatch/dispatch-*-*.S) use this fact to distinguish
a TRC value from the unchanged baseblock pointer -- which has 0 as
its lowest bit.
*/
-#define VG_TRC_BORING 29 /* no event; just keep going */
-#define VG_TRC_INNER_FASTMISS 37 /* TRC only; means fast-cache miss. */
-#define VG_TRC_INNER_COUNTERZERO 41 /* TRC only; means bb ctr == 0 */
-#define VG_TRC_FAULT_SIGNAL 43 /* TRC only; got sigsegv/sigbus */
-#define VG_TRC_INVARIANT_FAILED 47 /* TRC only; invariant violation */
+#define VG_TRC_BORING 29 /* no event; just keep going */
+#define VG_TRC_INNER_FASTMISS 37 /* TRC only; means fast-cache miss. */
+#define VG_TRC_INNER_COUNTERZERO 41 /* TRC only; means bb ctr == 0 */
+#define VG_TRC_FAULT_SIGNAL 43 /* TRC only; got sigsegv/sigbus */
+#define VG_TRC_INVARIANT_FAILED 47 /* TRC only; invariant violation */
+#define VG_TRC_CHAIN_ME_TO_SLOW_EP 49 /* TRC only; chain to slow EP */
+#define VG_TRC_CHAIN_ME_TO_FAST_EP 51 /* TRC only; chain to fast EP */
#endif // __PUB_CORE_DISPATCH_ASM_H
Modified: trunk/coregrind/m_xarray.c (+14 -0)
===================================================================
--- trunk/coregrind/m_xarray.c 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/m_xarray.c 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -311,6 +311,20 @@
xa->usedsizeE -= n;
}
+void VG_(removeIndexXA)( XArray* xao, Word n )
+{
+ struct _XArray* xa = (struct _XArray*)xao;
+ vg_assert(xa);
+ vg_assert(n >= 0);
+ vg_assert(n < xa->usedsizeE);
+ if (n+1 < xa->usedsizeE) {
+ VG_(memmove)( ((char*)xa->arr) + (n+0) * xa->elemSzB,
+ ((char*)xa->arr) + (n+1) * xa->elemSzB,
+ (xa->usedsizeE - n - 1) * xa->elemSzB );
+ }
+ xa->usedsizeE--;
+}
+
void VG_(getContentsXA_UNSAFE)( XArray* xao,
/*OUT*/void** ctsP,
/*OUT*/Word* usedP )
Modified: trunk/coregrind/m_translate.c (+55 -56)
===================================================================
--- trunk/coregrind/m_translate.c 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/m_translate.c 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -280,6 +280,7 @@
bb->tyenv = deepCopyIRTypeEnv(sb_in->tyenv);
bb->next = deepCopyIRExpr(sb_in->next);
bb->jumpkind = sb_in->jumpkind;
+ bb->offsIP = sb_in->offsIP;
delta = 0;
@@ -905,6 +906,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC64State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
Bool is64 = True;
IRType ty_Word = Ity_I64;
IROp op_CmpNE = Iop_CmpNE64;
@@ -918,6 +920,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC32State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC32State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC32State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC32State,guest_CIA);
Bool is64 = False;
IRType ty_Word = Ity_I32;
IROp op_CmpNE = Iop_CmpNE32;
@@ -969,7 +972,8 @@
mkU(0)
),
Ijk_EmFail,
- is64 ? IRConst_U64(0) : IRConst_U32(0)
+ is64 ? IRConst_U64(0) : IRConst_U32(0),
+ offB_CIA
)
);
@@ -996,6 +1000,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC64State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
Bool is64 = True;
IRType ty_Word = Ity_I64;
IROp op_CmpNE = Iop_CmpNE64;
@@ -1007,6 +1012,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC32State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC32State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC32State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC32State,guest_CIA);
Bool is64 = False;
IRType ty_Word = Ity_I32;
IROp op_CmpNE = Iop_CmpNE32;
@@ -1048,7 +1054,8 @@
mkU(0)
),
Ijk_EmFail,
- is64 ? IRConst_U64(0) : IRConst_U32(0)
+ is64 ? IRConst_U64(0) : IRConst_U32(0),
+ offB_CIA
)
);
@@ -1099,6 +1106,7 @@
# if defined(VGP_ppc64_linux)
Int offB_GPR2 = offsetof(VexGuestPPC64State,guest_GPR2);
Int offB_LR = offsetof(VexGuestPPC64State,guest_LR);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
IRTemp old_R2 = newIRTemp( bb->tyenv, Ity_I64 );
IRTemp old_LR = newIRTemp( bb->tyenv, Ity_I64 );
/* Restore R2 */
@@ -1112,8 +1120,8 @@
blr (hence Ijk_Ret); so we should just mark this jump as Boring,
else one _Call will have resulted in two _Rets. */
bb->jumpkind = Ijk_Boring;
- bb->next = IRExpr_Binop(Iop_And64, IRExpr_RdTmp(old_LR), mkU64(~(3ULL)));
-
+ bb->next = IRExpr_Binop(Iop_And64, IRExpr_RdTmp(old_LR), mkU64(~(3ULL)));
+ bb->offsIP = offB_CIA;
# else
# error Platform is not TOC-afflicted, fortunately
# endif
@@ -1348,7 +1356,7 @@
}
vg_assert(objname);
VG_(printf)(
- "==== SB %d (exec'd %lld) [tid %d] 0x%llx %s %s+0x%llx\n",
+ "==== SB %d (evchecks %lld) [tid %d] 0x%llx %s %s+0x%llx\n",
VG_(get_bbs_translated)(), bbs_done, (Int)tid, addr,
fnname, objname, (ULong)objoff
);
@@ -1461,11 +1469,10 @@
vta.arch_host = vex_arch;
vta.archinfo_host = vex_archinfo;
vta.abiinfo_both = vex_abiinfo;
+ vta.callback_opaque = (void*)&closure;
vta.guest_bytes = (UChar*)ULong_to_Ptr(addr);
vta.guest_bytes_addr = (Addr64)addr;
- vta.callback_opaque = (void*)&closure;
vta.chase_into_ok = chase_into_ok;
- vta.preamble_function = preamble_fn;
vta.guest_extents = &vge;
vta.host_bytes = tmpbuf;
vta.host_bytes_size = N_TMPBUF;
@@ -1486,60 +1493,49 @@
IRSB*,VexGuestLayout*,VexGuestExtents*,
IRType,IRType)
= (IRSB*(*)(void*,IRSB*,VexGuestLayout*,VexGuestExtents*,IRType,IRType))f;
- vta.instrument1 = g;
+ vta.instrument1 = g;
}
/* No need for type kludgery here. */
- vta.instrument2 = need_to_handle_SP_assignment()
- ? vg_SP_update_pass
- : NULL;
- vta.finaltidy = VG_(needs).final_IR_tidy_pass
- ? VG_(tdict).tool_final_IR_tidy_pass
- : NULL;
- vta.needs_self_check = needs_self_check;
- vta.traceflags = verbosity;
+ vta.instrument2 = need_to_handle_SP_assignment()
+ ? vg_SP_update_pass
+ : NULL;
+ vta.finaltidy = VG_(needs).final_IR_tidy_pass
+ ? VG_(tdict).tool_final_IR_tidy_pass
+ : NULL;
+ vta.needs_self_check = needs_self_check;
+ vta.preamble_function = preamble_fn;
+ vta.traceflags = verbosity;
+ vta.addProfInc = VG_(clo_profile_flags) > 0
+ && kind != T_NoRedir;
- /* Set up the dispatch-return info. For archs without a link
- register, vex generates a jump back to the specified dispatch
- address. Else, it just generates a branch-to-LR. */
+ /* Set up the dispatch continuation-point info. If this is a
+ no-redir translation then it cannot be chained, and the chain-me
+ points are set to NULL to indicate that. The indir point must
+ also be NULL, since we can't allow this translation to do an
+ indir transfer -- that would take it back into the main
+ translation cache too.
-# if defined(VGA_x86) || defined(VGA_amd64)
- if (!allow_redirection) {
- /* It's a no-redir translation. Will be run with the
- nonstandard dispatcher VG_(run_a_noredir_translation) and so
- needs a nonstandard return point. */
- vta.dispatch_assisted
- = (void*) &VG_(run_a_noredir_translation__return_point);
- vta.dispatch_unassisted
- = vta.dispatch_assisted;
+ All this is because no-redir translations live outside the main
+ translation cache (in a secondary one) and chaining them would
+ involve more adminstrative complexity that isn't worth the
+ 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
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_slowEP) );
+ vta.disp_cp_chain_me_to_fastEP
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_fastEP) );
+ vta.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;
}
- else
- if (VG_(clo_profile_flags) > 0) {
- /* normal translation; although we're profiling. */
- vta.dispatch_assisted
- = (void*) &VG_(run_innerloop__dispatch_assisted_profiled);
- vta.dispatch_unassisted
- = (void*) &VG_(run_innerloop__dispatch_unassisted_profiled);
- }
- else {
- /* normal translation and we're not profiling (the normal case) */
- vta.dispatch_assisted
- = (void*) &VG_(run_innerloop__dispatch_assisted_unprofiled);
- vta.dispatch_unassisted
- = (void*) &VG_(run_innerloop__dispatch_unassisted_unprofiled);
- }
+ /* This doesn't involve chaining and so is always allowable. */
+ vta.disp_cp_xassisted
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_xassisted) );
-# elif defined(VGA_ppc32) || defined(VGA_ppc64) \
- || defined(VGA_arm) || defined(VGA_s390x)
- /* See comment in libvex.h. This target uses a
- return-to-link-register scheme to get back to the dispatcher, so
- both fields are NULL. */
- vta.dispatch_assisted = NULL;
- vta.dispatch_unassisted = NULL;
-
-# else
-# error "Unknown arch"
-# endif
-
/* Sheesh. Finally, actually _do_ the translation! */
tres = LibVEX_Translate ( &vta );
@@ -1581,8 +1577,11 @@
nraddr,
(Addr)(&tmpbuf[0]),
tmpbuf_used,
- tres.n_sc_extents > 0 );
+ tres.n_sc_extents > 0,
+ tres.offs_profInc,
+ vex_arch );
} else {
+ vg_assert(tres.offs_profInc == -1); /* -1 == unset */
VG_(add_to_unredir_transtab)( &vge,
nraddr,
(Addr)(&tmpbuf[0]),
Property changed: trunk/mpi/mpiwrap_type_test.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/mpi/libmpiwrap.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/memcheck/tests/unit_oset.c (+1 -0)
===================================================================
--- trunk/memcheck/tests/unit_oset.c 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/memcheck/tests/unit_oset.c 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -27,6 +27,7 @@
#define vgPlain_printf printf
#define vgPlain_memset memset
#define vgPlain_memcpy memcpy
+#define vgPlain_memmove memmove
// Crudely replace some functions (in m_xarray.c, but not needed for
// this unit test) by (hopefully) failing asserts.
Property changed: trunk/drd/tests/circular_buffer.stderr.exp (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/coregrind/pub_core_libcproc.h (+4 -0)
===================================================================
--- trunk/coregrind/pub_core_libcproc.h 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/pub_core_libcproc.h 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -84,6 +84,10 @@
extern void VG_(do_atfork_parent) ( ThreadId tid );
extern void VG_(do_atfork_child) ( ThreadId tid );
+// icache invalidation
+extern void VG_(invalidate_icache) ( void *ptr, SizeT nbytes );
+
+
#endif // __PUB_CORE_LIBCPROC_H
/*--------------------------------------------------------------------*/
Modified: trunk/coregrind/m_dispatch/dispatch-arm-linux.S (+125 -203)
===================================================================
--- trunk/coregrind/m_dispatch/dispatch-arm-linux.S 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/m_dispatch/dispatch-arm-linux.S 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -1,3 +1,4 @@
+
/*--------------------------------------------------------------------*/
/*--- The core dispatch loop, for jumping to a code address. ---*/
/*--- dispatch-arm-linux.S ---*/
@@ -39,127 +40,128 @@
/*------------------------------------------------------------*/
/*--- ---*/
-/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
-/*--- run all translations except no-redir ones. ---*/
+/*--- The dispatch loop. VG_(disp_run_translations) is ---*/
+/*--- used to run all translations, ---*/
+/*--- including no-redir ones. ---*/
/*--- ---*/
/*------------------------------------------------------------*/
/*----------------------------------------------------*/
-/*--- Preamble (set everything up) ---*/
+/*--- Entry and preamble (set everything up) ---*/
/*----------------------------------------------------*/
/* signature:
-UWord VG_(run_innerloop) ( void* guest_state, UWord do_profiling );
+void VG_(disp_run_translations)( UWord* two_words,
+ void* guest_state,
+ Addr host_addr );
*/
.text
-.globl VG_(run_innerloop)
-VG_(run_innerloop):
- push {r0, r1, r4, r5, r6, r7, r8, r9, fp, lr}
+.global VG_(disp_run_translations)
+VG_(disp_run_translations):
+ /* r0 holds two_words
+ r1 holds guest_state
+ r2 holds host_addr
+ */
+ /* The number of regs in this list needs to be even, in
+ order to keep the stack 8-aligned. */
+ push {r0, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
/* set FPSCR to vex-required default value */
mov r4, #0
fmxr fpscr, r4
- /* r0 (hence also [sp,#0]) holds guest_state */
- /* r1 holds do_profiling */
- mov r8, r0
- ldr r0, [r8, #OFFSET_arm_R15T]
+ /* Set up the guest state pointer */
+ mov r8, r1
+
+ /* and jump into the code cache. Chained translations in
+ the code cache run, until for whatever reason, they can't
+ continue. When that happens, the translation in question
+ will jump (or call) to one of the continuation points
+ VG_(cp_...) below. */
+ bx r2
+ /* NOTREACHED */
- /* fall into main loop (the right one) */
- cmp r1, #0 /* do_profiling */
- beq VG_(run_innerloop__dispatch_unprofiled)
- b VG_(run_innerloop__dispatch_profiled)
-
-
/*----------------------------------------------------*/
-/*--- NO-PROFILING (standard) dispatcher ---*/
+/*--- Postamble and exit. ---*/
/*----------------------------------------------------*/
-/* Pairing of insns below is my guesstimate of how dual dispatch would
- work on an A8. JRS, 2011-May-28 */
-
-.global VG_(run_innerloop__dispatch_unprofiled)
-VG_(run_innerloop__dispatch_unprofiled):
+postamble:
+ /* At this point, r1 and r2 contain two
+ words to be returned to the caller. r1
+ holds a TRC value, and r2 optionally may
+ hold another word (for CHAIN_ME exits, the
+ address of the place to patch.) */
- /* AT ENTRY: r0 is next guest addr, r8 is possibly
- modified guest state ptr */
+ /* We're leaving. Check that nobody messed with
+ FPSCR in ways we don't expect. */
+ fmrx r4, fpscr
+ bic r4, #0xF8000000 /* mask out NZCV and QC */
+ bic r4, #0x0000009F /* mask out IDC,IXC,UFC,OFC,DZC,IOC */
+ cmp r4, #0
+ beq remove_frame /* we're OK */
+ /* otherwise we have an invariant violation */
+ movw r1, #VG_TRC_INVARIANT_FAILED
+ movw r2, #0
+ /* fall through */
- /* Has the guest state pointer been messed with? If yes, exit. */
- movw r3, #:lower16:VG_(dispatch_ctr)
- tst r8, #1
+remove_frame:
+ /* Restore int regs, including importantly r0 (two_words) */
+ pop {r0, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
+ /* Stash return values */
+ str r1, [r0, #0]
+ str r2, [r0, #4]
+ bx lr
- movt r3, #:upper16:VG_(dispatch_ctr)
-
- bne gsp_changed
-
- /* save the jump address in the guest state */
- str r0, [r8, #OFFSET_arm_R15T]
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- ldr r2, [r3]
-
- subs r2, r2, #1
-
- str r2, [r3]
-
- beq counter_is_zero
-
- /* try a fast lookup in the translation cache */
- // r0 = next guest, r1,r2,r3,r4 scratch
- movw r1, #VG_TT_FAST_MASK // r1 = VG_TT_FAST_MASK
- movw r4, #:lower16:VG_(tt_fast)
-
- and r2, r1, r0, LSR #1 // r2 = entry #
- movt r4, #:upper16:VG_(tt_fast) // r4 = &VG_(tt_fast)
-
- add r1, r4, r2, LSL #3 // r1 = &tt_fast[entry#]
-
- ldrd r4, r5, [r1, #0] // r4 = .guest, r5 = .host
-
- cmp r4, r0
-
- bne fast_lookup_failed
- // r5: next-host r8: live, gsp
- // r4: next-guest
- // r2: entry #
- // LIVE: r5, r8; all others dead
-
- /* Found a match. Jump to .host. */
- blx r5
- b VG_(run_innerloop__dispatch_unprofiled)
-.ltorg
- /*NOTREACHED*/
-
/*----------------------------------------------------*/
-/*--- PROFILING dispatcher (can be much slower) ---*/
+/*--- Continuation points ---*/
/*----------------------------------------------------*/
-.global VG_(run_innerloop__dispatch_profiled)
-VG_(run_innerloop__dispatch_profiled):
+/* ------ Chain me to slow entry point ------ */
+.global VG_(disp_cp_chain_me_to_slowEP)
+VG_(disp_cp_chain_me_to_slowEP):
+ /* We got called. The return address indicates
+ where the patching needs to happen. Collect
+ the return address and, exit back to C land,
+ handing the caller the pair (Chain_me_S, RA) */
+ mov r1, #VG_TRC_CHAIN_ME_TO_SLOW_EP
+ mov r2, lr
+ /* 4 = movw r12, lo16(disp_cp_chain_me_to_slowEP)
+ 4 = movt r12, hi16(disp_cp_chain_me_to_slowEP)
+ 4 = blx r12 */
+ sub r2, r2, #4+4+4
+ b postamble
- /* AT ENTRY: r0 is next guest addr, r8 is possibly
- modified guest state ptr */
+/* ------ Chain me to fast entry point ------ */
+.global VG_(disp_cp_chain_me_to_fastEP)
+VG_(disp_cp_chain_me_to_fastEP):
+ /* We got called. The return address indicates
+ where the patching needs to happen. Collect
+ the return address and, exit back to C land,
+ handing the caller the pair (Chain_me_F, RA) */
+ mov r1, #VG_TRC_CHAIN_ME_TO_FAST_EP
+ mov r2, lr
+ /* 4 = movw r12, lo16(disp_cp_chain_me_to_fastEP)
+ 4 = movt r12, hi16(disp_cp_chain_me_to_fastEP)
+ 4 = blx r12 */
+ sub r2, r2, #4+4+4
+ b postamble
- /* Has the guest state pointer been messed with? If yes, exit. */
- movw r3, #:lower16:VG_(dispatch_ctr)
- tst r8, #1
+/* ------ Indirect but boring jump ------ */
+.global VG_(disp_cp_xindir)
+VG_(disp_cp_xindir):
+ /* Where are we going? */
+ ldr r0, [r8, #OFFSET_arm_R15T]
- movt r3, #:upper16:VG_(dispatch_ctr)
-
- bne gsp_changed
-
- /* save the jump address in the guest state */
- str r0, [r8, #OFFSET_arm_R15T]
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- ldr r2, [r3]
-
- subs r2, r2, #1
-
- str r2, [r3]
-
- beq counter_is_zero
-
+ /* RM ME -- stats only */
+ movw r1, #:lower16:vgPlain_stats__n_xindirs
+ movt r1, #:upper16:vgPlain_stats__n_xindirs
+ ldr r2, [r1, #0]
+ adds r2, r2, #1
+ str r2, [r1, #0]
+ ldr r2, [r1, #4]
+ adc r2, r2, #0
+ str r2, [r1, #4]
+
/* try a fast lookup in the translation cache */
// r0 = next guest, r1,r2,r3,r4 scratch
movw r1, #VG_TT_FAST_MASK // r1 = VG_TT_FAST_MASK
@@ -174,122 +176,42 @@
cmp r4, r0
- bne fast_lookup_failed
- // r5: next-host r8: live, gsp
- // r4: next-guest
- // r2: entry #
- // LIVE: r5, r8; all others dead
-
- /* increment bb profile counter */
- movw r0, #:lower16:VG_(tt_fastN)
- movt r0, #:upper16:VG_(tt_fastN) // r0 = &tt_fastN[0]
- ldr r0, [r0, r2, LSL #2] // r0 = tt_fast[entry #]
- ldr r3, [r0] // *r0 ++
- add r3, r3, #1
- str r3, [r0]
+ // jump to host if lookup succeeded
+ bxeq r5
- /* Found a match. Jump to .host. */
- blx r5
- b VG_(run_innerloop__dispatch_profiled)
- /*NOTREACHED*/
+ /* otherwise the fast lookup failed */
+ /* RM ME -- stats only */
+ movw r1, #:lower16:vgPlain_stats__n_xindir_misses
+ movt r1, #:upper16:vgPlain_stats__n_xindir_misses
+ ldr r2, [r1, #0]
+ adds r2, r2, #1
+ str r2, [r1, #0]
+ ldr r2, [r1, #4]
+ adc r2, r2, #0
+ str r2, [r1, #4]
-/*----------------------------------------------------*/
-/*--- exit points ---*/
-/*----------------------------------------------------*/
+ mov r1, #VG_TRC_INNER_FASTMISS
+ mov r2, #0
+ b postamble
-gsp_changed:
- // r0 = next guest addr (R15T), r8 = modified gsp
- /* Someone messed with the gsp. Have to
- defer to scheduler to resolve this. dispatch ctr
- is not yet decremented, so no need to increment. */
- /* R15T is NOT up to date here. First, need to write
- r0 back to R15T, but without trashing r8 since
- that holds the value we want to return to the scheduler.
- Hence use r1 transiently for the guest state pointer. */
- ldr r1, [sp, #0]
- str r0, [r1, #OFFSET_arm_R15T]
- mov r0, r8 // "return modified gsp"
- b run_innerloop_exit
- /*NOTREACHED*/
+/* ------ Assisted jump ------ */
+.global VG_(disp_cp_xassisted)
+VG_(disp_cp_xassisted):
+ /* r8 contains the TRC */
+ mov r1, r8
+ mov r2, #0
+ b postamble
-counter_is_zero:
- /* R15T is up to date here */
- /* Back out increment of the dispatch ctr */
- ldr r1, =VG_(dispatch_ctr)
- ldr r2, [r1]
- add r2, r2, #1
- str r2, [r1]
- mov r0, #VG_TRC_INNER_COUNTERZERO
- b run_innerloop_exit
- /*NOTREACHED*/
-
-fast_lookup_failed:
- /* R15T is up to date here */
- /* Back out increment of the dispatch ctr */
- ldr r1, =VG_(dispatch_ctr)
- ldr r2, [r1]
- add r2, r2, #1
- str r2, [r1]
- mov r0, #VG_TRC_INNER_FASTMISS
- b run_innerloop_exit
- /*NOTREACHED*/
+/* ------ Event check failed ------ */
+.global VG_(disp_cp_evcheck_fail)
+VG_(disp_cp_evcheck_fail):
+ mov r1, #VG_TRC_INNER_COUNTERZERO
+ mov r2, #0
+ b postamble
-/* All exits from the dispatcher go through here. %r0 holds
- the return value.
-*/
-run_innerloop_exit:
- /* We're leaving. Check that nobody messed with
- FPSCR in ways we don't expect. */
- fmrx r4, fpscr
- bic r4, #0xF8000000 /* mask out NZCV and QC */
- bic r4, #0x0000009F /* mask out IDC,IXC,UFC,OFC,DZC,IOC */
- cmp r4, #0
- bne invariant_violation
- b run_innerloop_exit_REALLY
-invariant_violation:
- mov r0, #VG_TRC_INVARIANT_FAILED
- b run_innerloop_exit_REALLY
+.size VG_(disp_run_translations), .-VG_(disp_run_translations)
-run_innerloop_exit_REALLY:
- add sp, sp, #8
- pop {r4, r5, r6, r7, r8, r9, fp, pc}
-
-.size VG_(run_innerloop), .-VG_(run_innerloop)
-
-
-/*------------------------------------------------------------*/
-/*--- ---*/
-/*--- A special dispatcher, for running no-redir ---*/
-/*--- translations. Just runs the given translation once. ---*/
-/*--- ---*/
-/*------------------------------------------------------------*/
-
-/* signature:
-void VG_(run_a_noredir_translation) ( UWord* argblock );
-*/
-
-/* Run a no-redir translation. argblock points to 4 UWords, 2 to carry args
- and 2 to carry results:
- 0: input: ptr to translation
- 1: input: ptr to guest state
- 2: output: next guest PC
- 3: output: guest state pointer afterwards (== thread return code)
-*/
-.global VG_(run_a_noredir_translation)
-VG_(run_a_noredir_translation):
- push {r0,r1 /* EABI compliance */, r4-r12, lr}
- ldr r8, [r0, #4]
- mov lr, pc
- ldr pc, [r0, #0]
-
- pop {r1}
- str r0, [r1, #8]
- str r8, [r1, #12]
- pop {r1/*EABI compliance*/,r4-r12, pc}
-
-.size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation)
-
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",%progbits
Property changed: trunk/callgrind/docs/callgrind_annotate-manpage.xml (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Copied: trunk/docs/internals/t-chaining-notes.txt (+0 -0)
===================================================================
Property changed: trunk/coregrind/m_coredump/coredump-macho.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/drd/tests/tc23_bogus_condwait.stderr.exp-linux-ppc (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/drd/tests/atomic_var.stderr.exp (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/docs/Makefile.am (+1 -0)
===================================================================
--- trunk/docs/Makefile.am 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/docs/Makefile.am 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -44,6 +44,7 @@
internals/register-uses.txt \
internals/release-HOWTO.txt \
internals/segments-seginfos.txt \
+ internals/t-chaining-notes.txt \
internals/threads-syscalls-signals.txt \
internals/tm-mutexstates.dot \
internals/tm-threadstates.dot \
Modified: trunk/coregrind/pub_core_transtab_asm.h (+3 -2)
===================================================================
--- trunk/coregrind/pub_core_transtab_asm.h 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/pub_core_transtab_asm.h 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -42,8 +42,9 @@
ever be used. So instead the function is '(address >>u
2)[VG_TT_FAST_BITS-1 : 0]' on those targets.
- On ARM we do like ppc32/ppc64, although that will have to be
- revisited when we come to implement Thumb.
+ On ARM we shift by 1, since Thumb insns can be of size 2, hence to
+ minimise collisions and maximise cache utilisation we need to take
+ into account all but the least significant bit.
On s390x the rightmost bit of an instruction address is zero.
For best table utilization shift the address to the right by 1 bit. */
Modified: trunk/coregrind/m_scheduler/scheduler.c (+266 -135)
===================================================================
--- trunk/coregrind/m_scheduler/scheduler.c 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/m_scheduler/scheduler.c 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -55,8 +55,23 @@
the OS handles threading and signalling are abstracted away and
implemented elsewhere. [Some of the functions have worked their
way back for the moment, until we do an OS port in earnest...]
- */
+*/
+/* FIXME tchaining tests:
+ - extensive spinrounds
+ - with sched quantum = 1 -- check that handle_noredir_jump
+ doesn't return with INNER_COUNTERZERO
+ other:
+ - out of date comment w.r.t. bit 0 set in libvex_trc_values.h
+ - can VG_TRC_BORING still happen? if not, rm
+ - memory leaks in m_transtab (InEdgeArr/OutEdgeArr leaking?)
+ - move do_cacheflush out of m_transtab
+ - more economical unchaining when nuking an entire sector
+ - ditto w.r.t. cache flushes
+ - verify case of 2 paths from A to B
+ - check -- is IP_AT_SYSCALL still right?
+*/
+
#include "pub_core_basics.h"
#include "pub_core_debuglog.h"
#include "pub_core_vki.h"
@@ -108,9 +123,6 @@
/* If False, a fault is Valgrind-internal (ie, a bug) */
Bool VG_(in_generated_code) = False;
-/* Counts downwards in VG_(run_innerloop). */
-UInt VG_(dispatch_ctr);
-
/* 64-bit counter for the number of basic blocks done. */
static ULong bbs_done = 0;
@@ -130,6 +142,9 @@
static ULong n_scheduling_events_MINOR = 0;
static ULong n_scheduling_events_MAJOR = 0;
+ULong VG_(stats__n_xindirs) = 0;
+ULong VG_(stats__n_xindir_misses) = 0;
+
/* Sanity checking counts. */
static UInt sanity_fast_count = 0;
static UInt sanity_slow_count = 0;
@@ -137,8 +152,13 @@
void VG_(print_scheduler_stats)(void)
{
VG_(message)(Vg_DebugMsg,
- "scheduler: %'llu jumps (bb entries).\n", bbs_done );
+ "scheduler: %'llu event checks.\n", bbs_done );
VG_(message)(Vg_DebugMsg,
+ "scheduler: %'llu indir transfers, %'llu misses (1 in %llu)\n",
+ VG_(stats__n_xindirs), VG_(stats__n_xindir_misses),
+ VG_(stats__n_xindirs) / (VG_(stats__n_xindir_misses)
+ ? VG_(stats__n_xindir_misses) : 1));
+ VG_(message)(Vg_DebugMsg,
"scheduler: %'llu/%'llu major/minor sched events.\n",
n_scheduling_events_MAJOR, n_scheduling_events_MINOR);
VG_(message)(Vg_DebugMsg,
@@ -700,14 +720,34 @@
vg_assert(sz_spill == LibVEX_N_SPILL_BYTES);
vg_assert(a_vex + 3 * sz_vex == a_spill);
+# if defined(VGA_x86)
+ /* x86 XMM regs must form an array, ie, have no holes in
+ between. */
+ vg_assert(
+ (offsetof(VexGuestX86State,guest_XMM7)
+ - offsetof(VexGuestX86State,guest_XMM0))
+ == (8/*#regs*/-1) * 16/*bytes per reg*/
+ );
+ vg_assert(VG_IS_16_ALIGNED(offsetof(VexGuestX86State,guest_XMM0)));
+ vg_assert(VG_IS_8_ALIGNED(offsetof(VexGuestX86State,guest_FPREG)));
+ vg_assert(8 == offsetof(VexGuestX86State,guest_EAX));
+ vg_assert(VG_IS_4_ALIGNED(offsetof(VexGuestX86State,guest_EAX)));
+ vg_assert(VG_IS_4_ALIGNED(offsetof(VexGuestX86State,guest_EIP)));
+# endif
+
# if defined(VGA_amd64)
- /* x86/amd64 XMM regs must form an array, ie, have no
- holes in between. */
+ /* amd64 XMM regs must form an array, ie, have no holes in
+ between. */
vg_assert(
(offsetof(VexGuestAMD64State,guest_XMM16)
- offsetof(VexGuestAMD64State,guest_XMM0))
== (17/*#regs*/-1) * 16/*bytes per reg*/
);
+ vg_assert(VG_IS_16_ALIGNED(offsetof(VexGuestAMD64State,guest_XMM0)));
+ vg_assert(VG_IS_8_ALIGNED(offsetof(VexGuestAMD64State,guest_FPREG)));
+ vg_assert(16 == offsetof(VexGuestAMD64State,guest_RAX));
+ vg_assert(VG_IS_8_ALIGNED(offsetof(VexGuestAMD64State,guest_RAX)));
+ vg_assert(VG_IS_8_ALIGNED(offsetof(VexGuestAMD64State,guest_RIP)));
# endif
# if defined(VGA_ppc32) || defined(VGA_ppc64)
@@ -724,10 +764,10 @@
# if defined(VGA_arm)
/* arm guest_state VFP regs must be 8 byte aligned for
- loads/stores. */
- vg_assert(VG_IS_8_ALIGNED(& tst->arch.vex.guest_D0));
- vg_assert(VG_IS_8_ALIGNED(& tst->arch.vex_shadow1.guest_D0));
- vg_assert(VG_IS_8_ALIGNED(& tst->arch.vex_shadow2.guest_D0));
+ loads/stores. Let's use 16 just to be on the safe side. */
+ vg_assert(VG_IS_16_ALIGNED(& tst->arch.vex.guest_D0));
+ vg_assert(VG_IS_16_ALIGNED(& tst->arch.vex_shadow1.guest_D0));
+ vg_assert(VG_IS_16_ALIGNED(& tst->arch.vex_shadow2.guest_D0));
/* be extra paranoid .. */
vg_assert(VG_IS_8_ALIGNED(& tst->arch.vex.guest_D1));
vg_assert(VG_IS_8_ALIGNED(& tst->arch.vex_shadow1.guest_D1));
@@ -755,30 +795,86 @@
}
/* Run the thread tid for a while, and return a VG_TRC_* value
- indicating why VG_(run_innerloop) stopped. */
-static UInt run_thread_for_a_while ( ThreadId tid )
+ indicating why VG_(disp_run_translations) stopped, and possibly an
+ auxiliary word. Also, only allow the thread to run for at most
+ *dispatchCtrP events. If (as is the normal case) use_alt_host_addr
+ is False, we are running ordinary redir'd translations, and we
+ should therefore start by looking up the guest next IP in TT. If
+ it is True then we ignore the guest next IP and just run from
+ alt_host_addr, which presumably points at host code for a no-redir
+ translation.
+
+ Return results are placed in two_words. two_words[0] is set to the
+ TRC. In the case where that is VG_TRC_CHAIN_ME_TO_{SLOW,FAST}_EP,
+ the address to patch is placed in two_words[1].
+*/
+static
+void run_thread_for_a_while ( /*OUT*/HWord* two_words,
+ /*MOD*/Int* dispatchCtrP,
+ ThreadId tid,
+ HWord alt_host_addr,
+ Bool use_alt_host_addr )
{
- volatile UWord jumped;
- volatile ThreadState* tst = NULL; /* stop gcc complaining */
- volatile UInt trc;
- volatile Int dispatch_ctr_SAVED;
- volatile Int done_this_time;
+ volatile HWord jumped = 0;
+ volatile ThreadState* tst = NULL; /* stop gcc complaining */
+ volatile Int done_this_time = 0;
+ volatile HWord host_code_addr = 0;
/* Paranoia */
vg_assert(VG_(is_valid_tid)(tid));
vg_assert(VG_(is_running_thread)(tid));
vg_assert(!VG_(is_exiting)(tid));
+ vg_assert(*dispatchCtrP > 0);
tst = VG_(get_ThreadState)(tid);
do_pre_run_checks( (ThreadState*)tst );
/* end Paranoia */
- trc = 0;
- dispatch_ctr_SAVED = VG_(dispatch_ctr);
+ /* Clear return area. */
+ two_words[0] = two_words[1] = 0;
+ /* Figure out where we're starting from. */
+ if (use_alt_host_addr) {
+ /* unusual case -- no-redir translation */
+ host_code_addr = alt_host_addr;
+ } else {
+ /* normal case -- redir translation */
+ UInt cno = (UInt)VG_TT_FAST_HASH((Addr)tst->arch.vex.VG_INSTR_PTR);
+ if (LIKELY(VG_(tt_fast)[cno].guest == (Addr)tst->arch.vex.VG_INSTR_PTR))
+ host_code_addr = VG_(tt_fast)[cno].host;
+ else {
+ AddrH res = 0;
+ /* not found in VG_(tt_fast). Searching here the transtab
+ improves the performance compared to returning directly
+ to the scheduler. */
+ Bool found = VG_(search_transtab)(&res, NULL, NULL,
+ (Addr)tst->arch.vex.VG_INSTR_PTR,
+ True/*upd cache*/
+ );
+ if (LIKELY(found)) {
+ host_code_addr = res;
+ } else {
+ /* At this point, we know that we intended to start at a
+ normal redir translation, but it was not found. In
+ which case we can return now claiming it's not
+ findable. */
+ two_words[0] = VG_TRC_INNER_FASTMISS; /* hmm, is that right? */
+ return;
+ }
+ }
+ }
+ /* We have either a no-redir or a redir translation. */
+ vg_assert(host_code_addr != 0); /* implausible */
+
+
/* there should be no undealt-with signals */
//vg_assert(VG_(threads)[tid].siginfo.si_signo == 0);
+ /* Set up event counter stuff for the run. */
+ tst->arch.vex.host_EvC_COUNTER = *dispatchCtrP;
+ tst->arch.vex.host_EvC_FAILADDR
+ = (HWord)VG_(fnptr_to_fnentry)( &VG_(disp_cp_evcheck_fail) );
+
if (0) {
vki_sigset_t m;
Int i, err = VG_(sigprocmask)(VKI_SIG_SETMASK, NULL, &m);
@@ -790,6 +886,8 @@
VG_(printf)("\n");
}
+ /* Set up return-value area. */
+
// Tell the tool this thread is about to run client code
VG_TRACK( start_client_code, tid, bbs_done );
@@ -799,26 +897,37 @@
SCHEDSETJMP(
tid,
jumped,
- trc = (UInt)VG_(run_innerloop)( (void*)&tst->arch.vex,
- VG_(clo_profile_flags) > 0 ? 1 : 0 )
+ VG_(disp_run_translations)(
+ two_words,
+ (void*)&tst->arch.vex,
+ host_code_addr
+ )
);
vg_assert(VG_(in_generated_code) == True);
VG_(in_generated_code) = False;
- if (jumped != (UWord)0) {
+ if (jumped != (HWord)0) {
/* We get here if the client took a fault that caused our signal
handler to longjmp. */
- vg_assert(trc == 0);
- trc = VG_TRC_FAULT_SIGNAL;
+ vg_assert(two_words[0] == 0 && two_words[1] == 0); // correct?
+ two_words[0] = VG_TRC_FAULT_SIGNAL;
+ two_words[1] = 0;
block_signals();
}
- done_this_time = (Int)dispatch_ctr_SAVED - (Int)VG_(dispatch_ctr) - 0;
+ vg_assert((Int)tst->arch.vex.host_EvC_COUNTER >= -1);
+ vg_assert(tst->arch.vex.host_EvC_FAILADDR
+ == (HWord)VG_(fnptr_to_fnentry)( &VG_(disp_cp_evcheck_fail)) );
+ done_this_time = *dispatchCtrP - ((Int)tst->arch.vex.host_EvC_COUNTER + 1);
+
vg_assert(done_this_time >= 0);
bbs_done += (ULong)done_this_time;
+ *dispatchCtrP -= done_this_time;
+ vg_assert(*dispatchCtrP >= 0);
+
// Tell the tool this thread has stopped running client code
VG_TRACK( stop_client_code, tid, bbs_done );
@@ -832,89 +941,16 @@
VG_(gdbserver) (tid);
}
- return trc;
-}
-
-
-/* Run a no-redir translation just once, and return the resulting
- VG_TRC_* value. */
-static UInt run_noredir_translation ( Addr hcode, ThreadId tid )
-{
- volatile UWord jumped;
- volatile ThreadState* tst;
- volatile UWord argblock[4];
- volatile UInt retval;
-
- /* Paranoia */
- vg_assert(VG_(is_valid_tid)(tid));
- vg_assert(VG_(is_running_thread)(tid));
- vg_assert(!VG_(is_exiting)(tid));
-
- tst = VG_(get_ThreadState)(tid);
- do_pre_run_checks( (ThreadState*)tst );
- /* end Paranoia */
-
-# if defined(VGA_ppc32) || defined(VGA_ppc64)
- /* I don't think we need to clear this thread's guest_RESVN here,
- because we can only get here if run_thread_for_a_while() has
- been used immediately before, on this same thread. */
-# endif
-
- /* There can be 3 outcomes from VG_(run_a_noredir_translation):
-
- - a signal occurred and the sighandler longjmp'd. Then both [2]
- and [3] are unchanged - hence zero.
-
- - translation ran normally, set [2] (next guest IP) and set [3]
- to whatever [1] was beforehand, indicating a normal (boring)
- jump to the next block.
-
- - translation ran normally, set [2] (next guest IP) and set [3]
- to something different from [1] beforehand, which indicates a
- TRC_ value.
- */
- argblock[0] = (UWord)hcode;
- argblock[1] = (UWord)&VG_(threads)[tid].arch.vex;
- argblock[2] = 0; /* next guest IP is written here */
- argblock[3] = 0; /* guest state ptr afterwards is written here */
-
- // Tell the tool this thread is about to run client code
- VG_TRACK( start_client_code, tid, bbs_done );
-
- vg_assert(VG_(in_generated_code) == False);
- VG_(in_generated_code) = True;
-
- SCHEDSETJMP(
- tid,
- jumped,
- VG_(run_a_noredir_translation)( &argblock[0] )
- );
-
- VG_(in_generated_code) = False;
-
- if (jumped != (UWord)0) {
- /* We get here if the client took a fault that caused our signal
- handler to longjmp. */
- vg_assert(argblock[2] == 0); /* next guest IP was not written */
- vg_assert(argblock[3] == 0); /* trc was not written */
- block_signals();
- retval = VG_TRC_FAULT_SIGNAL;
+ /* TRC value and possible auxiliary patch-address word are already
+ in two_words[0] and [1] respectively, as a result of the call to
+ VG_(run_innerloop). */
+ /* Stay sane .. */
+ if (two_words[0] == VG_TRC_CHAIN_ME_TO_SLOW_EP
+ || two_words[0] == VG_TRC_CHAIN_ME_TO_FAST_EP) {
+ vg_assert(two_words[1] != 0); /* we have a legit patch addr */
} else {
- /* store away the guest program counter */
- VG_(set_IP)( tid, argblock[2] );
- if (argblock[3] == argblock[1])
- /* the guest state pointer afterwards was unchanged */
- retval = VG_TRC_BORING;
- else
- retval = (UInt)argblock[3];
+ vg_assert(two_words[1] == 0); /* nobody messed with it */
}
-
- bbs_done++;
-
- // Tell the tool this thread has stopped running client code
- VG_TRACK( stop_client_code, tid, bbs_done );
-
- return retval;
}
@@ -929,13 +965,15 @@
/* Trivial event. Miss in the fast-cache. Do a full
lookup for it. */
- found = VG_(search_transtab)( NULL, ip, True/*upd_fast_cache*/ );
+ found = VG_(search_transtab)( NULL, NULL, NULL,
+ ip, True/*upd_fast_cache*/ );
if (UNLIKELY(!found)) {
/* Not found; we need to request a translation. */
if (VG_(translate)( tid, ip, /*debug*/False, 0/*not verbose*/,
bbs_done, True/*allow redirection*/ )) {
- found = VG_(search_transtab)( NULL, ip, True );
- vg_assert2(found, "VG_TRC_INNER_FASTMISS: missing tt_fast entry");
+ found = VG_(search_transtab)( NULL, NULL, NULL,
+ ip, True );
+ vg_assert2(found, "handle_tt_miss: missing tt_fast entry");
} else {
// If VG_(translate)() fails, it's because it had to throw a
@@ -947,6 +985,43 @@
}
}
+static
+void handle_chain_me ( ThreadId tid, void* place_to_chain, Bool toFastEP )
+{
+ Bool found = False;
+ Addr ip = VG_(get_IP)(tid);
+ UInt to_sNo = (UInt)-1;
+ UInt to_tteNo = (UInt)-1;
+
+ found = VG_(search_transtab)( NULL, &to_sNo, &to_tteNo,
+ ip, False/*dont_upd_fast_cache*/ );
+ if (!found) {
+ /* Not found; we need to request a translation. */
+ if (VG_(translate)( tid, ip, /*debug*/False, 0/*not verbose*/,
+ bbs_done, True/*allow redirection*/ )) {
+ found = VG_(search_transtab)( NULL, &to_sNo, &to_tteNo,
+ ip, False );
+ vg_assert2(found, "handle_chain_me: missing tt_fast entry");
+ } else {
+ // If VG_(translate)() fails, it's because it had to throw a
+ // signal because the client jumped to a bad address. That
+ // means that either a signal has been set up for delivery,
+ // or the thread has been marked for termination. Either
+ // way, we just need to go back into the scheduler loop.
+ return;
+ }
+ }
+ vg_assert(found);
+ vg_assert(to_sNo != -1);
+ vg_assert(to_tteNo != -1);
+
+ /* So, finally we know where to patch through to. Do the patching
+ and update the various admin tables that allow it to be undone
+ in the case that the destination block gets deleted. */
+ VG_(tt_tc_do_chaining)( place_to_chain,
+ to_sNo, to_tteNo, toFastEP );
+}
+
static void handle_syscall(ThreadId tid, UInt trc)
{
ThreadState * volatile tst = VG_(get_ThreadState)(tid);
@@ -978,9 +1053,15 @@
/* tid just requested a jump to the noredir version of its current
program counter. So make up that translation if needed, run it,
- and return the resulting thread return code. */
-static UInt/*trc*/ handle_noredir_jump ( ThreadId tid )
+ and return the resulting thread return code in two_words[]. */
+static
+void handle_noredir_jump ( /*OUT*/HWord* two_words,
+ /*MOD*/Int* dispatchCtrP,
+ ThreadId tid )
{
+ /* Clear return area. */
+ two_words[0] = two_words[1] = 0;
+
AddrH hcode = 0;
Addr ip = VG_(get_IP)(tid);
@@ -992,14 +1073,14 @@
found = VG_(search_unredir_transtab)( &hcode, ip );
vg_assert2(found, "unredir translation missing after creation?!");
-
} else {
// If VG_(translate)() fails, it's because it had to throw a
// signal because the client jumped to a bad address. That
// means that either a signal has been set up for delivery,
// or the thread has been marked for termination. Either
// way, we just need to go back into the scheduler loop.
- return VG_TRC_BORING;
+ two_words[0] = VG_TRC_BORING;
+ return;
}
}
@@ -1007,8 +1088,10 @@
vg_assert(found);
vg_assert(hcode != 0);
- /* Otherwise run it and return the resulting VG_TRC_* value. */
- return run_noredir_translation( hcode, tid );
+ /* Otherwise run it and return the resulting VG_TRC_* value. */
+ vg_assert(*dispatchCtrP > 0); /* so as to guarantee progress */
+ run_thread_for_a_while( two_words, dispatchCtrP, tid,
+ hcode, True/*use hcode*/ );
}
@@ -1020,7 +1103,9 @@
*/
VgSchedReturnCode VG_(scheduler) ( ThreadId tid )
{
- UInt trc;
+ /* Holds the remaining size of this thread's "timeslice". */
+ Int dispatch_ctr = 0;
+
ThreadState *tst = VG_(get_ThreadState)(tid);
static Bool vgdb_startup_action_done = False;
@@ -1079,11 +1164,12 @@
vg_assert(VG_(is_running_thread)(tid));
- VG_(dispatch_ctr) = SCHEDULING_QUANTUM + 1;
+ dispatch_ctr = SCHEDULING_QUANTUM;
while (!VG_(is_exiting)(tid)) {
- if (VG_(dispatch_ctr) == 1) {
+ vg_assert(dispatch_ctr >= 0);
+ if (dispatch_ctr == 0) {
/* Our slice is done, so yield the CPU to another thread. On
Linux, this doesn't sleep between sleeping and running,
@@ -1130,7 +1216,8 @@
exceed zero before entering the innerloop. Also also, the
decrement is done before the bb is actually run, so you
always get at least one decrement even if nothing happens. */
- VG_(dispatch_ctr) = SCHEDULING_QUANTUM + 1;
+ // FIXME is this right?
+ dispatch_ctr = SCHEDULING_QUANTUM;
/* paranoia ... */
vg_assert(tst->tid == tid);
@@ -1142,17 +1229,20 @@
if (0)
VG_(message)(Vg_DebugMsg, "thread %d: running for %d bbs\n",
- tid, VG_(dispatch_ctr) - 1 );
+ tid, dispatch_ctr - 1 );
- trc = run_thread_for_a_while ( tid );
+ HWord trc[2]; /* "two_words" */
+ run_thread_for_a_while( &trc[0],
+ &dispatch_ctr,
+ tid, 0/*ignored*/, False );
if (VG_(clo_trace_sched) && VG_(clo_verbosity) > 2) {
- Char buf[50];
- VG_(sprintf)(buf, "TRC: %s", name_of_sched_event(trc));
+ HChar buf[50];
+ VG_(sprintf)(buf, "TRC: %s", name_of_sched_event(trc[0]));
print_sched_event(tid, buf);
}
- if (trc == VEX_TRC_JMP_NOREDIR) {
+ if (trc[0] == VEX_TRC_JMP_NOREDIR) {
/* If we got a request to run a no-redir version of
something, do so now -- handle_noredir_jump just (creates
and) runs that one translation. The flip side is that the
@@ -1160,20 +1250,61 @@
request -- that would be nonsensical. It can, however,
return VG_TRC_BORING, which just means keep going as
normal. */
- trc = handle_noredir_jump(tid);
- vg_assert(trc != VEX_TRC_JMP_NOREDIR);
+ /* Note that the fact that we need to continue with a
+ no-redir jump is not recorded anywhere else in this
+ thread's state. So we *must* execute the block right now
+ -- we can't fail to execute it and later resume with it,
+ because by then we'll have forgotten the fact that it
+ should be run as no-redir, but will get run as a normal
+ potentially-redir'd, hence screwing up. This really ought
+ to be cleaned up, by noting in the guest state that the
+ next block to be executed should be no-redir. Then we can
+ suspend and resume at any point, which isn't the case at
+ the moment. */
+ handle_noredir_jump( &trc[0],
+ &dispatch_ctr,
+ tid );
+ vg_assert(trc[0] != VEX_TRC_JMP_NOREDIR);
+
+ /* This can't be allowed to happen, since it means the block
+ didn't execute, and we have no way to resume-as-noredir
+ after we get more timeslice. But I don't think it ever
+ can, since handle_noredir_jump will assert if the counter
+ is zero on entry. */
+ vg_assert(trc[0] != VG_TRC_INNER_COUNTERZERO);
+
+ /* A no-redir translation can't return with a chain-me
+ request, since chaining in the no-redir cache is too
+ complex. */
+ vg_assert(trc[0] != VG_TRC_CHAIN_ME_TO_SLOW_EP
+ && trc[0] != VG_TRC_CHAIN_ME_TO_FAST_EP);
}
- switch (trc) {
+ switch (trc[0]) {
+ case VEX_TRC_JMP_BORING:
+ /* assisted dispatch, no event. Used by no-redir
+ translations to force return to the scheduler. */
case VG_TRC_BORING:
/* no special event, just keep going. */
break;
case VG_TRC_INNER_FASTMISS:
- vg_assert(VG_(dispatch_ctr) > 1);
+ vg_assert(dispatch_ctr > 0);
handle_tt_miss(tid);
break;
-
+
+ case VG_TRC_CHAIN_ME_TO_SLOW_EP: {
+ if (0) VG_(printf)("sched: CHAIN_TO_SLOW_EP: %p\n", (void*)trc[1] );
+ handle_chain_me(tid, (void*)trc[1], False);
+ break;
+ }
+
+ case VG_TRC_CHAIN_ME_TO_FAST_EP: {
+ if (0) VG_(printf)("sched: CHAIN_TO_FAST_EP: %p\n", (void*)trc[1] );
+ handle_chain_me(tid, (void*)trc[1], True);
+ break;
+ }
+
case VEX_TRC_JMP_CLIENTREQ:
do_client_request(tid);
break;
@@ -1182,7 +1313,7 @@
case VEX_TRC_JMP_SYS_INT129: /* x86-darwin */
case VEX_TRC_JMP_SYS_INT130: /* x86-darwin */
case VEX_TRC_JMP_SYS_SYSCALL: /* amd64-linux, ppc32-linux, amd64-darwin */
- handle_syscall(tid, trc);
+ handle_syscall(tid, trc[0]);
if (VG_(clo_sanity_level) > 2)
VG_(sanity_check_general)(True); /* sanity-check every syscall */
break;
@@ -1195,13 +1326,13 @@
before swapping to another. That means that short term
spins waiting for hardware to poke memory won't cause a
thread swap. */
- if (VG_(dispatch_ctr) > 2000)
- VG_(dispatch_ctr) = 2000;
+ if (dispatch_ctr > 2000)
+ dispatch_ctr = 2000;
break;
case VG_TRC_INNER_COUNTERZERO:
/* Timeslice is out. Let a new thread be scheduled. */
- vg_assert(VG_(dispatch_ctr) == 1);
+ vg_assert(dispatch_ctr == 0);
break;
case VG_TRC_FAULT_SIGNAL:
@@ -1346,7 +1477,7 @@
default:
vg_assert2(0, "VG_(scheduler), phase 3: "
- "unexpected thread return code (%u)", trc);
+ "unexpected thread return code (%u)", trc[0]);
/* NOTREACHED */
break;
Modified: trunk/coregrind/m_dispatch/dispatch-s390x-linux.S (+172 -250)
===================================================================
--- trunk/coregrind/m_dispatch/dispatch-s390x-linux.S 2012-04-20 16:42:12 +01:00 (rev 12516)
+++ trunk/coregrind/m_dispatch/dispatch-s390x-linux.S 2012-04-21 00:58:55 -23:00 (rev 12517)
@@ -9,7 +9,8 @@
framework.
Copyright IBM Corp. 2010-2011
-
+ Copyright 2011-2012, Florian Krohm (br...@ac...)
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
@@ -38,10 +39,15 @@
#if defined(VGA_s390x)
+/*
+#define XINDIR_STATS
+*/
+
/*------------------------------------------------------------*/
/*--- ---*/
-/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
-/*--- run all translations except no-redir ones. ---*/
+/*--- The dispatch loop. VG_(disp_run_translations) is ---*/
+/*--- used to run all translations, ---*/
+/*--- including no-redir ones. ---*/
/*--- ---*/
/*------------------------------------------------------------*/
@@ -55,107 +61,166 @@
/* Location of valgrind's saved FPC register */
#define S390_LOC_SAVED_FPC_V S390_OFFSET_SAVED_FPC_V(SP)
-/* Location of saved guest state pointer */
-#define S390_LOC_SAVED_GSP S390_OFFSET_SAVED_GSP(SP)
-
/* Location of saved R2 register */
#define S390_LOC_SAVED_R2 S390_OFFSET_SAVED_R2(SP)
+
/*----------------------------------------------------*/
-/*--- Preamble (set everything up) ---*/
+/*--- Entry and preamble (set everything up) ---*/
/*----------------------------------------------------*/
/* signature:
-UWord VG_(run_innerloop) ( void* guest_state, UWord do_profiling );
+void VG_(disp_run_translations)( UWord* two_words,
+ void* guest_state,
+ Addr host_addr );
+
+ Return results are placed in two_words:
+
+ two_words[0] is set to the TRC
+ two_words[1] is set to the address to patch (in case two_words[0] is
+ VG_TRC_CHAIN_ME_TO_{SLOW,FAST}_EP). Otherwise, it is 0.
*/
+ .text
+ .align 4
+ .globl VG_(disp_run_translations)
+ .type VG_(disp_run_translations), @function
+VG_(disp_run_translations):
-.text
-.align 4
-.globl VG_(run_innerloop)
-VG_(run_innerloop):
- /* r2 holds address of guest_state */
- /* r3 holds do_profiling (a flag) */
+ /* r2 holds two_words */
+ /* r3 holds pointer to guest_state */
+ /* r4 holds host_addr, i.e. the address of the translation to run */
/* Save gprs ABI: r6...r13 and r15 */
- stmg %r6,%r15,48(SP)
+ stmg %r6,%r15,48(SP)
/* New stack frame */
- aghi SP,-S390_INNERLOOP_FRAME_SIZE
+ aghi SP,-S390_INNERLOOP_FRAME_SIZE
/* Save fprs: ABI: f8...f15 */
- std %f8,160+0(SP)
- std %f9,160+8(SP)
- std %f10,160+16(SP)
- std %f11,160+24(SP)
- std %f12,160+32(SP)
- std %f13,160+40(SP)
- std %f14,160+48(SP)
- std %f15,160+56(SP)
+ std %f8,160+0(SP)
+ std %f9,160+8(SP)
+ std %f10,160+16(SP)
+ std %f11,160+24(SP)
+ std %f12,160+32(SP)
+ std %f13,160+40(SP)
+ std %f14,160+48(SP)
+ std %f15,160+56(SP)
/* Load address of guest state into guest state register (r13) */
- lgr %r13,%r2
+ lgr %r13,%r3
- /* Store address of guest state pointer on stack.
- It will be needed later because upon return from a VEX translation
- r13 may contain a special value. So the old value will be used to
- determine whether r13 contains a special value. */
- stg %r13,S390_LOC_SAVED_GSP
-
- /* Save valgrind's FPC on stack so run_innerloop_exit can restore
+ /* Save R2 on stack. In postamble it will be restored such that the
+ return values can be written */
+ stg %r2,S390_LOC_SAVED_R2
+
+ /* Save valgrind's FPC on stack so postamble can restore
it later . */
stfpc S390_LOC_SAVED_FPC_V
/* Load the FPC the way the client code wants it. I.e. pull the
value from the guest state. */
- lfpc OFFSET_s390x_fpc(%r13)
+ lfpc OFFSET_s390x_fpc(%r13)
- /* Get the IA from the guest state */
- lg %r2,OFFSET_s390x_IA(%r13)
+ /* Jump into the code cache. Chained translations in
+ the code cache run, until for whatever reason, they can't
+ continue. When that happens, the translation in question
+ will jump (or call) to one of the continuation points
+ VG_(cp_...) below. */
+ br %r4
- /* Get VG_(dispatch_ctr) -- a 32-bit value -- and store it in a reg */
- larl %r6,VG_(dispatch_ctr)
- l S390_REGNO_DISPATCH_CTR...
[truncated message content] |
|
From: <sv...@va...> - 2012-04-20 23:58:27
|
sewardj 2012-04-21 00:58:17 +0100 (Sat, 21 Apr 2012)
New Revision: 2296
Log:
Merge branches/TCHAIN from r2271 (its creation point) into trunk.
Modified directories:
trunk/
Modified files:
trunk/Makefile-gcc
trunk/priv/guest_amd64_defs.h
trunk/priv/guest_amd64_helpers.c
trunk/priv/guest_amd64_toIR.c
trunk/priv/guest_arm_defs.h
trunk/priv/guest_arm_helpers.c
trunk/priv/guest_arm_toIR.c
trunk/priv/guest_generic_bb_to_IR.c
trunk/priv/guest_generic_bb_to_IR.h
trunk/priv/guest_generic_x87.c
trunk/priv/guest_generic_x87.h
trunk/priv/guest_ppc_defs.h
trunk/priv/guest_ppc_helpers.c
trunk/priv/guest_ppc_toIR.c
trunk/priv/guest_s390_defs.h
trunk/priv/guest_s390_helpers.c
trunk/priv/guest_s390_toIR.c
trunk/priv/guest_x86_defs.h
trunk/priv/guest_x86_helpers.c
trunk/priv/guest_x86_toIR.c
trunk/priv/host_amd64_defs.c
trunk/priv/host_amd64_defs.h
trunk/priv/host_amd64_isel.c
trunk/priv/host_arm_defs.c
trunk/priv/host_arm_defs.h
trunk/priv/host_arm_isel.c
trunk/priv/host_generic_reg_alloc2.c
trunk/priv/host_generic_regs.c
trunk/priv/host_generic_regs.h
trunk/priv/host_generic_simd64.c
trunk/priv/host_generic_simd64.h
trunk/priv/host_ppc_defs.c
trunk/priv/host_ppc_defs.h
trunk/priv/host_ppc_isel.c
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_defs.h
trunk/priv/host_s390_isel.c
trunk/priv/host_x86_defs.c
trunk/priv/host_x86_defs.h
trunk/priv/host_x86_isel.c
trunk/priv/ir_defs.c
trunk/priv/ir_match.c
trunk/priv/ir_match.h
trunk/priv/ir_opt.c
trunk/priv/ir_opt.h
trunk/priv/main_globals.c
trunk/priv/main_globals.h
trunk/priv/main_main.c
trunk/priv/main_util.c
trunk/priv/main_util.h
trunk/pub/libvex.h
trunk/pub/libvex_guest_amd64.h
trunk/pub/libvex_guest_arm.h
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_guest_s390x.h
trunk/pub/libvex_guest_x86.h
trunk/pub/libvex_ir.h
trunk/pub/libvex_s390x_common.h
trunk/pub/libvex_trc_values.h
trunk/switchback/switchback.c
trunk/test_main.c
trunk/test_main.h
Modified: trunk/
Modified: trunk/pub/libvex_s390x_common.h (+9 -4)
===================================================================
--- trunk/pub/libvex_s390x_common.h 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/pub/libvex_s390x_common.h 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -1,3 +1,4 @@
+/* -*- mode: C; c-basic-offset: 3; -*- */
/*--------------------------------------------------------------------*/
/*--- Common defs for s390x libvex_s390x_common.h ---*/
@@ -27,8 +28,6 @@
The GNU General Public License is contained in the file COPYING.
*/
-/* -*- mode: C; c-basic-offset: 3; -*- */
-
#ifndef __LIBVEX_PUB_S390X_H
#define __LIBVEX_PUB_S390X_H
@@ -42,7 +41,7 @@
/*--------------------------------------------------------------*/
#define S390_REGNO_RETURN_VALUE 2
-#define S390_REGNO_DISPATCH_CTR 12 /* Holds VG_(dispatch_ctr) */
+#define S390_REGNO_TCHAIN_SCRATCH 12
#define S390_REGNO_GUEST_STATE_POINTER 13
#define S390_REGNO_LINK_REGISTER 14
#define S390_REGNO_STACK_POINTER 15
@@ -52,7 +51,7 @@
/*--- Offsets in the stack frame allocated by the dispatcher ---*/
/*--------------------------------------------------------------*/
-/* Where the profiling dispatcher saves the r2 contents. */
+/* Where the dispatcher saves the r2 contents. */
#define S390_OFFSET_SAVED_R2 160+96
/* Where client's FPC register is saved. */
@@ -88,6 +87,12 @@
/* Number of double words needed to store all facility bits. */
#define S390_NUM_FACILITY_DW 2
+/* The length of the instructions issued by s390_tchain_load64 */
+#define S390_TCHAIN_LOAD64_LEN 16
+
+/* The length of the call insn (BASR) used in translation chaining */
+#define S390_TCHAIN_CALL_LEN 2
+
#endif /* __LIBVEX_PUB_S390X_H */
/*--------------------------------------------------------------------*/
Modified: trunk/pub/libvex_ir.h (+15 -3)
===================================================================
--- trunk/pub/libvex_ir.h 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/pub/libvex_ir.h 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -1712,8 +1712,9 @@
guest to restart a syscall that has been interrupted by a signal.
*/
typedef
- enum {
- Ijk_Boring=0x16000, /* not interesting; just goto next */
+ enum {
+ Ijk_INVALID=0x16000,
+ Ijk_Boring, /* not interesting; just goto next */
Ijk_Call, /* guest is doing a call */
Ijk_Ret, /* guest is doing a return */
Ijk_ClientReq, /* do guest client req before continuing */
@@ -2194,11 +2195,15 @@
/* Conditional exit from the middle of an IRSB.
ppIRStmt output: if (<guard>) goto {<jk>} <dst>
eg. if (t69) goto {Boring} 0x4000AAA:I32
+ If <guard> is true, the guest state is also updated by
+ PUT-ing <dst> at <offsIP>. This is done because a
+ taken exit must update the guest program counter.
*/
struct {
IRExpr* guard; /* Conditional expression */
IRJumpKind jk; /* Jump kind */
IRConst* dst; /* Jump target (constant only) */
+ Int offsIP; /* Guest state offset for IP */
} Exit;
} Ist;
}
@@ -2218,8 +2223,12 @@
IRExpr* addr, IRExpr* storedata );
extern IRStmt* IRStmt_Dirty ( IRDirty* details );
extern IRStmt* IRStmt_MBE ( IRMBusEvent event );
-extern IRStmt* IRStmt_Exit ( IRExpr* guard, IRJumpKind jk, IRConst* dst );
+extern IRStmt* IRStmt_Exit ( IRExpr* guard, IRJumpKind jk, IRConst* dst,
+ Int offsIP );
+// TEMP HACK
+#define IRStmt_Exit3(__guard,__jk,__dst) IRStmt_Exit(__guard,__jk,__dst,0)
+
/* Deep-copy an IRStmt. */
extern IRStmt* deepCopyIRStmt ( IRStmt* );
@@ -2263,6 +2272,8 @@
executes all the way to the end, without a side exit
- An indication of any special actions (JumpKind) needed
for this final jump.
+ - Offset of the IP field in the guest state. This will be
+ updated before the final jump is done.
"IRSB" stands for "IR Super Block".
*/
@@ -2274,6 +2285,7 @@
Int stmts_used;
IRExpr* next;
IRJumpKind jumpkind;
+ Int offsIP;
}
IRSB;
Modified: trunk/priv/host_s390_defs.h (+74 -11)
===================================================================
--- trunk/priv/host_s390_defs.h 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/host_s390_defs.h 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -130,7 +130,6 @@
S390_INSN_TEST, /* test operand and set cc */
S390_INSN_CC2BOOL,/* convert condition code to 0/1 */
S390_INSN_COMPARE,
- S390_INSN_BRANCH, /* un/conditional goto */
S390_INSN_HELPER_CALL,
S390_INSN_CAS, /* compare and swap */
S390_INSN_BFP_BINOP, /* Binary floating point 32-bit / 64-bit */
@@ -144,7 +143,13 @@
S390_INSN_BFP128_CONVERT_FROM,
S390_INSN_MFENCE,
S390_INSN_GZERO, /* Assign zero to a guest register */
- S390_INSN_GADD /* Add a value to a guest register */
+ S390_INSN_GADD, /* Add a value to a guest register */
+ /* The following 5 insns are mandated by translation chaining */
+ S390_INSN_XDIRECT, /* direct transfer to guest address */
+ S390_INSN_XINDIR, /* indirect transfer to guest address */
+ S390_INSN_XASSISTED, /* assisted transfer to guest address */
+ S390_INSN_EVCHECK, /* Event check */
+ S390_INSN_PROFINC /* 64-bit profile counter increment */
} s390_insn_tag;
@@ -338,11 +343,6 @@
HReg op3;
HReg old_mem;
} cas;
- struct {
- IRJumpKind kind;
- s390_cc_t cond;
- s390_opnd_RMI dst;
- } branch;
/* Pseudo-insn for representing a helper call.
TARGET is the absolute address of the helper function
NUM_ARGS says how many arguments are being passed.
@@ -407,6 +407,44 @@
UChar delta;
ULong value; /* for debugging only */
} gadd;
+
+ /* The next 5 entries are generic to support translation chaining */
+
+ /* Update the guest IA value, then exit requesting to chain
+ to it. May be conditional. */
+ struct {
+ s390_cc_t cond;
+ Bool to_fast_entry; /* chain to the what entry point? */
+ Addr64 dst; /* next guest address */
+ s390_amode *guest_IA;
+ } xdirect;
+ /* Boring transfer to a guest address not known at JIT time.
+ Not chainable. May be conditional. */
+ struct {
+ s390_cc_t cond;
+ HReg dst;
+ s390_amode *guest_IA;
+ } xindir;
+ /* Assisted transfer to a guest address, most general case.
+ Not chainable. May be conditional. */
+ struct {
+ s390_cc_t cond;
+ IRJumpKind kind;
+ HReg dst;
+ s390_amode *guest_IA;
+ } xassisted;
+ struct {
+ /* fixs390: I don't think these are really needed
+ as the gsp and the offset are fixed no ? */
+ s390_amode *counter; /* dispatch counter */
+ s390_amode *fail_addr;
+ } evcheck;
+ struct {
+ /* No fields. The address of the counter to increment is
+ installed later, post-translation, by patching it in,
+ as it is not known at translation time. */
+ } profinc;
+
} variant;
} s390_insn;
@@ -433,7 +471,6 @@
s390_insn *s390_insn_test(UChar size, s390_opnd_RMI src);
s390_insn *s390_insn_compare(UChar size, HReg dst, s390_opnd_RMI opnd,
Bool signed_comparison);
-s390_insn *s390_insn_branch(IRJumpKind jk, s390_cc_t cond, s390_opnd_RMI dst);
s390_insn *s390_insn_helper_call(s390_cc_t cond, Addr64 target, UInt num_args,
HChar *name);
s390_insn *s390_insn_bfp_triop(UChar size, s390_bfp_triop_t, HReg dst, HReg op2,
@@ -460,6 +497,15 @@
s390_insn *s390_insn_gzero(UChar size, UInt offset);
s390_insn *s390_insn_gadd(UChar size, UInt offset, UChar delta, ULong value);
+/* Five for translation chaining */
+s390_insn *s390_insn_xdirect(s390_cc_t cond, Addr64 dst, s390_amode *guest_IA,
+ Bool to_fast_entry);
+s390_insn *s390_insn_xindir(s390_cc_t cond, HReg dst, s390_amode *guest_IA);
+s390_insn *s390_insn_xassisted(s390_cc_t cond, HReg dst, s390_amode *guest_IA,
+ IRJumpKind kind);
+s390_insn *s390_insn_evcheck(s390_amode *counter, s390_amode *fail_addr);
+s390_insn *s390_insn_profinc(void);
+
const HChar *s390_insn_as_string(const s390_insn *);
/*--------------------------------------------------------*/
@@ -475,14 +521,31 @@
void getRegUsage_S390Instr( HRegUsage *, s390_insn *, Bool );
void mapRegs_S390Instr ( HRegRemap *, s390_insn *, Bool );
Bool isMove_S390Instr ( s390_insn *, HReg *, HReg * );
-Int emit_S390Instr ( UChar *, Int, s390_insn *, Bool,
- void *, void * );
+Int emit_S390Instr ( Bool *, UChar *, Int, s390_insn *, Bool,
+ void *, void *, void *, void *);
void getAllocableRegs_S390( Int *, HReg **, Bool );
void genSpill_S390 ( HInstr **, HInstr **, HReg , Int , Bool );
void genReload_S390 ( HInstr **, HInstr **, HReg , Int , Bool );
s390_insn *directReload_S390 ( s390_insn *, HReg, Short );
-HInstrArray *iselSB_S390 ( IRSB *, VexArch, VexArchInfo *, VexAbiInfo * );
+HInstrArray *iselSB_S390 ( IRSB *, VexArch, VexArchInfo *, VexAbiInfo *,
+ Int, Int, Bool, Bool, Addr64);
+/* Return the number of bytes of code needed for an event check */
+Int evCheckSzB_S390(void);
+
+/* Perform a chaining and unchaining of an XDirect jump. */
+VexInvalRange chainXDirect_S390(void *place_to_chain,
+ void *disp_cp_chain_me_EXPECTED,
+ void *place_to_jump_to);
+
+VexInvalRange unchainXDirect_S390(void *place_to_unchain,
+ void *place_to_jump_to_EXPECTED,
+ void *disp_cp_chain_me);
+
+/* Patch the counter location into an existing ProfInc point. */
+VexInvalRange patchProfInc_S390(void *code_to_patch,
+ ULong *location_of_counter);
+
/* KLUDGE: See detailled comment in host_s390_defs.c. */
extern const VexArchInfo *s390_archinfo_host;
Modified: trunk/priv/host_s390_defs.c (+773 -146)
===================================================================
--- trunk/priv/host_s390_defs.c 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/host_s390_defs.c 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -59,6 +59,7 @@
static Bool s390_insn_is_reg_reg_move(const s390_insn *, HReg *src, HReg *dst);
static void s390_insn_map_regs(HRegRemap *, s390_insn *);
static void s390_insn_get_reg_usage(HRegUsage *u, const s390_insn *);
+static UInt s390_tchain_load64_len(void);
/*------------------------------------------------------------*/
@@ -118,7 +119,7 @@
/* Total number of allocable registers (all classes) */
*nregs = 16 /* GPRs */
- 1 /* r0 */
- - 1 /* r12 register holding VG_(dispatch_ctr) */
+ - 1 /* r12 scratch register for translation chaining support */
- 1 /* r13 guest state pointer */
- 1 /* r14 link register */
- 1 /* r15 stack pointer */
@@ -144,12 +145,8 @@
Otherwise, they are available to the allocator */
(*arr)[i++] = mkHReg(10, HRcInt64, False);
(*arr)[i++] = mkHReg(11, HRcInt64, False);
- /* GPR12 is not available because it caches VG_(dispatch_ctr).
- Setting aside a register for the counter gives slightly better
- performance - most of the time. From the 10 tests in "make perf"
- 8 run faster with a max observed speedup of 2.6% for bz2. ffbench
- is the counter example. It runs 1.3% faster without the dedicated
- register. */
+ /* GPR12 is not available because it us used as a scratch register
+ in translation chaining. */
/* GPR13 is not available because it is used as guest state pointer */
/* GPR14 is not available because it is used as link register */
/* GPR15 is not available because it is used as stack pointer */
@@ -183,6 +180,7 @@
return mkHReg(S390_REGNO_GUEST_STATE_POINTER, HRcInt64, False);
}
+
/* Is VALUE within the domain of a 20-bit signed integer. */
static __inline__ Bool
fits_signed_20bit(Int value)
@@ -617,14 +615,6 @@
s390_opnd_RMI_get_reg_usage(u, insn->variant.compare.src2);
break;
- case S390_INSN_BRANCH:
- s390_opnd_RMI_get_reg_usage(u, insn->variant.branch.dst);
- /* The destination address is loaded into S390_REGNO_RETURN_VALUE.
- See s390_insn_branch_emit. */
- addHRegUse(u, HRmWrite,
- mkHReg(S390_REGNO_RETURN_VALUE, HRcInt64, False));
- break;
-
case S390_INSN_HELPER_CALL: {
UInt i;
@@ -718,6 +708,29 @@
case S390_INSN_GADD:
break;
+ case S390_INSN_EVCHECK:
+ s390_amode_get_reg_usage(u, insn->variant.evcheck.counter);
+ s390_amode_get_reg_usage(u, insn->variant.evcheck.fail_addr);
+ break;
+
+ case S390_INSN_PROFINC:
+ /* Does not use any register visible to the register allocator */
+ break;
+
+ case S390_INSN_XDIRECT:
+ s390_amode_get_reg_usage(u, insn->variant.xdirect.guest_IA);
+ break;
+
+ case S390_INSN_XINDIR:
+ addHRegUse(u, HRmRead, insn->variant.xindir.dst);
+ s390_amode_get_reg_usage(u, insn->variant.xindir.guest_IA);
+ break;
+
+ case S390_INSN_XASSISTED:
+ addHRegUse(u, HRmRead, insn->variant.xassisted.dst);
+ s390_amode_get_reg_usage(u, insn->variant.xassisted.guest_IA);
+ break;
+
default:
vpanic("s390_insn_get_reg_usage");
}
@@ -829,11 +842,6 @@
s390_opnd_RMI_map_regs(m, &insn->variant.compare.src2);
break;
- case S390_INSN_BRANCH:
- s390_opnd_RMI_map_regs(m, &insn->variant.branch.dst);
- /* No need to map S390_REGNO_RETURN_VALUE. It's not virtual */
- break;
-
case S390_INSN_HELPER_CALL:
/* s390_insn_helper_call_emit also reads / writes the link register
and stack pointer. But those registers are not visible to the
@@ -923,6 +931,31 @@
case S390_INSN_GADD:
break;
+ case S390_INSN_EVCHECK:
+ s390_amode_map_regs(m, insn->variant.evcheck.counter);
+ s390_amode_map_regs(m, insn->variant.evcheck.fail_addr);
+ break;
+
+ case S390_INSN_PROFINC:
+ /* Does not use any register visible to the register allocator */
+ break;
+
+ case S390_INSN_XDIRECT:
+ s390_amode_map_regs(m, insn->variant.xdirect.guest_IA);
+ break;
+
+ case S390_INSN_XINDIR:
+ s390_amode_map_regs(m, insn->variant.xindir.guest_IA);
+ insn->variant.xindir.dst =
+ lookupHRegRemap(m, insn->variant.xindir.dst);
+ break;
+
+ case S390_INSN_XASSISTED:
+ s390_amode_map_regs(m, insn->variant.xassisted.guest_IA);
+ insn->variant.xassisted.dst =
+ lookupHRegRemap(m, insn->variant.xassisted.dst);
+ break;
+
default:
vpanic("s390_insn_map_regs");
}
@@ -1403,6 +1436,16 @@
static UChar *
+s390_emit_BRCL(UChar *p, UChar r1, ULong i2)
+{
+ if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
+ s390_disasm(ENC2(XMNM, PCREL), S390_XMNM_BRCL, r1, i2);
+
+ return emit_RIL(p, 0xc00400000000ULL, r1, i2);
+}
+
+
+static UChar *
s390_emit_CR(UChar *p, UChar r1, UChar r2)
{
if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM))
@@ -4252,21 +4295,6 @@
s390_insn *
-s390_insn_branch(IRJumpKind kind, s390_cc_t cond, s390_opnd_RMI dst)
-{
- s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
-
- insn->tag = S390_INSN_BRANCH;
- insn->size = 0; /* does not matter */
- insn->variant.branch.kind = kind;
- insn->variant.branch.dst = dst;
- insn->variant.branch.cond = cond;
-
- return insn;
-}
-
-
-s390_insn *
s390_insn_helper_call(s390_cc_t cond, Addr64 target, UInt num_args,
HChar *name)
{
@@ -4489,6 +4517,89 @@
}
+s390_insn *
+s390_insn_xdirect(s390_cc_t cond, Addr64 dst, s390_amode *guest_IA,
+ Bool to_fast_entry)
+{
+ s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
+
+ insn->tag = S390_INSN_XDIRECT;
+ insn->size = 0; /* does not matter */
+
+ insn->variant.xdirect.cond = cond;
+ insn->variant.xdirect.dst = dst;
+ insn->variant.xdirect.guest_IA = guest_IA;
+ insn->variant.xdirect.to_fast_entry = to_fast_entry;
+
+ return insn;
+}
+
+
+s390_insn *
+s390_insn_xindir(s390_cc_t cond, HReg dst, s390_amode *guest_IA)
+{
+ s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
+
+ insn->tag = S390_INSN_XINDIR;
+ insn->size = 0; /* does not matter */
+
+ insn->variant.xindir.cond = cond;
+ insn->variant.xindir.dst = dst;
+ insn->variant.xindir.guest_IA = guest_IA;
+
+ return insn;
+}
+
+
+s390_insn *
+s390_insn_xassisted(s390_cc_t cond, HReg dst, s390_amode *guest_IA,
+ IRJumpKind kind)
+{
+ s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
+
+ insn->tag = S390_INSN_XASSISTED;
+ insn->size = 0; /* does not matter */
+
+ insn->variant.xassisted.cond = cond;
+ insn->variant.xassisted.dst = dst;
+ insn->variant.xassisted.guest_IA = guest_IA;
+ insn->variant.xassisted.kind = kind;
+
+ return insn;
+}
+
+
+s390_insn *
+s390_insn_evcheck(s390_amode *counter, s390_amode *fail_addr)
+{
+ s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
+
+ vassert(counter->tag == S390_AMODE_B12 || counter->tag == S390_AMODE_BX12);
+ vassert(fail_addr->tag == S390_AMODE_B12 ||
+ fail_addr->tag == S390_AMODE_BX12);
+
+ insn->tag = S390_INSN_EVCHECK;
+ insn->size = 0; /* does not matter */
+
+ insn->variant.evcheck.counter = counter;
+ insn->variant.evcheck.fail_addr = fail_addr;
+
+ return insn;
+}
+
+
+s390_insn *
+s390_insn_profinc(void)
+{
+ s390_insn *insn = LibVEX_Alloc(sizeof(s390_insn));
+
+ insn->tag = S390_INSN_PROFINC;
+ insn->size = 0; /* does not matter */
+
+ return insn;
+}
+
+
/*---------------------------------------------------------------*/
/*--- Debug print ---*/
/*---------------------------------------------------------------*/
@@ -4792,11 +4903,6 @@
&insn->variant.compare.src2);
break;
- case S390_INSN_BRANCH:
- s390_sprintf(buf, "if (%C) %J %O", insn->variant.branch.cond,
- insn->variant.branch.kind, &insn->variant.branch.dst);
- return buf; /* avoid printing "size = ..." which is meaningless */
-
case S390_INSN_HELPER_CALL: {
s390_sprintf(buf, "%M if (%C) %s{%I}(%L)", "v-call",
insn->variant.helper_call.cond,
@@ -4924,6 +5030,39 @@
insn->variant.gadd.value);
break;
+ case S390_INSN_EVCHECK:
+ s390_sprintf(buf, "%M counter = %A, fail-addr = %A", "v-evcheck",
+ insn->variant.evcheck.counter,
+ insn->variant.evcheck.fail_addr);
+ return buf; /* avoid printing "size = ..." which is meaningless */
+
+ case S390_INSN_PROFINC:
+ s390_sprintf(buf, "%M", "v-profinc");
+ return buf; /* avoid printing "size = ..." which is meaningless */
+
+ case S390_INSN_XDIRECT:
+ s390_sprintf(buf, "%M if (%C) %A = %I %s", "v-xdirect",
+ insn->variant.xdirect.cond,
+ insn->variant.xdirect.guest_IA,
+ insn->variant.xdirect.dst,
+ insn->variant.xdirect.to_fast_entry ? "fast" : "slow");
+ return buf; /* avoid printing "size = ..." which is meaningless */
+
+ case S390_INSN_XINDIR:
+ s390_sprintf(buf, "%M if (%C) %A = %R", "v-xindir",
+ insn->variant.xindir.cond,
+ insn->variant.xindir.guest_IA,
+ insn->variant.xindir.dst);
+ return buf; /* avoid printing "size = ..." which is meaningless */
+
+ case S390_INSN_XASSISTED:
+ s390_sprintf(buf, "%M if (%C) %J %A = %R", "v-xassisted",
+ insn->variant.xassisted.cond,
+ insn->variant.xassisted.kind,
+ insn->variant.xassisted.guest_IA,
+ insn->variant.xassisted.dst);
+ return buf; /* avoid printing "size = ..." which is meaningless */
+
default: goto fail;
}
@@ -6512,104 +6651,6 @@
static UChar *
-s390_insn_branch_emit(UChar *buf, const s390_insn *insn)
-{
- s390_opnd_RMI dst;
- s390_cc_t cond;
- UInt trc;
- UChar *p, *ptmp = 0; /* avoid compiler warnings */
-
- cond = insn->variant.branch.cond;
- dst = insn->variant.branch.dst;
-
- p = buf;
- trc = 0;
-
- if (cond != S390_CC_ALWAYS) {
- /* So we have something like this
- if (cond) goto X;
- Y: ...
- We convert this into
- if (! cond) goto Y; // BRC insn; 4 bytes
- return_reg = X;
- return to dispatcher
- Y:
- */
- ptmp = p; /* 4 bytes (a BRC insn) to be filled in here */
- p += 4;
- }
-
- /* If a non-boring, set guest-state-pointer appropriately. */
-
- switch (insn->variant.branch.kind) {
- case Ijk_ClientReq: trc = VEX_TRC_JMP_CLIENTREQ; break;
- case Ijk_Sys_syscall: trc = VEX_TRC_JMP_SYS_SYSCALL; break;
- case Ijk_Yield: trc = VEX_TRC_JMP_YIELD; break;
- case Ijk_EmWarn: trc = VEX_TRC_JMP_EMWARN; break;
- case Ijk_EmFail: trc = VEX_TRC_JMP_EMFAIL; break;
- case Ijk_MapFail: trc = VEX_TRC_JMP_MAPFAIL; break;
- case Ijk_NoDecode: trc = VEX_TRC_JMP_NODECODE; break;
- case Ijk_TInval: trc = VEX_TRC_JMP_TINVAL; break;
- case Ijk_NoRedir: trc = VEX_TRC_JMP_NOREDIR; break;
- case Ijk_SigTRAP: trc = VEX_TRC_JMP_SIGTRAP; break;
- case Ijk_Ret: trc = 0; break;
- case Ijk_Call: trc = 0; break;
- case Ijk_Boring: trc = 0; break;
- break;
-
- default:
- vpanic("s390_insn_branch_emit: unknown jump kind");
- }
-
- /* Get the destination address into the return register */
- switch (dst.tag) {
- case S390_OPND_REG:
- p = s390_emit_LGR(p, S390_REGNO_RETURN_VALUE, hregNumber(dst.variant.reg));
- break;
-
- case S390_OPND_AMODE: {
- const s390_amode *am = dst.variant.am;
- UChar b = hregNumber(am->b);
- UChar x = hregNumber(am->x);
- Int d = am->d;
-
- p = s390_emit_LG(p, S390_REGNO_RETURN_VALUE, x, b, DISP20(d));
- break;
- }
-
- case S390_OPND_IMMEDIATE:
- p = s390_emit_load_64imm(p, S390_REGNO_RETURN_VALUE, dst.variant.imm);
- break;
-
- default:
- goto fail;
- }
-
- if (trc != 0) {
- /* Something special. Set guest-state pointer appropriately */
- p = s390_emit_LGHI(p, S390_REGNO_GUEST_STATE_POINTER, trc);
- } else {
- /* Nothing special needs to be done for calls and returns. */
- }
-
- p = s390_emit_BCR(p, S390_CC_ALWAYS, S390_REGNO_LINK_REGISTER);
-
- if (cond != S390_CC_ALWAYS) {
- Int delta = p - ptmp;
-
- delta >>= 1; /* immediate constant is #half-words */
- vassert(delta > 0 && delta < (1 << 16));
- s390_emit_BRC(ptmp, s390_cc_invert(cond), delta);
- }
-
- return p;
-
- fail:
- vpanic("s390_insn_branch_emit");
-}
-
-
-static UChar *
s390_insn_helper_call_emit(UChar *buf, const s390_insn *insn)
{
s390_cc_t cond;
@@ -7163,9 +7204,415 @@
}
+/* Define convenience functions needed for translation chaining.
+ Any changes need to be applied to the functions in concert. */
+
+static __inline__ Bool
+s390_insn_is_BRCL(const UChar *p, UChar condition)
+{
+ return p[0] == 0xc0 && p[1] == ((condition << 4) | 0x04);
+}
+
+static __inline__ Bool
+s390_insn_is_BR(const UChar *p, UChar reg)
+{
+ return p[0] == 0x07 && p[1] == (0xF0 | reg); /* BCR 15,reg */
+}
+
+static __inline__ Bool
+s390_insn_is_BASR(const UChar *p, UChar link_reg, UChar other_reg)
+{
+ return p[0] == 0x0D && p[1] == ((link_reg << 4) | other_reg);
+}
+
+/* Load the 64-bit VALUE into REG. Note that this function must NOT
+ optimise the generated code by looking at the value. I.e. using
+ LGHI if value == 0 would be very wrong.
+ fixs390: Do it in a way that works everywhere for now. */
+static UChar *
+s390_tchain_load64(UChar *buf, UChar regno, ULong value)
+{
+ UChar *begin = buf;
+
+ buf = s390_emit_IILL(buf, regno, value & 0xFFFF);
+ value >>= 16;
+ buf = s390_emit_IILH(buf, regno, value & 0xFFFF);
+ value >>= 16;
+ buf = s390_emit_IIHL(buf, regno, value & 0xFFFF);
+ value >>= 16;
+ buf = s390_emit_IIHH(buf, regno, value & 0xFFFF);
+
+ vassert(buf - begin == s390_tchain_load64_len());
+
+ return buf;
+}
+
+/* Return number of bytes generated by s390_tchain_load64 */
+static UInt
+s390_tchain_load64_len(void)
+{
+ return S390_TCHAIN_LOAD64_LEN;
+}
+
+/* Verify that CODE is the code sequence generated by s390_tchain_load64
+ to load VALUE into REGNO. Return pointer to the byte following the
+ insn sequence. */
+static const UChar *
+s390_tchain_verify_load64(const UChar *code, UChar regno, ULong value)
+{
+ UInt regmask = regno << 4;
+ UInt hw;
+
+ /* Check for IILL */
+ hw = value & 0xFFFF;
+ vassert(code[0] == 0xA5);
+ vassert(code[1] == (0x03 | regmask));
+ vassert(code[2] == (hw >> 8));
+ vassert(code[3] == (hw & 0xFF));
+
+ /* Check for IILH */
+ hw = (value >> 16) & 0xFFFF;
+ vassert(code[4] == 0xA5);
+ vassert(code[5] == (0x02 | regmask));
+ vassert(code[6] == (hw >> 8));
+ vassert(code[7] == (hw & 0xFF));
+
+ /* Check for IIHL */
+ hw = (value >> 32) & 0xFFFF;
+ vassert(code[8] == 0xA5);
+ vassert(code[9] == (0x01 | regmask));
+ vassert(code[10] == (hw >> 8));
+ vassert(code[11] == (hw & 0xFF));
+
+ /* Check for IIHH */
+ hw = (value >> 48) & 0xFFFF;
+ vassert(code[12] == 0xA5);
+ vassert(code[13] == (0x00 | regmask));
+ vassert(code[14] == (hw >> 8));
+ vassert(code[15] == (hw & 0xFF));
+
+ return code + s390_tchain_load64_len();
+}
+
+/* CODE points to the code sequence as generated by s390_tchain_load64.
+ Change the loaded value to VALUE. Return pointer to the byte following
+ the patched code sequence. */
+static UChar *
+s390_tchain_patch_load64(UChar *code, ULong imm64)
+{
+ code[3] = imm64 & 0xFF; imm64 >>= 8;
+ code[2] = imm64 & 0xFF; imm64 >>= 8;
+ code[7] = imm64 & 0xFF; imm64 >>= 8;
+ code[6] = imm64 & 0xFF; imm64 >>= 8;
+ code[11] = imm64 & 0xFF; imm64 >>= 8;
+ code[10] = imm64 & 0xFF; imm64 >>= 8;
+ code[15] = imm64 & 0xFF; imm64 >>= 8;
+ code[14] = imm64 & 0xFF; imm64 >>= 8;
+
+ return code + s390_tchain_load64_len();
+}
+
+
+/* NB: what goes on here has to be very closely coordinated with the
+ chainXDirect_S390 and unchainXDirect_S390 below. */
+static UChar *
+s390_insn_xdirect_emit(UChar *buf, const s390_insn *insn,
+ void *disp_cp_chain_me_to_slowEP,
+ void *disp_cp_chain_me_to_fastEP)
+{
+ /* 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);
+
+ /* Use ptmp for backpatching conditional jumps. */
+ UChar *ptmp = buf;
+
+ /* First off, if this is conditional, create a conditional
+ jump over the rest of it. */
+ s390_cc_t cond = insn->variant.xdirect.cond;
+
+ if (cond != S390_CC_ALWAYS) {
+ /* So we have something like this
+ if (cond) do_xdirect;
+ Y: ...
+ We convert this into
+ if (! cond) goto Y; // BRC opcode; 4 bytes
+ do_xdirect;
+ Y:
+ */
+ /* 4 bytes (a BRC insn) to be filled in here */
+ buf += 4;
+ }
+
+ /* Update the guest IA. */
+ buf = s390_emit_load_64imm(buf, R0, insn->variant.xdirect.dst);
+
+ const s390_amode *amode = insn->variant.xdirect.guest_IA;
+ vassert(amode->tag == S390_AMODE_B12 || amode->tag == S390_AMODE_BX12);
+ UInt b = hregNumber(amode->b);
+ UInt x = hregNumber(amode->x); /* 0 for B12 and B20 */
+ UInt d = amode->d;
+
+ buf = s390_emit_STG(buf, R0, x, b, DISP20(d));
+
+ /* --- FIRST PATCHABLE BYTE follows --- */
+ /* VG_(disp_cp_chain_me_to_{slowEP,fastEP}) (where we're calling
+ to) backs up the return address, so as to find the address of
+ the first patchable byte. So: don't change the length of the
+ two instructions below. */
+
+ /* Load the chosen entry point into the scratch reg */
+ void *disp_cp_chain_me;
+
+ disp_cp_chain_me =
+ insn->variant.xdirect.to_fast_entry ? disp_cp_chain_me_to_fastEP
+ : disp_cp_chain_me_to_slowEP;
+
+ ULong addr = Ptr_to_ULong(disp_cp_chain_me);
+ buf = s390_tchain_load64(buf, S390_REGNO_TCHAIN_SCRATCH, addr);
+
+ /* call *tchain_scratch */
+ buf = s390_emit_BASR(buf, 1, S390_REGNO_TCHAIN_SCRATCH);
+
+ /* --- END of PATCHABLE BYTES --- */
+
+ /* Fix up the conditional jump, if there was one. */
+ if (cond != S390_CC_ALWAYS) {
+ Int delta = buf - ptmp;
+
+ delta >>= 1; /* immediate constant is #half-words */
+ vassert(delta > 0 && delta < (1 << 16));
+ s390_emit_BRC(ptmp, s390_cc_invert(cond), delta);
+ }
+
+ return buf;
+}
+
+/* Return the number of patchable bytes from an xdirect insn. */
+static UInt
+s390_xdirect_patchable_len(void)
+{
+ return s390_tchain_load64_len() + S390_TCHAIN_CALL_LEN;
+}
+
+
+static UChar *
+s390_insn_xindir_emit(UChar *buf, const s390_insn *insn, void *disp_cp_xindir)
+{
+ /* We're generating transfers that could lead indirectly to a
+ chain-me, so we need to be sure this is actually allowed --
+ no-redir translations are not allowed to reach normal
+ translations without going through the scheduler. That means
+ no XDirects or XIndirs out from no-redir translations.
+ Hence: */
+ vassert(disp_cp_xindir != NULL);
+
+ /* Use ptmp for backpatching conditional jumps. */
+ UChar *ptmp = buf;
+
+ /* First off, if this is conditional, create a conditional
+ jump over the rest of it. */
+ s390_cc_t cond = insn->variant.xdirect.cond;
+
+ if (cond != S390_CC_ALWAYS) {
+ /* So we have something like this
+ if (cond) do_xdirect;
+ Y: ...
+ We convert this into
+ if (! cond) goto Y; // BRC opcode; 4 bytes
+ do_xdirect;
+ Y:
+ */
+ /* 4 bytes (a BRC insn) to be filled in here */
+ buf += 4;
+ }
+
+ /* Update the guest IA with the address in xdirect.dst. */
+ const s390_amode *amode = insn->variant.xindir.guest_IA;
+
+ vassert(amode->tag == S390_AMODE_B12 || amode->tag == S390_AMODE_BX12);
+ UInt b = hregNumber(amode->b);
+ UInt x = hregNumber(amode->x); /* 0 for B12 and B20 */
+ UInt d = amode->d;
+ UInt regno = hregNumber(insn->variant.xindir.dst);
+
+ buf = s390_emit_STG(buf, regno, x, b, DISP20(d));
+
+ /* load tchain_scratch, #disp_indir */
+ buf = s390_tchain_load64(buf, S390_REGNO_TCHAIN_SCRATCH,
+ Ptr_to_ULong(disp_cp_xindir));
+ /* BR *tchain_direct */
+ buf = s390_emit_BCR(buf, S390_CC_ALWAYS, S390_REGNO_TCHAIN_SCRATCH);
+
+ /* Fix up the conditional jump, if there was one. */
+ if (cond != S390_CC_ALWAYS) {
+ Int delta = buf - ptmp;
+
+ delta >>= 1; /* immediate constant is #half-words */
+ vassert(delta > 0 && delta < (1 << 16));
+ s390_emit_BRC(ptmp, s390_cc_invert(cond), delta);
+ }
+
+ return buf;
+}
+
+static UChar *
+s390_insn_xassisted_emit(UChar *buf, const s390_insn *insn,
+ void *disp_cp_xassisted)
+{
+ /* Use ptmp for backpatching conditional jumps. */
+ UChar *ptmp = buf;
+
+ /* First off, if this is conditional, create a conditional
+ jump over the rest of it. */
+ s390_cc_t cond = insn->variant.xdirect.cond;
+
+ if (cond != S390_CC_ALWAYS) {
+ /* So we have something like this
+ if (cond) do_xdirect;
+ Y: ...
+ We convert this into
+ if (! cond) goto Y; // BRC opcode; 4 bytes
+ do_xdirect;
+ Y:
+ */
+ /* 4 bytes (a BRC insn) to be filled in here */
+ buf += 4;
+ }
+
+ /* Update the guest IA with the address in xassisted.dst. */
+ const s390_amode *amode = insn->variant.xassisted.guest_IA;
+
+ vassert(amode->tag == S390_AMODE_B12 || amode->tag == S390_AMODE_BX12);
+ UInt b = hregNumber(amode->b);
+ UInt x = hregNumber(amode->x); /* 0 for B12 and B20 */
+ UInt d = amode->d;
+ UInt regno = hregNumber(insn->variant.xassisted.dst);
+
+ buf = s390_emit_STG(buf, regno, x, b, DISP20(d));
+
+ UInt trcval = 0;
+
+ switch (insn->variant.xassisted.kind) {
+ case Ijk_ClientReq: trcval = VEX_TRC_JMP_CLIENTREQ; break;
+ case Ijk_Sys_syscall: trcval = VEX_TRC_JMP_SYS_SYSCALL; break;
+ case Ijk_Yield: trcval = VEX_TRC_JMP_YIELD; break;
+ case Ijk_EmWarn: trcval = VEX_TRC_JMP_EMWARN; break;
+ case Ijk_MapFail: trcval = VEX_TRC_JMP_MAPFAIL; break;
+ case Ijk_NoDecode: trcval = VEX_TRC_JMP_NODECODE; break;
+ case Ijk_TInval: trcval = VEX_TRC_JMP_TINVAL; break;
+ case Ijk_NoRedir: trcval = VEX_TRC_JMP_NOREDIR; break;
+ case Ijk_SigTRAP: trcval = VEX_TRC_JMP_SIGTRAP; break;
+ case Ijk_SigSEGV: trcval = VEX_TRC_JMP_SIGSEGV; break;
+ case Ijk_Boring: trcval = VEX_TRC_JMP_BORING; break;
+ /* We don't expect to see the following being assisted. */
+ case Ijk_Ret:
+ case Ijk_Call:
+ /* fallthrough */
+ default:
+ ppIRJumpKind(insn->variant.xassisted.kind);
+ vpanic("s390_insn_xassisted_emit: unexpected jump kind");
+ }
+
+ vassert(trcval != 0);
+
+ /* guest_state_pointer = trcval */
+ buf = s390_emit_LGHI(buf, S390_REGNO_GUEST_STATE_POINTER, trcval);
+
+ /* load tchain_scratch, #disp_assisted */
+ buf = s390_tchain_load64(buf, S390_REGNO_TCHAIN_SCRATCH,
+ Ptr_to_ULong(disp_cp_xassisted));
+
+ /* BR *tchain_direct */
+ buf = s390_emit_BCR(buf, S390_CC_ALWAYS, S390_REGNO_TCHAIN_SCRATCH);
+
+ /* Fix up the conditional jump, if there was one. */
+ if (cond != S390_CC_ALWAYS) {
+ Int delta = buf - ptmp;
+
+ delta >>= 1; /* immediate constant is #half-words */
+ vassert(delta > 0 && delta < (1 << 16));
+ s390_emit_BRC(ptmp, s390_cc_invert(cond), delta);
+ }
+
+ return buf;
+}
+
+
+/* Pseudo code:
+
+ guest_state[host_EvC_COUNTER] -= 1;
+ if (guest_state[host_EvC_COUNTER] >= 0) goto nofail;
+ goto guest_state[host_EvC_FAILADDR];
+ nofail: ;
+
+ The dispatch counter is a 32-bit value. */
+static UChar *
+s390_insn_evcheck_emit(UChar *buf, const s390_insn *insn)
+{
+ s390_amode *amode;
+ UInt b, x, d;
+ UChar *code_begin, *code_end;
+
+ code_begin = buf;
+
+ amode = insn->variant.evcheck.counter;
+ vassert(amode->tag == S390_AMODE_B12 || amode->tag == S390_AMODE_BX12);
+ b = hregNumber(amode->b);
+ x = hregNumber(amode->x); /* 0 for B12 and B20 */
+ d = amode->d;
+
+ /* Decrement the dispatch counter in the guest state */
+ /* fixs390: ASI if available */
+ buf = s390_emit_LHI(buf, R0, -1); /* 4 bytes */
+ buf = s390_emit_A(buf, R0, x, b, d); /* 4 bytes */
+ buf = s390_emit_ST(buf, R0, x, b, d); /* 4 bytes */
+
+ /* Jump over the next insn if >= 0 */
+ buf = s390_emit_BRC(buf, S390_CC_HE, (4 + 6 + 2) / 2); /* 4 bytes */
+
+ /* Computed goto to fail_address */
+ amode = insn->variant.evcheck.fail_addr;
+ b = hregNumber(amode->b);
+ x = hregNumber(amode->x); /* 0 for B12 and B20 */
+ d = amode->d;
+ buf = s390_emit_LG(buf, S390_REGNO_TCHAIN_SCRATCH, x, b, DISP20(d)); /* 6 bytes */
+ buf = s390_emit_BCR(buf, S390_CC_ALWAYS, S390_REGNO_TCHAIN_SCRATCH); /* 2 bytes */
+
+ code_end = buf;
+
+ /* Make sure the size of the generated code is identical to the size
+ returned by evCheckSzB_S390 */
+ vassert(evCheckSzB_S390() == code_end - code_begin);
+
+ return buf;
+}
+
+
+static UChar *
+s390_insn_profinc_emit(UChar *buf,
+ const s390_insn *insn __attribute__((unused)))
+{
+ /* Generate a code template to increment a memory location whose
+ address will be known later as an immediate value. This code
+ template will be patched once the memory location is known.
+ For now we do this with address == 0. */
+ buf = s390_tchain_load64(buf, S390_REGNO_TCHAIN_SCRATCH, 0);
+ buf = s390_emit_LGHI(buf, R0, 1);
+ buf = s390_emit_AG( buf, R0, 0, S390_REGNO_TCHAIN_SCRATCH, DISP20(0));
+ buf = s390_emit_STG(buf, R0, 0, S390_REGNO_TCHAIN_SCRATCH, DISP20(0));
+
+ return buf;
+}
+
+
Int
-emit_S390Instr(UChar *buf, Int nbuf, s390_insn *insn, Bool mode64,
- void *dispatch_unassisted, void *dispatch_assisted)
+emit_S390Instr(Bool *is_profinc, UChar *buf, Int nbuf, s390_insn *insn,
+ Bool mode64, void *disp_cp_chain_me_to_slowEP,
+ void *disp_cp_chain_me_to_fastEP, void *disp_cp_xindir,
+ void *disp_cp_xassisted)
{
UChar *end;
@@ -7230,12 +7677,6 @@
end = s390_insn_compare_emit(buf, insn);
break;
- case S390_INSN_BRANCH:
- vassert(dispatch_unassisted == NULL);
- vassert(dispatch_assisted == NULL);
- end = s390_insn_branch_emit(buf, insn);
- break;
-
case S390_INSN_HELPER_CALL:
end = s390_insn_helper_call_emit(buf, insn);
break;
@@ -7288,6 +7729,30 @@
end = s390_insn_gadd_emit(buf, insn);
break;
+ case S390_INSN_PROFINC:
+ end = s390_insn_profinc_emit(buf, insn);
+ /* Tell the caller .. */
+ vassert(*is_profinc == False);
+ *is_profinc = True;
+ break;
+
+ case S390_INSN_EVCHECK:
+ end = s390_insn_evcheck_emit(buf, insn);
+ break;
+
+ case S390_INSN_XDIRECT:
+ end = s390_insn_xdirect_emit(buf, insn, disp_cp_chain_me_to_slowEP,
+ disp_cp_chain_me_to_fastEP);
+ break;
+
+ case S390_INSN_XINDIR:
+ end = s390_insn_xindir_emit(buf, insn, disp_cp_xindir);
+ break;
+
+ case S390_INSN_XASSISTED:
+ end = s390_insn_xassisted_emit(buf, insn, disp_cp_xassisted);
+ break;
+
default:
vpanic("emit_S390Instr");
}
@@ -7298,6 +7763,168 @@
}
+/* Return the number of bytes emitted for an S390_INSN_EVCHECK.
+ See s390_insn_evcheck_emit */
+Int
+evCheckSzB_S390(void)
+{
+ return 24;
+}
+
+
+/* Patch the counter address into CODE_TO_PATCH as previously
+ generated by s390_insn_profinc_emit. */
+VexInvalRange
+patchProfInc_S390(void *code_to_patch, ULong *location_of_counter)
+{
+ vassert(sizeof(ULong *) == 8);
+
+ s390_tchain_verify_load64(code_to_patch, S390_REGNO_TCHAIN_SCRATCH, 0);
+
+ s390_tchain_patch_load64(code_to_patch, Ptr_to_ULong(location_of_counter));
+
+ VexInvalRange vir = {0, 0};
+ return vir;
+}
+
+
+/* NB: what goes on here has to be very closely coordinated with the
+ s390_insn_xdirect_emit code above. */
+VexInvalRange
+chainXDirect_S390(void *place_to_chain,
+ void *disp_cp_chain_me_EXPECTED,
+ void *place_to_jump_to)
+{
+ /* What we're expecting to see @ PLACE_TI_CHAIN is:
+
+ load tchain-scratch, #disp_cp_chain_me_EXPECTED
+ BASR 1,S390_REGNO_TCHAIN_SCRATCH
+ */
+ const UChar *next;
+ next = s390_tchain_verify_load64(place_to_chain, S390_REGNO_TCHAIN_SCRATCH,
+ Ptr_to_ULong(disp_cp_chain_me_EXPECTED));
+ vassert(s390_insn_is_BASR(next, 1, S390_REGNO_TCHAIN_SCRATCH));
+
+ /* And what we want to change it to is either:
+ (general case):
+
+ load tchain_scratch, #place_to_jump_to
+ BR *tchain_scratch
+
+ ---OR---
+
+ in the case where the displacement is small enough
+
+ BRCL delta where delta is in half-words
+ invalid opcodes
+
+ In both cases the replacement has the same length as the original.
+ To remain sane & verifiable,
+ (1) limit the displacement for the short form to
+ (say) +/- one billion, so as to avoid wraparound
+ off-by-ones
+ (2) even if the short form is applicable, once every (say)
+ 1024 times use the long form anyway, so as to maintain
+ verifiability
+ */
+
+ /* This is the delta we need to put into a BRCL insn. Note, that the
+ offset in BRCL is in half-words. Hence division by 2. */
+ Long delta = (Long)((UChar *)place_to_jump_to - (UChar *)place_to_chain) / 2;
+ Bool shortOK = delta >= -1000*1000*1000 && delta < 1000*1000*1000;
+
+ static UInt shortCTR = 0; /* DO NOT MAKE NON-STATIC */
+ if (shortOK) {
+ shortCTR++; // thread safety bleh
+ if (0 == (shortCTR & 0x3FF)) {
+ shortOK = False;
+ if (0)
+ vex_printf("QQQ chainXDirect_S390: shortCTR = %u, "
+ "using long jmp\n", shortCTR);
+ }
+ }
+
+ /* And make the modifications. */
+ UChar *p = (UChar *)place_to_chain;
+ if (shortOK) {
+ p = s390_emit_BRCL(p, S390_CC_ALWAYS, delta); /* 6 bytes */
+
+ /* Make sure that BRCL fits into the patchable part of an xdirect
+ code sequence */
+ vassert(6 <= s390_xdirect_patchable_len());
+
+ /* Fill remaining bytes with 0x00 (invalid opcode) */
+ Int i;
+ for (i = 0; i < s390_xdirect_patchable_len() - 6; ++i)
+ p[i] = 0x00;
+ } else {
+ /*
+ load tchain_scratch, #place_to_jump_to
+ BR *tchain_scratch
+ */
+ ULong addr = Ptr_to_ULong(place_to_jump_to);
+ p = s390_tchain_load64(p, S390_REGNO_TCHAIN_SCRATCH, addr);
+ s390_emit_BCR(p, S390_CC_ALWAYS, S390_REGNO_TCHAIN_SCRATCH);
+ }
+
+ VexInvalRange vir = {0, 0};
+ return vir;
+}
+
+
+/* NB: what goes on here has to be very closely coordinated with the
+ s390_insn_xdirect_emit code above. */
+VexInvalRange
+unchainXDirect_S390(void *place_to_unchain,
+ void *place_to_jump_to_EXPECTED,
+ void *disp_cp_chain_me)
+{
+ /* What we're expecting to see @ PLACE_TO_UNCHAIN:
+
+ load tchain_scratch, #place_to_jump_to_EXPECTED
+ BR *tchain_scratch
+
+ ---OR---
+ in the case where the displacement falls within 32 bits
+
+ BRCL delta
+ invalid opcodes
+ */
+ UChar *p = place_to_unchain;
+
+ if (s390_insn_is_BRCL(p, S390_CC_ALWAYS)) {
+ /* Looks like the short form */
+ Int num_hw = *(Int *)&p[2];
+ Int delta = 2 *num_hw;
+
+ vassert(p + delta == place_to_jump_to_EXPECTED);
+
+ Int i;
+ for (i = 0; i < s390_xdirect_patchable_len() - 6; ++i)
+ vassert(p[6+i] == 0x00);
+ } else {
+ /* Should be the long form */
+ const UChar *next;
+
+ next = s390_tchain_verify_load64(p, S390_REGNO_TCHAIN_SCRATCH,
+ Ptr_to_ULong(place_to_jump_to_EXPECTED));
+ /* Check for BR *tchain_scratch */
+ vassert(s390_insn_is_BR(next, S390_REGNO_TCHAIN_SCRATCH));
+ }
+
+ /* And what we want to change it to is:
+
+ load tchain_scratch, #disp_cp_chain_me
+ call *tchain_scratch
+ */
+ ULong addr = Ptr_to_ULong(disp_cp_chain_me);
+ p = s390_tchain_load64(p, S390_REGNO_TCHAIN_SCRATCH, addr);
+ s390_emit_BASR(p, 1, S390_REGNO_TCHAIN_SCRATCH);
+
+ VexInvalRange vir = {0, 0};
+ return vir;
+}
+
/*---------------------------------------------------------------*/
/*--- end host_s390_defs.c ---*/
/*---------------------------------------------------------------*/
Property changed: trunk/priv/host_generic_regs.h (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Property changed: trunk/priv/host_generic_regs.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/priv/guest_s390_helpers.c (+2 -0)
===================================================================
--- trunk/priv/guest_s390_helpers.c 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/guest_s390_helpers.c 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -130,6 +130,8 @@
state->guest_TILEN = 0;
state->guest_IP_AT_SYSCALL = 0;
state->guest_EMWARN = EmWarn_NONE;
+ state->host_EvC_COUNTER = 0;
+ state->host_EvC_FAILADDR = 0;
/*------------------------------------------------------------*/
/*--- Initialise thunk ---*/
Modified: trunk/priv/guest_s390_defs.h (+0 -1)
===================================================================
--- trunk/priv/guest_s390_defs.h 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/guest_s390_defs.h 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -43,7 +43,6 @@
/* Convert one s390 insn to IR. See the type DisOneInstrFn in
bb_to_IR.h. */
DisResult disInstr_S390 ( IRSB* irbb,
- Bool put_IP,
Bool (*resteerOkFn) ( void*, Addr64 ),
Bool resteerCisOk,
void* callback_opaque,
Modified: trunk/priv/host_s390_isel.c (+151 -18)
===================================================================
--- trunk/priv/host_s390_isel.c 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/host_s390_isel.c 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -69,6 +69,18 @@
- The host subarchitecture we are selecting insns for.
This is set at the start and does not change.
+ - A Bool for indicating whether we may generate chain-me
+ instructions for control flow transfers, or whether we must use
+ XAssisted.
+
+ - The maximum guest address of any guest insn in this block.
+ Actually, the address of the highest-addressed byte from any insn
+ in this block. Is set at the start and does not change. This is
+ used for detecting jumps which are definitely forward-edges from
+ this block, and therefore can be made (chained) to the fast entry
+ point of the destination, thereby avoiding the destination's
+ event check.
+
- A flag to indicate whether the guest IA has been assigned to.
- Values of certain guest registers which are often assigned constants.
@@ -92,16 +104,19 @@
typedef struct {
IRTypeEnv *type_env;
+ HInstrArray *code;
HReg *vregmap;
HReg *vregmapHI;
UInt n_vregmap;
+ UInt vreg_ctr;
+ UInt hwcaps;
- HInstrArray *code;
-
ULong old_value[NUM_TRACKED_REGS];
- UInt vreg_ctr;
- UInt hwcaps;
+ /* The next two are for translation chaining */
+ Addr64 max_ga;
+ Bool chaining_allowed;
+
Bool first_IA_assignment;
Bool old_value_valid[NUM_TRACKED_REGS];
} ISelEnv;
@@ -2437,17 +2452,56 @@
/* --------- EXIT --------- */
case Ist_Exit: {
- s390_opnd_RMI dst;
s390_cc_t cond;
IRConstTag tag = stmt->Ist.Exit.dst->tag;
if (tag != Ico_U64)
vpanic("s390_isel_stmt: Ist_Exit: dst is not a 64-bit value");
- dst = s390_isel_int_expr_RMI(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ s390_amode *guest_IA = s390_amode_for_guest_state(stmt->Ist.Exit.offsIP);
cond = s390_isel_cc(env, stmt->Ist.Exit.guard);
- addInstr(env, s390_insn_branch(stmt->Ist.Exit.jk, cond, dst));
- return;
+
+ /* Case: boring transfer to known address */
+ if (stmt->Ist.Exit.jk == Ijk_Boring) {
+ if (env->chaining_allowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool to_fast_entry
+ = ((Addr64)stmt->Ist.Exit.dst->Ico.U64) > env->max_ga;
+ if (0) vex_printf("%s", to_fast_entry ? "Y" : ",");
+ addInstr(env, s390_insn_xdirect(cond, stmt->Ist.Exit.dst->Ico.U64,
+ guest_IA, to_fast_entry));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an assisted transfer,
+ as that's the only alternative that is allowable. */
+ HReg dst = s390_isel_int_expr(env,
+ IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, s390_insn_xassisted(cond, dst, guest_IA, Ijk_Boring));
+ }
+ return;
+ }
+
+ /* Case: assisted transfer to arbitrary address */
+ switch (stmt->Ist.Exit.jk) {
+ case Ijk_TInval:
+ case Ijk_Sys_syscall:
+ case Ijk_ClientReq:
+ case Ijk_NoRedir:
+ case Ijk_Yield:
+ case Ijk_SigTRAP: {
+ HReg dst = s390_isel_int_expr(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, s390_insn_xassisted(cond, dst, guest_IA,
+ stmt->Ist.Exit.jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Do we ever expect to see any other kind? */
+ goto stmt_fail;
}
/* --------- MEM FENCE --------- */
@@ -2484,20 +2538,80 @@
/*---------------------------------------------------------*/
static void
-iselNext(ISelEnv *env, IRExpr *next, IRJumpKind jk)
+iselNext(ISelEnv *env, IRExpr *next, IRJumpKind jk, int offsIP)
{
- s390_opnd_RMI dst;
-
if (vex_traceflags & VEX_TRACE_VCODE) {
- vex_printf("\n-- goto {");
+ vex_printf("\n-- PUT(%d) = ", offsIP);
+ ppIRExpr(next);
+ vex_printf("; exit-");
ppIRJumpKind(jk);
- vex_printf("} ");
- ppIRExpr(next);
vex_printf("\n");
}
- dst = s390_isel_int_expr_RMI(env, next);
- addInstr(env, s390_insn_branch(jk, S390_CC_ALWAYS, dst));
+ s390_amode *guest_IA = s390_amode_for_guest_state(offsIP);
+
+ /* Case: boring transfer to known address */
+ if (next->tag == Iex_Const) {
+ IRConst *cdst = next->Iex.Const.con;
+ vassert(cdst->tag == Ico_U64);
+ if (jk == Ijk_Boring || jk == Ijk_Call) {
+ /* Boring transfer to known address */
+ if (env->chaining_allowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool to_fast_entry
+ = ((Addr64)cdst->Ico.U64) > env->max_ga;
+ if (0) vex_printf("%s", to_fast_entry ? "X" : ".");
+ addInstr(env, s390_insn_xdirect(S390_CC_ALWAYS, cdst->Ico.U64,
+ guest_IA, to_fast_entry));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an indirect transfer,
+ as that's the cheapest alternative that is allowable. */
+ HReg dst = s390_isel_int_expr(env, next);
+ addInstr(env, s390_insn_xassisted(S390_CC_ALWAYS, dst, guest_IA,
+ Ijk_Boring));
+ }
+ return;
+ }
+ }
+
+ /* Case: call/return (==boring) transfer to any address */
+ switch (jk) {
+ case Ijk_Boring:
+ case Ijk_Ret:
+ case Ijk_Call: {
+ HReg dst = s390_isel_int_expr(env, next);
+ if (env->chaining_allowed) {
+ addInstr(env, s390_insn_xindir(S390_CC_ALWAYS, dst, guest_IA));
+ } else {
+ addInstr(env, s390_insn_xassisted(S390_CC_ALWAYS, dst, guest_IA,
+ Ijk_Boring));
+ }
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Case: some other kind of transfer to any address */
+ switch (jk) {
+ case Ijk_TInval:
+ case Ijk_Sys_syscall:
+ case Ijk_ClientReq:
+ case Ijk_NoRedir:
+ case Ijk_Yield:
+ case Ijk_SigTRAP: {
+ HReg dst = s390_isel_int_expr(env, next);
+ addInstr(env, s390_insn_xassisted(S390_CC_ALWAYS, dst, guest_IA, jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ vpanic("iselNext");
}
@@ -2509,7 +2623,9 @@
HInstrArray *
iselSB_S390(IRSB *bb, VexArch arch_host, VexArchInfo *archinfo_host,
- VexAbiInfo *vbi)
+ VexAbiInfo *vbi, Int offset_host_evcheck_counter,
+ Int offset_host_evcheck_fail_addr, Bool chaining_allowed,
+ Bool add_profinc, Addr64 max_ga)
{
UInt i, j;
HReg hreg, hregHI;
@@ -2552,6 +2668,9 @@
/* and finally ... */
env->hwcaps = hwcaps_host;
+ env->max_ga = max_ga;
+ env->chaining_allowed = chaining_allowed;
+
/* For each IR temporary, allocate a suitably-kinded virtual
register. */
j = 0;
@@ -2595,12 +2714,26 @@
}
env->vreg_ctr = j;
+ /* The very first instruction must be an event check. */
+ s390_amode *counter, *fail_addr;
+ counter = s390_amode_for_guest_state(offset_host_evcheck_counter);
+ fail_addr = s390_amode_for_guest_state(offset_host_evcheck_fail_addr);
+ addInstr(env, s390_insn_evcheck(counter, fail_addr));
+
+ /* Possibly a block counter increment (for profiling). At this
+ point we don't know the address of the counter, so just pretend
+ it is zero. It will have to be patched later, but before this
+ translation is used, by a call to LibVEX_patchProfInc. */
+ if (add_profinc) {
+ addInstr(env, s390_insn_profinc());
+ }
+
/* Ok, finally we can iterate over the statements. */
for (i = 0; i < bb->stmts_used; i++)
if (bb->stmts[i])
s390_isel_stmt(env, bb->stmts[i]);
- iselNext(env, bb->next, bb->jumpkind);
+ iselNext(env, bb->next, bb->jumpkind, bb->offsIP);
/* Record the number of vregs we used. */
env->code->n_vregs = env->vreg_ctr;
Property changed: trunk/priv/guest_arm_toIR.c (+0 -0)
___________________________________________________________________
Name: svn:mergeinfo
-
Modified: trunk/priv/guest_arm_toIR.c (+162 -172)
===================================================================
--- trunk/priv/guest_arm_toIR.c 2012-04-20 23:33:44 +01:00 (rev 2295)
+++ trunk/priv/guest_arm_toIR.c 2012-04-21 00:58:17 -23:00 (rev 2296)
@@ -1398,7 +1398,8 @@
stmt( IRStmt_Exit(
unop(Iop_Not1, unop(Iop_32to1, mkexpr(guardT))),
Ijk_Boring,
- IRConst_U32(toUInt(guest_R15_curr_instr_notENC + 4))
+ IRConst_U32(toUInt(guest_R15_curr_instr_notENC + 4)),
+ OFFB_R15T
));
}
@@ -1414,7 +1415,8 @@
stmt( IRStmt_Exit(
unop(Iop_Not1, unop(Iop_32to1, mkexpr(guardT))),
Ijk_Boring,
- IRConst_U32(toUInt((guest_R15_curr_instr_notENC + 2) | 1))
+ IRConst_U32(toUInt((guest_R15_curr_instr_notENC + 2) | 1)),
+ OFFB_R15T
));
}
@@ -1431,7 +1433,8 @@
stmt( IRStmt_Exit(
unop(Iop_Not1, unop(Iop_32to1, mkexpr(guardT))),
Ijk_Boring,
- IRConst_U32(toUInt((guest_R15_curr_instr_notENC + 4) | 1))
+ IRConst_U32(toUInt((guest_R15_curr_instr_notENC + 4) | 1)),
+ OFFB_R15T
));
}
@@ -1448,7 +1451,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, mkexpr(t), mkU32(0)),
Ijk_NoDecode,
- IRConst_U32(toUInt(guest_R15_curr_instr_notENC | 1))
+ IRConst_U32(toUInt(guest_R15_curr_instr_notENC | 1)),
+ OFFB_R15T
)
);
}
@@ -11962,9 +11966,9 @@
UInt dst = guest_R15_curr_instr_notENC + 8 + (simm24 | 1);
putIRegA( 14, mkU32(guest_R15_curr_instr_notENC + 4),
IRTemp_INVALID/*because AL*/, Ijk_Boring );
- irsb->next = mkU32(dst);
- irsb->jumpkind = Ijk_Call;
- dres->whatNext = Dis_StopHere;
+ llPutIReg(15, mkU32(dst));
+ dres->jk_StopHere = Ijk_Call;
+ dres->whatNext = Dis_StopHere;
DIP("blx 0x%x (and switch to Thumb mode)\n", dst - 1);
return True;
}
@@ -12040,7 +12044,6 @@
static
DisResult disInstr_ARM_WRK (
- Bool put_IP,
Bool (*resteerOkFn) ( /*opaque*/void*, Addr64 ),
Bool resteerCisOk,
void* callback_opaque,
@@ -12066,9 +12069,10 @@
// etc etc
/* Set result defaults. */
- dres.whatNext = Dis_Continue;
- dres.len = 4;
- dres.continueAt = 0;
+ dres.whatNext = Dis_Continue;
+ dres.len = 4;
+ dres.continueAt = 0;
+ dres.jk_StopHere = Ijk_INVALID;
/* Set default actions for post-insn handling of writes to r15, if
required. */
@@ -12085,11 +12089,7 @@
DIP("\t(arm) 0x%x: ", (UInt)guest_R15_curr_instr_notENC);
- /* We may be asked to update the guest R15 before going further. */
vassert(0 == (guest_R15_curr_instr_notENC & 3));
- if (put_IP) {
- llPutIReg( 15, mkU32(guest_R15_curr_instr_notENC) );
- }
/* ----------------------------------------------------------- */
@@ -12116,9 +12116,9 @@
/* orr r10,r10,r10 */) {
/* R3 = client_request ( R4 ) */
DIP("r3 = client_request ( %%r4 )\n");
- irsb->next = mkU32( guest_R15_curr_instr_notENC + 20 );
- irsb->jumpkind = Ijk_ClientReq;
- dres.whatNext = Dis_StopHere;
+ llPutIReg(15, mkU32( guest_R15_curr_instr_notENC + 20 ));
+ dres.jk_StopHere = Ijk_ClientReq;
+ dres.whatNext = Dis_StopHere;
goto decode_success;
}
else
@@ -12136,9 +12136,9 @@
/* branch-and-link-to-noredir R4 */
DIP("branch-and-link-to-noredir r4\n");
llPutIReg(14, mkU32( guest_R15_curr_instr_notENC + 20) );
- irsb->next = llGetIReg(4);
- irsb->jumpkind = Ijk_NoRedir;
- dres.whatNext = Dis_StopHere;
+ llPutIReg(15, llGetIReg(4));
+ dres.jk_StopHere = Ijk_NoRedir;
+ dres.whatNext = Dis_StopHere;
goto decode_success;
}
/* We don't know what it is. Set opc1/opc2 so decode_failure
@@ -12977,9 +12977,9 @@
dres.continueA...
[truncated message content] |
|
From: <sv...@va...> - 2012-04-20 22:33:51
|
sewardj 2012-04-20 23:33:44 +0100 (Fri, 20 Apr 2012)
New Revision: 2295
Log:
Add a spec rule for NE after COPY.
Modified files:
branches/TCHAIN/priv/guest_arm_helpers.c
Modified: branches/TCHAIN/priv/guest_arm_helpers.c (+12 -0)
===================================================================
--- branches/TCHAIN/priv/guest_arm_helpers.c 2012-04-20 23:32:34 +01:00 (rev 2294)
+++ branches/TCHAIN/priv/guest_arm_helpers.c 2012-04-20 23:33:44 +01:00 (rev 2295)
@@ -697,6 +697,18 @@
mkU32(1)));
}
+ /*---------------- COPY ----------------*/
+
+ if (isU32(cond_n_op, (ARMCondNE << 4) | ARMG_CC_OP_COPY)) {
+ /* NE after COPY --> ((cc_dep1 >> ARMG_CC_SHIFT_Z) ^ 1) & 1 */
+ return binop(Iop_And32,
+ binop(Iop_Xor32,
+ binop(Iop_Shr32, cc_dep1,
+ mkU8(ARMG_CC_SHIFT_Z)),
+ mkU32(1)),
+ mkU32(1));
+ }
+
/*----------------- AL -----------------*/
/* A critically important case for Thumb code.
|
|
From: <sv...@va...> - 2012-04-20 22:32:41
|
sewardj 2012-04-20 23:32:34 +0100 (Fri, 20 Apr 2012)
New Revision: 2294
Log:
Comment-only change.
Modified files:
branches/TCHAIN/priv/guest_arm_defs.h
Modified: branches/TCHAIN/priv/guest_arm_defs.h (+1 -1)
===================================================================
--- branches/TCHAIN/priv/guest_arm_defs.h 2012-04-20 16:41:33 +01:00 (rev 2293)
+++ branches/TCHAIN/priv/guest_arm_defs.h 2012-04-20 23:32:34 +01:00 (rev 2294)
@@ -156,7 +156,7 @@
OP DEP1 DEP2 DEP3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- OP_COPY current NZCV unused unused
+ OP_COPY curr_NZCV:28x0 unused unused
OP_ADD argL argR unused
OP_SUB argL argR unused
OP_ADC argL argR 31x0:old_C
|
|
From: <sv...@va...> - 2012-04-20 15:42:25
|
sewardj 2012-04-20 16:42:12 +0100 (Fri, 20 Apr 2012)
New Revision: 12516
Log:
Add a missing included, needed for ppc targets.
Modified files:
branches/TCHAIN/coregrind/m_libcproc.c
Modified: branches/TCHAIN/coregrind/m_libcproc.c (+1 -0)
===================================================================
--- branches/TCHAIN/coregrind/m_libcproc.c 2012-04-20 15:07:34 +01:00 (rev 12515)
+++ branches/TCHAIN/coregrind/m_libcproc.c 2012-04-20 16:42:12 +01:00 (rev 12516)
@@ -29,6 +29,7 @@
*/
#include "pub_core_basics.h"
+#include "pub_core_machine.h" // For VG_(machine_get_VexArchInfo)
#include "pub_core_vki.h"
#include "pub_core_vkiscnums.h"
#include "pub_core_libcbase.h"
|
|
From: <sv...@va...> - 2012-04-20 15:41:45
|
sewardj 2012-04-20 16:41:33 +0100 (Fri, 20 Apr 2012)
New Revision: 2293
Log:
Avoid word-size warnings when this is compiled on 64 bit platforms.
Modified files:
branches/TCHAIN/priv/host_arm_defs.c
Modified: branches/TCHAIN/priv/host_arm_defs.c (+3 -3)
===================================================================
--- branches/TCHAIN/priv/host_arm_defs.c 2012-04-20 11:42:24 +01:00 (rev 2292)
+++ branches/TCHAIN/priv/host_arm_defs.c 2012-04-20 16:41:33 +01:00 (rev 2293)
@@ -4512,7 +4512,7 @@
E1 2F FF 3C
*/
UInt* p = (UInt*)place_to_chain;
- vassert(0 == (3 & (UInt)p));
+ vassert(0 == (3 & (HWord)p));
vassert(is_imm32_to_iregNo_EXACTLY2(
p, /*r*/12, (UInt)Ptr_to_ULong(disp_cp_chain_me_EXPECTED)));
vassert(p[2] == 0xE12FFF3C);
@@ -4548,7 +4548,7 @@
E1 2F FF 1C
*/
UInt* p = (UInt*)place_to_unchain;
- vassert(0 == (3 & (UInt)p));
+ vassert(0 == (3 & (HWord)p));
vassert(is_imm32_to_iregNo_EXACTLY2(
p, /*r*/12, (UInt)Ptr_to_ULong(place_to_jump_to_EXPECTED)));
vassert(p[2] == 0xE12FFF1C);
@@ -4575,7 +4575,7 @@
{
vassert(sizeof(ULong*) == 4);
UInt* p = (UInt*)place_to_patch;
- vassert(0 == (3 & (UInt)p));
+ vassert(0 == (3 & (HWord)p));
vassert(is_imm32_to_iregNo_EXACTLY2(p, /*r*/12, 0x65556555));
vassert(p[2] == 0xE59CB000);
vassert(p[3] == 0xE29BB001);
|
|
From: <sv...@va...> - 2012-04-20 14:07:50
|
tom 2012-04-20 15:07:34 +0100 (Fri, 20 Apr 2012)
New Revision: 12515
Log:
Implement accept4 on ARM systems.
Modified files:
trunk/coregrind/m_syswrap/syswrap-arm-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-arm-linux.c (+30 -1)
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-arm-linux.c 2012-04-20 11:43:08 +01:00 (rev 12514)
+++ trunk/coregrind/m_syswrap/syswrap-arm-linux.c 2012-04-20 15:07:34 +01:00 (rev 12515)
@@ -307,6 +307,7 @@
DECL_TEMPLATE(arm_linux, sys_getsockopt);
DECL_TEMPLATE(arm_linux, sys_connect);
DECL_TEMPLATE(arm_linux, sys_accept);
+DECL_TEMPLATE(arm_linux, sys_accept4);
DECL_TEMPLATE(arm_linux, sys_sendto);
DECL_TEMPLATE(arm_linux, sys_recvfrom);
//XXX: Semaphore code ripped from AMD64.
@@ -393,6 +394,13 @@
break;
}
+ case VKI_SYS_ACCEPT4: {
+ /*int accept(int s, struct sockaddr *add, int *addrlen, int flags)*/
+ PRE_MEM_READ( "socketcall.accept4(args)", ARG2, 4*sizeof(Addr) );
+ ML_(generic_PRE_sys_accept)( tid, ARG2_0, ARG2_1, ARG2_2 );
+ break;
+ }
+
case VKI_SYS_SENDTO:
/* int sendto(int s, const void *msg, int len,
unsigned int flags,
@@ -538,7 +546,9 @@
break;
case VKI_SYS_ACCEPT:
+ case VKI_SYS_ACCEPT4:
/* int accept(int s, struct sockaddr *addr, int *addrlen); */
+ /* int accept4(int s, struct sockaddr *addr, int *addrlen, int flags); */
r = ML_(generic_POST_sys_accept)( tid, VG_(mk_SysRes_Success)(RES),
ARG2_0, ARG2_1, ARG2_2 );
SET_STATUS_from_SysRes(r);
@@ -668,6 +678,23 @@
SET_STATUS_from_SysRes(r);
}
+PRE(sys_accept4)
+{
+ *flags |= SfMayBlock;
+ PRINT("sys_accept4 ( %ld, %#lx, %ld, %ld )",ARG1,ARG2,ARG3,ARG4);
+ PRE_REG_READ4(long, "accept4",
+ int, s, struct sockaddr *, addr, int, *addrlen, int, flags);
+ ML_(generic_PRE_sys_accept)(tid, ARG1,ARG2,ARG3);
+}
+POST(sys_accept4)
+{
+ SysRes r;
+ vg_assert(SUCCESS);
+ r = ML_(generic_POST_sys_accept)(tid, VG_(mk_SysRes_Success)(RES),
+ ARG1,ARG2,ARG3);
+ SET_STATUS_from_SysRes(r);
+}
+
PRE(sys_sendto)
{
*flags |= SfMayBlock;
@@ -1816,7 +1843,9 @@
LINXY(__NR_epoll_create1, sys_epoll_create1), // 357
LINXY(__NR_pipe2, sys_pipe2), // 359
- LINXY(__NR_inotify_init1, sys_inotify_init1) // 360
+ LINXY(__NR_inotify_init1, sys_inotify_init1), // 360
+
+ PLAXY(__NR_accept4, sys_accept4) // 366
};
|
|
From: <sv...@va...> - 2012-04-20 10:43:19
|
sewardj 2012-04-20 11:43:08 +0100 (Fri, 20 Apr 2012)
New Revision: 12514
Log:
Changes needed to make t-chaining work on ppc64-linux (valgrind side).
Modified files:
branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S
branches/TCHAIN/coregrind/m_translate.c
branches/TCHAIN/coregrind/m_transtab.c
branches/TCHAIN/memcheck/mc_main.c
Modified: branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S (+62 -61)
===================================================================
--- branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S 2012-04-20 03:19:35 +01:00 (rev 12513)
+++ branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S 2012-04-20 11:43:08 +01:00 (rev 12514)
@@ -98,28 +98,6 @@
/* New stack frame */
stdu 1,-624(1) /* sp should maintain 16-byte alignment */
- /* Save callee-saved registers... */
-
- /* Floating-point reg save area : 144 bytes */
- stfd 31,616(1)
- stfd 30,608(1)
- stfd 29,600(1)
- stfd 28,592(1)
- stfd 27,584(1)
- stfd 26,576(1)
- stfd 25,568(1)
- stfd 24,560(1)
- stfd 23,552(1)
- stfd 22,544(1)
- stfd 21,536(1)
- stfd 20,528(1)
- stfd 19,520(1)
- stfd 18,512(1)
- stfd 17,504(1)
- stfd 16,496(1)
- stfd 15,488(1)
- stfd 14,480(1)
-
/* General reg save area : 152 bytes */
std 31,472(1)
std 30,464(1)
@@ -142,6 +120,27 @@
std 13,328(1)
std 3,104(1) /* save two_words for later */
+ /* Save callee-saved registers... */
+ /* Floating-point reg save area : 144 bytes */
+ stfd 31,616(1)
+ stfd 30,608(1)
+ stfd 29,600(1)
+ stfd 28,592(1)
+ stfd 27,584(1)
+ stfd 26,576(1)
+ stfd 25,568(1)
+ stfd 24,560(1)
+ stfd 23,552(1)
+ stfd 22,544(1)
+ stfd 21,536(1)
+ stfd 20,528(1)
+ stfd 19,520(1)
+ stfd 18,512(1)
+ stfd 17,504(1)
+ stfd 16,496(1)
+ stfd 15,488(1)
+ stfd 14,480(1)
+
/* It's necessary to save/restore VRSAVE in the AIX / Darwin ABI.
The Linux kernel might not actually use VRSAVE for its intended
purpose, but it should be harmless to preserve anyway. */
@@ -252,6 +251,9 @@
hold another word (for CHAIN_ME exits, the
address of the place to patch.) */
+ /* undo the "make a stack frame for the code we are calling" */
+ addi 1,1,48
+
/* We're leaving. Check that nobody messed with
VSCR or FPSCR in ways we don't expect. */
/* Using r11 - value used again further on, so don't trash! */
@@ -292,8 +294,44 @@
/* fall through */
.remove_frame:
+ /* r11 already holds VG_(machine_ppc32_has_VMX) value */
+ cmplwi 11,0
+ beq .LafterVMX9
+
+ /* Restore Altivec regs.
+ Use r5 as scratch since r6/r7 are live. */
+ /* VRSAVE */
+ lwz 5,324(1)
+ mfspr 5,256 /* VRSAVE reg is spr number 256 */
+
+ /* Vector regs */
+ li 5,304
+ lvx 31,5,1
+ li 5,288
+ lvx 30,5,1
+ li 5,272
+ lvx 29,5,1
+ li 5,256
+ lvx 28,5,1
+ li 5,240
+ lvx 27,5,1
+ li 5,224
+ lvx 26,5,1
+ li 5,208
+ lvx 25,5,1
+ li 5,192
+ lvx 24,5,1
+ li 5,176
+ lvx 23,5,1
+ li 5,160
+ lvx 22,5,1
+ li 5,144
+ lvx 21,5,1
+ li 5,128
+ lvx 20,5,1
+.LafterVMX9:
+
/* Restore FP regs */
-
/* Floating-point regs */
lfd 31,616(1)
lfd 30,608(1)
@@ -314,44 +352,7 @@
lfd 15,488(1)
lfd 14,480(1)
- /* r11 already holds VG_(machine_ppc32_has_VMX) value */
- cmplwi 11,0
- beq .LafterVMX9
-
- /* Restore Altivec regs */
- /* VRSAVE */
- lwz 4,324(1)
- mfspr 4,256 /* VRSAVE reg is spr number 256 */
-
- /* Vector regs */
- li 4,304
- lvx 31,4,1
- li 4,288
- lvx 30,4,1
- li 4,272
- lvx 29,4,1
- li 4,256
- lvx 28,4,1
- li 4,240
- lvx 27,4,1
- li 4,224
- lvx 26,4,1
- li 4,208
- lvx 25,4,1
- li 4,192
- lvx 24,4,1
- li 4,176
- lvx 23,4,1
- li 4,160
- lvx 22,4,1
- li 4,144
- lvx 21,4,1
- li 4,128
- lvx 20,4,1
-.LafterVMX9:
-
/* restore int regs, including importantly r3 (two_words) */
- addi 1,1,48
ld 31,472(1)
ld 30,464(1)
ld 29,456(1)
@@ -371,7 +372,7 @@
ld 15,344(1)
ld 14,336(1)
ld 13,328(1)
- std 3,104(1)
+ ld 3,104(1)
/* Stash return values */
std 6,0(3)
std 7,8(3)
Modified: branches/TCHAIN/coregrind/m_transtab.c (+8 -5)
===================================================================
--- branches/TCHAIN/coregrind/m_transtab.c 2012-04-20 03:19:35 +01:00 (rev 12513)
+++ branches/TCHAIN/coregrind/m_transtab.c 2012-04-20 11:43:08 +01:00 (rev 12514)
@@ -753,11 +753,14 @@
/* Get VEX to do the patching itself. We have to hand it off
since it is host-dependent. */
VexInvalRange vir
- = LibVEX_Chain( vex_arch,
- from__patch_addr,
- to_fastEP ? &VG_(disp_cp_chain_me_to_fastEP)
- : &VG_(disp_cp_chain_me_to_slowEP),
- (void*)host_code );
+ = LibVEX_Chain(
+ vex_arch,
+ from__patch_addr,
+ VG_(fnptr_to_fnentry)(
+ to_fastEP ? &VG_(disp_cp_chain_me_to_fastEP)
+ : &VG_(disp_cp_chain_me_to_slowEP)),
+ (void*)host_code
+ );
VG_(invalidate_icache)( (void*)vir.start, vir.len );
/* Now do the tricky bit -- update the ch_succs and ch_preds info
Modified: branches/TCHAIN/memcheck/mc_main.c (+1 -1)
===================================================================
--- branches/TCHAIN/memcheck/mc_main.c 2012-04-20 03:19:35 +01:00 (rev 12513)
+++ branches/TCHAIN/memcheck/mc_main.c 2012-04-20 11:43:08 +01:00 (rev 12514)
@@ -3951,7 +3951,7 @@
static void mc_post_reg_write ( CorePart part, ThreadId tid,
PtrdiffT offset, SizeT size)
{
-# define MAX_REG_WRITE_SIZE 1664
+# define MAX_REG_WRITE_SIZE 1680
UChar area[MAX_REG_WRITE_SIZE];
tl_assert(size <= MAX_REG_WRITE_SIZE);
VG_(memset)(area, V_BITS8_DEFINED, size);
Modified: branches/TCHAIN/coregrind/m_translate.c (+3 -2)
===================================================================
--- branches/TCHAIN/coregrind/m_translate.c 2012-04-20 03:19:35 +01:00 (rev 12513)
+++ branches/TCHAIN/coregrind/m_translate.c 2012-04-20 11:43:08 +01:00 (rev 12514)
@@ -1106,6 +1106,7 @@
# if defined(VGP_ppc64_linux)
Int offB_GPR2 = offsetof(VexGuestPPC64State,guest_GPR2);
Int offB_LR = offsetof(VexGuestPPC64State,guest_LR);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
IRTemp old_R2 = newIRTemp( bb->tyenv, Ity_I64 );
IRTemp old_LR = newIRTemp( bb->tyenv, Ity_I64 );
/* Restore R2 */
@@ -1119,8 +1120,8 @@
blr (hence Ijk_Ret); so we should just mark this jump as Boring,
else one _Call will have resulted in two _Rets. */
bb->jumpkind = Ijk_Boring;
- bb->next = IRExpr_Binop(Iop_And64, IRExpr_RdTmp(old_LR), mkU64(~(3ULL)));
-
+ bb->next = IRExpr_Binop(Iop_And64, IRExpr_RdTmp(old_LR), mkU64(~(3ULL)));
+ bb->offsIP = offB_CIA;
# else
# error Platform is not TOC-afflicted, fortunately
# endif
|
|
From: <sv...@va...> - 2012-04-20 10:42:37
|
sewardj 2012-04-20 11:42:24 +0100 (Fri, 20 Apr 2012)
New Revision: 2292
Log:
Changes to make t-chaining work on ppc64-linux. More fun than a
bathtub full of ferrets. (VEX side)
Modified files:
branches/TCHAIN/priv/host_ppc_defs.c
branches/TCHAIN/priv/host_ppc_isel.c
branches/TCHAIN/priv/main_main.c
Modified: branches/TCHAIN/priv/main_main.c (+12 -0)
===================================================================
--- branches/TCHAIN/priv/main_main.c 2012-04-20 03:50:28 +01:00 (rev 2291)
+++ branches/TCHAIN/priv/main_main.c 2012-04-20 11:42:24 +01:00 (rev 2292)
@@ -838,6 +838,10 @@
return chainXDirect_PPC(place_to_chain,
disp_cp_chain_me_EXPECTED,
place_to_jump_to, False/*!mode64*/);
+ case VexArchPPC64:
+ return chainXDirect_PPC(place_to_chain,
+ disp_cp_chain_me_EXPECTED,
+ place_to_jump_to, True/*mode64*/);
default:
vassert(0);
}
@@ -867,6 +871,10 @@
return unchainXDirect_PPC(place_to_unchain,
place_to_jump_to_EXPECTED,
disp_cp_chain_me, False/*!mode64*/);
+ case VexArchPPC64:
+ return unchainXDirect_PPC(place_to_unchain,
+ place_to_jump_to_EXPECTED,
+ disp_cp_chain_me, True/*mode64*/);
default:
vassert(0);
}
@@ -891,6 +899,7 @@
case VexArchS390X:
cached = evCheckSzB_S390(); break;
case VexArchPPC32:
+ case VexArchPPC64:
cached = evCheckSzB_PPC(); break;
default:
vassert(0);
@@ -916,6 +925,9 @@
case VexArchPPC32:
return patchProfInc_PPC(place_to_patch,
location_of_counter, False/*!mode64*/);
+ case VexArchPPC64:
+ return patchProfInc_PPC(place_to_patch,
+ location_of_counter, True/*mode64*/);
default:
vassert(0);
}
Modified: branches/TCHAIN/priv/host_ppc_isel.c (+1 -0)
===================================================================
--- branches/TCHAIN/priv/host_ppc_isel.c 2012-04-20 03:50:28 +01:00 (rev 2291)
+++ branches/TCHAIN/priv/host_ppc_isel.c 2012-04-20 11:42:24 +01:00 (rev 2292)
@@ -4600,6 +4600,7 @@
//case Ijk_MapFail:
//case Ijk_SigSEGV: case Ijk_TInval: case Ijk_EmWarn:
case Ijk_NoDecode: case Ijk_SigBUS: case Ijk_SigTRAP:
+ case Ijk_EmFail:
{
HReg r = iselWordExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst));
addInstr(env, PPCInstr_XAssisted(r, amCIA, cc,
Modified: branches/TCHAIN/priv/host_ppc_defs.c (+6 -5)
===================================================================
--- branches/TCHAIN/priv/host_ppc_defs.c 2012-04-20 03:50:28 +01:00 (rev 2291)
+++ branches/TCHAIN/priv/host_ppc_defs.c 2012-04-20 11:42:24 +01:00 (rev 2292)
@@ -1850,10 +1850,10 @@
case Pin_ProfInc:
if (mode64) {
- vex_printf("(profInc) imm64 r30,$NotKnownYet;");
+ vex_printf("(profInc) imm64-fixed5 r30,$NotKnownYet; ");
vex_printf("ld r29,(r30); addi r29,r29,1; std r29,(r30)");
} else {
- vex_printf("(profInc) imm32 r30,$NotKnownYet;");
+ vex_printf("(profInc) imm32-fixed2 r30,$NotKnownYet; ");
vex_printf("lwz r29,4(r30); addic. r29,r29,1; stw r29,4(r30)");
vex_printf("lwz r29,0(r30); addze r29,r29; stw r29,0(r30)");
}
@@ -3629,6 +3629,7 @@
//case Ijk_Sys_int128: trcval = VEX_TRC_JMP_SYS_INT128; break;
//case Ijk_Yield: trcval = VEX_TRC_JMP_YIELD; break;
case Ijk_EmWarn: trcval = VEX_TRC_JMP_EMWARN; break;
+ case Ijk_EmFail: trcval = VEX_TRC_JMP_EMFAIL; break;
//case Ijk_MapFail: trcval = VEX_TRC_JMP_MAPFAIL; break;
case Ijk_NoDecode: trcval = VEX_TRC_JMP_NODECODE; break;
case Ijk_TInval: trcval = VEX_TRC_JMP_TINVAL; break;
@@ -4620,14 +4621,14 @@
64-bit:
imm64-exactly r30, 0x6555655565556555
ld r29, 0(r30)
- add r29, r29, 1
+ addi r29, r29, 1
std r29, 0(r30)
*/
if (mode64) {
p = mkLoadImm_EXACTLY2or5(
p, /*r*/30, 0x6555655565556555ULL, True/*mode64*/);
p = emit32(p, 0xEBBE0000);
- p = emit32(p, 0x7FBD0A14);
+ p = emit32(p, 0x3BBD0001);
p = emit32(p, 0xFBBE0000);
} else {
p = mkLoadImm_EXACTLY2or5(
@@ -4774,7 +4775,7 @@
vassert(isLoadImm_EXACTLY2or5(p, /*r*/30,
0x6555655565556555ULL, True/*mode64*/));
vassert(fetch32(p + 20) == 0xEBBE0000);
- vassert(fetch32(p + 24) == 0x7FBD0A14);
+ vassert(fetch32(p + 24) == 0x3BBD0001);
vassert(fetch32(p + 28) == 0xFBBE0000);
p = mkLoadImm_EXACTLY2or5(p, /*r*/30,
Ptr_to_ULong(location_of_counter),
|
|
From: Philippe W. <phi...@sk...> - 2012-04-20 03:29:14
|
valgrind revision: 12513 VEX revision: 2291 C compiler: gcc (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) Assembler: GNU assembler version 2.21.53.0.1-3.fc16 20110716 C library: GNU C Library development release version 2.14.90 uname -mrs: Linux 3.1.0-0.rc9.git0.2.fc16.kh.ppc64 ppc64 Vendor version: Fedora release 16 (Verne) Nightly build on gcc110 ( Fedora release 16 (Verne), ppc64 ) Started at 2012-04-19 20:00:05 PDT Ended at 2012-04-19 20:28:17 PDT 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 == 517 tests, 8 stderr failures, 8 stdout failures, 1 stderrB failure, 1 stdoutB failure, 2 post failures == gdbserver_tests/mcmain_pic (stdout) gdbserver_tests/mcmain_pic (stderr) gdbserver_tests/mcmain_pic (stdoutB) gdbserver_tests/mcmain_pic (stderrB) memcheck/tests/ppc32/power_ISA2_05 (stdout) memcheck/tests/ppc32/power_ISA2_05 (stderr) memcheck/tests/ppc64/power_ISA2_05 (stdout) memcheck/tests/ppc64/power_ISA2_05 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) massif/tests/big-alloc (post) massif/tests/deep-D (post) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) |
|
From: Rich C. <rc...@wi...> - 2012-04-20 03:25:39
|
valgrind revision: 12513
VEX revision: 2291
C compiler: gcc (SUSE Linux) 4.6.2
Assembler: GNU assembler (GNU Binutils; openSUSE Factory) 2.21.1
C library: GNU C Library stable release version 2.14.1 (20111007), by Roland McGrath et al.
uname -mrs: Linux 3.1.0-1-desktop x86_64
Vendor version: Welcome to openSUSE 12.1 "Asparagus" RC 1 - Kernel %r (%t).
Nightly build on groovy ( gcc 4.6.1 Linux 3.1.0-1-desktop x86_64 )
Started at 2012-04-19 21:55:01 CDT
Ended at 2012-04-19 22:25:30 CDT
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
== 607 tests, 2 stderr failures, 0 stdout failures, 1 stderrB failure, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mssnapshot (stderrB)
memcheck/tests/origin5-bz2 (stderr)
memcheck/tests/overlap (stderr)
=================================================
./valgrind-new/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-04-19 22:10:22.505846586 -0500
+++ mssnapshot.stderrB.out 2012-04-19 22:15:19.665559541 -0500
@@ -1,5 +1,11 @@
relaying data between gdb and process ....
+Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
+Try: zypper install -C "debuginfo(build-id)=f20c99249f5a5776e1377d3bd728502e3f455a3f"
vgdb-error value changed from 0 to 999999
+Missing separate debuginfo for /lib64/libpthread.so.0
+Try: zypper install -C "debuginfo(build-id)=1f368f83b776815033caab6e389d7030bba4593e"
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=3c6112e7d6b5cd8a95263caf838fa495bc4ac337"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-04-19 22:10:23.747837005 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:17:06.721743790 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-04-19 22:10:23.703837345 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:17:06.721743790 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-04-19 22:10:23.678837537 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:17:06.721743790 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-04-19 22:10:23.766836858 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:17:06.721743790 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-04-19 22:10:23.675837560 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:17:06.721743790 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/overlap.stderr.diff
=================================================
--- overlap.stderr.exp 2012-04-19 22:10:23.713837269 -0500
+++ overlap.stderr.out 2012-04-19 22:17:13.864689322 -0500
@@ -1,9 +1,9 @@
Source and destination overlap in memcpy(0x........, 0x........, 21)
- at 0x........: memcpy (mc_replace_strmem.c:...)
+ at 0x........: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:...)
by 0x........: main (overlap.c:40)
Source and destination overlap in memcpy(0x........, 0x........, 21)
- at 0x........: memcpy (mc_replace_strmem.c:...)
+ at 0x........: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:...)
by 0x........: main (overlap.c:42)
Source and destination overlap in strncpy(0x........, 0x........, 21)
=================================================
./valgrind-old/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-04-19 21:55:10.832865878 -0500
+++ mssnapshot.stderrB.out 2012-04-19 22:00:15.715514130 -0500
@@ -1,5 +1,11 @@
relaying data between gdb and process ....
+Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
+Try: zypper install -C "debuginfo(build-id)=f20c99249f5a5776e1377d3bd728502e3f455a3f"
vgdb-error value changed from 0 to 999999
+Missing separate debuginfo for /lib64/libpthread.so.0
+Try: zypper install -C "debuginfo(build-id)=1f368f83b776815033caab6e389d7030bba4593e"
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=3c6112e7d6b5cd8a95263caf838fa495bc4ac337"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-04-19 21:55:11.755858555 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:02:01.696700973 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-04-19 21:55:11.684859118 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:02:01.696700973 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-04-19 21:55:11.660859308 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:02:01.696700973 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-04-19 21:55:11.774858403 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:02:01.696700973 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-04-19 21:55:11.657859332 -0500
+++ origin5-bz2.stderr.out 2012-04-19 22:02:01.696700973 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/overlap.stderr.diff
=================================================
--- overlap.stderr.exp 2012-04-19 21:55:11.720858833 -0500
+++ overlap.stderr.out 2012-04-19 22:02:08.788646526 -0500
@@ -1,9 +1,9 @@
Source and destination overlap in memcpy(0x........, 0x........, 21)
- at 0x........: memcpy (mc_replace_strmem.c:...)
+ at 0x........: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:...)
by 0x........: main (overlap.c:40)
Source and destination overlap in memcpy(0x........, 0x........, 21)
- at 0x........: memcpy (mc_replace_strmem.c:...)
+ at 0x........: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:...)
by 0x........: main (overlap.c:42)
Source and destination overlap in strncpy(0x........, 0x........, 21)
|
|
From: Tom H. <to...@co...> - 2012-04-20 03:08:10
|
valgrind revision: 12513 VEX revision: 2290 C compiler: gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8) Assembler: GNU assembler version 2.18.50.0.6-2 20080403 C library: GNU C Library stable release version 2.8 uname -mrs: Linux 3.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 9 (Sulphur) Nightly build on bristol ( x86_64, Fedora 9 ) Started at 2012-04-20 03:41:10 BST Ended at 2012-04-20 04:07:49 BST 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 == 597 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) none/tests/amd64/sse4-64 (stdout) |
|
From: Tom H. <to...@co...> - 2012-04-20 02:58:06
|
valgrind revision: 12513 VEX revision: 2290 C compiler: gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2) Assembler: GNU assembler version 2.19.51.0.14-3.fc11 20090722 C library: GNU C Library stable release version 2.10.2 uname -mrs: Linux 3.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 11 (Leonidas) Nightly build on bristol ( x86_64, Fedora 11 ) Started at 2012-04-20 03:30:47 BST Ended at 2012-04-20 03:57:41 BST 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 == 599 tests, 3 stderr failures, 1 stdout failure, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) none/tests/amd64/sse4-64 (stdout) |
|
From: <br...@ac...> - 2012-04-20 02:55:32
|
valgrind revision: 12513
VEX revision: 2290
C compiler: gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)
Assembler: GNU assembler 2.15.92.0.2 20040927
C library: GNU C Library stable release version 2.3.4
uname -mrs: Linux 2.6.9-42.EL s390x
Vendor version: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Nightly build on z10-ec ( s390x build on z10-EC )
Started at 2012-04-19 22:20:06 EDT
Ended at 2012-04-19 22:55:20 EDT
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
== 489 tests, 9 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
memcheck/tests/partial_load_ok (stderr)
memcheck/tests/varinfo6 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
helgrind/tests/tc14_laog_dinphils (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc20_verifywrap (stderr)
drd/tests/tc04_free_lock (stderr)
drd/tests/tc09_bad_unlock (stderr)
=================================================
./valgrind-new/drd/tests/tc04_free_lock.stderr.diff-ppc
=================================================
--- tc04_free_lock.stderr.exp-ppc 2012-04-19 22:38:36.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-19 22:54:32.000000000 -0400
@@ -7,28 +7,22 @@
by 0x........: main (tc04_free_lock.c:20)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:26)
+ at 0x........: bar (tc04_free_lock.c:40)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
by 0x........: main (tc04_free_lock.c:26)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: foo (tc04_free_lock.c:47)
- by 0x........: main (tc04_free_lock.c:27)
+ at 0x........: foo (tc04_free_lock.c:49)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc04_free_lock.stderr.diff-x86
=================================================
--- tc04_free_lock.stderr.exp-x86 2012-04-19 22:38:37.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-19 22:54:32.000000000 -0400
@@ -8,7 +8,8 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:26)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
@@ -16,19 +17,12 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: foo (tc04_free_lock.c:49)
- by 0x........: main (tc04_free_lock.c:27)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-glibc2.8
=================================================
--- tc09_bad_unlock.stderr.exp-glibc2.8 2012-04-19 22:38:36.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:54:37.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-ppc
=================================================
--- tc09_bad_unlock.stderr.exp-ppc 2012-04-19 22:38:36.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:54:37.000000000 -0400
@@ -25,8 +25,8 @@
by 0x........: main (tc09_bad_unlock.c:49)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/drd/tests/tc09_bad_unlock.stderr.diff-x86
=================================================
--- tc09_bad_unlock.stderr.exp-x86 2012-04-19 22:38:36.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:54:37.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:49)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2012-04-19 22:37:55.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:50:35.000000000 -0400
@@ -42,14 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:49)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
---------------------
----------------------------------------------------------------
@@ -110,16 +102,8 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-----------------------------------------------------------------
-
Thread #x: Exiting thread still holds 1 lock
...
-ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc14_laog_dinphils.stderr.diff
=================================================
--- tc14_laog_dinphils.stderr.exp 2012-04-19 22:37:55.000000000 -0400
+++ tc14_laog_dinphils.stderr.out 2012-04-19 22:50:41.000000000 -0400
@@ -20,5 +20,26 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
+---Thread-Announcement------------------------------------------
-ERROR SUMMARY: 1000 errors from 1 contexts (suppressed: 0 from 0)
+Thread #x was created
+ ...
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc14_laog_dinphils.c:34)
+
+----------------------------------------------------------------
+
+Thread #x: lock order "0x........ before 0x........" violated
+
+Observed (incorrect) order is: acquisition of lock at 0x........
+ (stack unavailable)
+
+ followed by a later acquisition of lock at 0x........
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: dine (tc14_laog_dinphils.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+
+ERROR SUMMARY: 1048 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-04-19 22:37:55.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-04-19 22:50:45.000000000 -0400
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2012-04-19 22:37:55.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-04-19 22:50:54.000000000 -0400
@@ -1,7 +1,7 @@
------- This is output for >= glibc 2.4 ------
+------ This is output for < glibc 2.4 ------
---------------- pthread_create/join ----------------
@@ -45,13 +45,6 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_init failed
- with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:92)
-
-----------------------------------------------------------------
-
Thread #x: pthread_mutex_destroy of a locked mutex
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
@@ -63,26 +56,8 @@
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_lock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:108)
-
-----------------------------------------------------------------
-Thread #x's call to pthread_mutex_trylock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:116)
-
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_timedlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:121)
+make pthread_mutex_lock fail: skipped on glibc < 2.4
----------------------------------------------------------------
@@ -90,13 +65,6 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:125)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
---------------- pthread_cond_wait et al ----------------
@@ -215,14 +183,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +195,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 17 errors from 17 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/manuel3.stderr.diff
=================================================
--- manuel3.stderr.exp 2012-04-19 22:38:02.000000000 -0400
+++ manuel3.stderr.out 2012-04-19 22:44:41.000000000 -0400
@@ -1,4 +1,3 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: gcc_cant_inline_me (manuel3.c:22)
- by 0x........: main (manuel3.c:14)
+ at 0x........: main (manuel3.c:12)
=================================================
./valgrind-new/memcheck/tests/partial_load_ok.stderr.diff
=================================================
--- partial_load_ok.stderr.exp 2012-04-19 22:38:02.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-19 22:45:24.000000000 -0400
@@ -1,7 +1,13 @@
-Invalid read of size 4
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
+Invalid read of size 8
at 0x........: main (partial_load.c:23)
- Address 0x........ is 1 bytes inside a block of size 4 alloc'd
+ Address 0x........ is 1 bytes inside a block of size 8 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:20)
@@ -11,9 +17,9 @@
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:28)
-Invalid read of size 4
+Invalid read of size 8
at 0x........: main (partial_load.c:37)
- Address 0x........ is 0 bytes inside a block of size 4 free'd
+ Address 0x........ is 0 bytes inside a block of size 8 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:36)
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/partial_load_ok.stderr.diff64
=================================================
--- partial_load_ok.stderr.exp64 2012-04-19 22:38:02.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-19 22:45:24.000000000 -0400
@@ -1,4 +1,10 @@
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
Invalid read of size 8
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 8 alloc'd
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-04-19 22:38:02.000000000 -0400
+++ varinfo6.stderr.out 2012-04-19 22:46:31.000000000 -0400
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2012-04-19 22:38:02.000000000 -0400
+++ varinfo6.stderr.out 2012-04-19 22:46:31.000000000 -0400
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
=================================================
./valgrind-old/drd/tests/tc04_free_lock.stderr.diff-ppc
=================================================
--- tc04_free_lock.stderr.exp-ppc 2012-04-19 22:21:07.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-19 22:36:59.000000000 -0400
@@ -7,28 +7,22 @@
by 0x........: main (tc04_free_lock.c:20)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:26)
+ at 0x........: bar (tc04_free_lock.c:40)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
by 0x........: main (tc04_free_lock.c:26)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: foo (tc04_free_lock.c:47)
- by 0x........: main (tc04_free_lock.c:27)
+ at 0x........: foo (tc04_free_lock.c:49)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc04_free_lock.stderr.diff-x86
=================================================
--- tc04_free_lock.stderr.exp-x86 2012-04-19 22:21:07.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-19 22:36:59.000000000 -0400
@@ -8,7 +8,8 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:26)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
by 0x........: bar (tc04_free_lock.c:38)
@@ -16,19 +17,12 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: foo (tc04_free_lock.c:49)
- by 0x........: main (tc04_free_lock.c:27)
+ by 0x........: process_dl_debug (in /lib64/ld-2.3.4.so)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: foo (tc04_free_lock.c:46)
by 0x........: main (tc04_free_lock.c:27)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: bar (tc04_free_lock.c:40)
- by 0x........: main (tc04_free_lock.c:28)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?)
- by 0x........: bar (tc04_free_lock.c:38)
- by 0x........: main (tc04_free_lock.c:28)
-
-ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-glibc2.8
=================================================
--- tc09_bad_unlock.stderr.exp-glibc2.8 2012-04-19 22:21:07.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:37:03.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: (below main)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-ppc
=================================================
--- tc09_bad_unlock.stderr.exp-ppc 2012-04-19 22:21:07.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:37:03.000000000 -0400
@@ -25,8 +25,8 @@
by 0x........: main (tc09_bad_unlock.c:49)
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
+ at 0x........: nearly_main (tc09_bad_unlock.c:45)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/drd/tests/tc09_bad_unlock.stderr.diff-x86
=================================================
--- tc09_bad_unlock.stderr.exp-x86 2012-04-19 22:21:07.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:37:03.000000000 -0400
@@ -26,7 +26,7 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:49)
+ by 0x........: ???
mutex 0x........ was first observed at:
at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
by 0x........: nearly_main (tc09_bad_unlock.c:31)
@@ -47,13 +47,5 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:50)
-Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
- at 0x........: nearly_main (tc09_bad_unlock.c:45)
- by 0x........: main (tc09_bad_unlock.c:50)
-mutex 0x........ was first observed at:
- at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
- by 0x........: nearly_main (tc09_bad_unlock.c:31)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-ERROR SUMMARY: 8 errors from 7 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc09_bad_unlock.stderr.diff
=================================================
--- tc09_bad_unlock.stderr.exp 2012-04-19 22:20:25.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-19 22:33:01.000000000 -0400
@@ -42,14 +42,6 @@
by 0x........: nearly_main (tc09_bad_unlock.c:41)
by 0x........: main (tc09_bad_unlock.c:49)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:49)
-
---------------------
----------------------------------------------------------------
@@ -110,16 +102,8 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: nearly_main (tc09_bad_unlock.c:41)
- by 0x........: main (tc09_bad_unlock.c:50)
-
-----------------------------------------------------------------
-
Thread #x: Exiting thread still holds 1 lock
...
-ERROR SUMMARY: 11 errors from 11 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc14_laog_dinphils.stderr.diff
=================================================
--- tc14_laog_dinphils.stderr.exp 2012-04-19 22:20:25.000000000 -0400
+++ tc14_laog_dinphils.stderr.out 2012-04-19 22:33:07.000000000 -0400
@@ -20,5 +20,26 @@
by 0x........: mythread_wrapper (hg_intercepts.c:...)
...
+---Thread-Announcement------------------------------------------
-ERROR SUMMARY: 1000 errors from 1 contexts (suppressed: 0 from 0)
+Thread #x was created
+ ...
+ by 0x........: pthread_create_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_create@* (hg_intercepts.c:...)
+ by 0x........: main (tc14_laog_dinphils.c:34)
+
+----------------------------------------------------------------
+
+Thread #x: lock order "0x........ before 0x........" violated
+
+Observed (incorrect) order is: acquisition of lock at 0x........
+ (stack unavailable)
+
+ followed by a later acquisition of lock at 0x........
+ at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
+ by 0x........: dine (tc14_laog_dinphils.c:19)
+ by 0x........: mythread_wrapper (hg_intercepts.c:...)
+ ...
+
+
+ERROR SUMMARY: 1048 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-04-19 22:20:25.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-04-19 22:33:11.000000000 -0400
@@ -18,13 +18,5 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc18_semabuse.c:34)
-----------------------------------------------------------------
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc18_semabuse.c:37)
-
-
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc20_verifywrap.stderr.diff
=================================================
--- tc20_verifywrap.stderr.exp 2012-04-19 22:20:25.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-04-19 22:33:21.000000000 -0400
@@ -1,7 +1,7 @@
------- This is output for >= glibc 2.4 ------
+------ This is output for < glibc 2.4 ------
---------------- pthread_create/join ----------------
@@ -45,13 +45,6 @@
----------------------------------------------------------------
-Thread #x's call to pthread_mutex_init failed
- with error code 95 (EOPNOTSUPP: Operation not supported on transport endpoint)
- at 0x........: pthread_mutex_init (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:92)
-
-----------------------------------------------------------------
-
Thread #x: pthread_mutex_destroy of a locked mutex
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
@@ -63,26 +56,8 @@
at 0x........: pthread_mutex_destroy (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:102)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_lock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_lock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:108)
-
-----------------------------------------------------------------
-Thread #x's call to pthread_mutex_trylock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_trylock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:116)
-
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_timedlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_timedlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:121)
+make pthread_mutex_lock fail: skipped on glibc < 2.4
----------------------------------------------------------------
@@ -90,13 +65,6 @@
at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:125)
-----------------------------------------------------------------
-
-Thread #x's call to pthread_mutex_unlock failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_mutex_unlock (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:125)
-
---------------- pthread_cond_wait et al ----------------
@@ -215,14 +183,6 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
-----------------------------------------------------------------
-
-Thread #x's call to sem_post failed
- with error code 22 (EINVAL: Invalid argument)
- at 0x........: sem_post_WRK (hg_intercepts.c:...)
- by 0x........: sem_post (hg_intercepts.c:...)
- by 0x........: main (tc20_verifywrap.c:245)
-
FIXME: can't figure out how to verify wrap of sem_post
@@ -235,4 +195,4 @@
...
-ERROR SUMMARY: 23 errors from 23 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 17 errors from 17 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/manuel3.stderr.diff
=================================================
--- manuel3.stderr.exp 2012-04-19 22:20:32.000000000 -0400
+++ manuel3.stderr.out 2012-04-19 22:27:08.000000000 -0400
@@ -1,4 +1,3 @@
Conditional jump or move depends on uninitialised value(s)
- at 0x........: gcc_cant_inline_me (manuel3.c:22)
- by 0x........: main (manuel3.c:14)
+ at 0x........: main (manuel3.c:12)
=================================================
./valgrind-old/memcheck/tests/partial_load_ok.stderr.diff
=================================================
--- partial_load_ok.stderr.exp 2012-04-19 22:20:32.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-19 22:27:51.000000000 -0400
@@ -1,7 +1,13 @@
-Invalid read of size 4
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
+Invalid read of size 8
at 0x........: main (partial_load.c:23)
- Address 0x........ is 1 bytes inside a block of size 4 alloc'd
+ Address 0x........ is 1 bytes inside a block of size 8 alloc'd
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:20)
@@ -11,9 +17,9 @@
at 0x........: calloc (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:28)
-Invalid read of size 4
+Invalid read of size 8
at 0x........: main (partial_load.c:37)
- Address 0x........ is 0 bytes inside a block of size 4 free'd
+ Address 0x........ is 0 bytes inside a block of size 8 free'd
at 0x........: free (vg_replace_malloc.c:...)
by 0x........: main (partial_load.c:36)
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/partial_load_ok.stderr.diff64
=================================================
--- partial_load_ok.stderr.exp64 2012-04-19 22:20:32.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-19 22:27:51.000000000 -0400
@@ -1,4 +1,10 @@
+Invalid read of size 1
+ at 0x........: main (partial_load.c:16)
+ Address 0x........ is 0 bytes after a block of size 7 alloc'd
+ at 0x........: calloc (vg_replace_malloc.c:...)
+ by 0x........: main (partial_load.c:14)
+
Invalid read of size 8
at 0x........: main (partial_load.c:23)
Address 0x........ is 1 bytes inside a block of size 8 alloc'd
@@ -25,4 +31,4 @@
For a detailed leak analysis, rerun with: --leak-check=full
For counts of detected and suppressed errors, rerun with: -v
-ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-04-19 22:20:32.000000000 -0400
+++ varinfo6.stderr.out 2012-04-19 22:28:58.000000000 -0400
@@ -7,8 +7,7 @@
by 0x........: BZ2_bzCompress (varinfo6.c:4860)
by 0x........: BZ2_bzBuffToBuffCompress (varinfo6.c:5667)
by 0x........: main (varinfo6.c:6517)
- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
at 0x........: croak (varinfo6.c:34)
=================================================
./valgrind-old/memcheck/tests/varinfo6.stderr.diff-ppc64
=================================================
--- varinfo6.stderr.exp-ppc64 2012-04-19 22:20:32.000000000 -0400
+++ varinfo6.stderr.out 2012-04-19 22:28:58.000000000 -0400
@@ -1,5 +1,5 @@
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: mainSort (varinfo6.c:2999)
by 0x........: BZ2_blockSort (varinfo6.c:3143)
by 0x........: BZ2_compressBlock (varinfo6.c:4072)
@@ -10,7 +10,7 @@
Address 0x........ is on thread 1's stack
Uninitialised byte(s) found during client check request
- at 0x........: croak (varinfo6.c:35)
+ at 0x........: croak (varinfo6.c:34)
by 0x........: BZ2_decompress (varinfo6.c:1699)
by 0x........: BZ2_bzDecompress (varinfo6.c:5230)
by 0x........: BZ2_bzBuffToBuffDecompress (varinfo6.c:5715)
|
|
From: Rich C. <rc...@wi...> - 2012-04-20 02:52:52
|
valgrind revision: 12513
VEX revision: 2290
C compiler: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585]
Assembler: GNU assembler (GNU Binutils; openSUSE 11.4) 2.21
C library: GNU C Library stable release version 2.11.3 (20110203), by Roland McGrath et al.
uname -mrs: Linux 2.6.37.6-0.7-desktop x86_64
Vendor version: Welcome to openSUSE 11.4 "Celadon" - Kernel %r (%t).
Nightly build on ultra ( gcc 4.5.1 Linux 2.6.37.6-0.7-desktop x86_64 )
Started at 2012-04-19 21:30:01 CDT
Ended at 2012-04-19 21:52:43 CDT
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
== 607 tests, 2 stderr failures, 0 stdout failures, 6 stderrB failures, 0 stdoutB failures, 0 post failures ==
gdbserver_tests/mcbreak (stderrB)
gdbserver_tests/mcclean_after_fork (stderrB)
gdbserver_tests/mcleak (stderrB)
gdbserver_tests/mcmain_pic (stderrB)
gdbserver_tests/mcvabits (stderrB)
gdbserver_tests/mssnapshot (stderrB)
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin5-bz2 (stderr)
=================================================
./valgrind-new/gdbserver_tests/mcbreak.stderrB.diff
=================================================
--- mcbreak.stderrB.exp 2012-04-19 21:41:27.553078943 -0500
+++ mcbreak.stderrB.out 2012-04-19 21:43:46.003004797 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
vgdb-error value changed from 999999 to 0
n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
vgdb-error value changed from 0 to 0
=================================================
./valgrind-new/gdbserver_tests/mcclean_after_fork.stderrB.diff
=================================================
--- mcclean_after_fork.stderrB.exp 2012-04-19 21:41:27.553078943 -0500
+++ mcclean_after_fork.stderrB.out 2012-04-19 21:43:47.626769364 -0500
@@ -1,4 +1,6 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcleak.stderrB.diff
=================================================
--- mcleak.stderrB.exp 2012-04-19 21:41:27.550079378 -0500
+++ mcleak.stderrB.out 2012-04-19 21:44:07.772848324 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
10 bytes in 1 blocks are still reachable in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: f (leak-delta.c:14)
=================================================
./valgrind-new/gdbserver_tests/mcmain_pic.stderrB.diff
=================================================
--- mcmain_pic.stderrB.exp 2012-04-19 21:41:27.556078508 -0500
+++ mcmain_pic.stderrB.out 2012-04-19 21:44:09.389613905 -0500
@@ -1,3 +1,5 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Remote connection closed
=================================================
./valgrind-new/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2012-04-19 21:41:27.557078363 -0500
+++ mcvabits.stderrB.out 2012-04-19 21:44:14.124927318 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
Address 0x........ len 10 defined
=================================================
./valgrind-new/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-04-19 21:41:27.556078508 -0500
+++ mssnapshot.stderrB.out 2012-04-19 21:44:17.222478193 -0500
@@ -1,5 +1,9 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=92ec8fe859846a62345f74696ab349721415587a"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-new/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2012-04-19 21:41:28.031009647 -0500
+++ stack_switch.stderr.out 2012-04-19 21:45:18.917532815 -0500
@@ -0,0 +1,3 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
+
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-04-19 21:41:28.231980509 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:45:43.444976485 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-04-19 21:41:28.198985292 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:45:43.444976485 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-04-19 21:41:28.180987902 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:45:43.444976485 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-04-19 21:41:28.245978479 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:45:43.444976485 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-04-19 21:41:28.177988337 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:45:43.444976485 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
=================================================
./valgrind-old/gdbserver_tests/mcbreak.stderrB.diff
=================================================
--- mcbreak.stderrB.exp 2012-04-19 21:30:12.604938056 -0500
+++ mcbreak.stderrB.out 2012-04-19 21:32:31.660777119 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
vgdb-error value changed from 999999 to 0
n_errs_found 1 n_errs_shown 1 (vgdb-error 0)
vgdb-error value changed from 0 to 0
=================================================
./valgrind-old/gdbserver_tests/mcclean_after_fork.stderrB.diff
=================================================
--- mcclean_after_fork.stderrB.exp 2012-04-19 21:30:12.604938056 -0500
+++ mcclean_after_fork.stderrB.out 2012-04-19 21:32:33.283541842 -0500
@@ -1,4 +1,6 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
monitor command request to kill this process
Remote connection closed
=================================================
./valgrind-old/gdbserver_tests/mcleak.stderrB.diff
=================================================
--- mcleak.stderrB.exp 2012-04-19 21:30:12.601938491 -0500
+++ mcleak.stderrB.out 2012-04-19 21:32:52.914695610 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
10 bytes in 1 blocks are still reachable in loss record ... of ...
at 0x........: malloc (vg_replace_malloc.c:...)
by 0x........: f (leak-delta.c:14)
=================================================
./valgrind-old/gdbserver_tests/mcmain_pic.stderrB.diff
=================================================
--- mcmain_pic.stderrB.exp 2012-04-19 21:30:12.607937621 -0500
+++ mcmain_pic.stderrB.out 2012-04-19 21:32:54.537460333 -0500
@@ -1,3 +1,5 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Remote connection closed
=================================================
./valgrind-old/gdbserver_tests/mcvabits.stderrB.diff
=================================================
--- mcvabits.stderrB.exp 2012-04-19 21:30:12.608937476 -0500
+++ mcvabits.stderrB.out 2012-04-19 21:32:59.287771606 -0500
@@ -1,5 +1,7 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
Address 0x........ len 10 addressable
Address 0x........ is 0 bytes inside data symbol "undefined"
Address 0x........ len 10 defined
=================================================
./valgrind-old/gdbserver_tests/mssnapshot.stderrB.diff
=================================================
--- mssnapshot.stderrB.exp 2012-04-19 21:30:12.607937621 -0500
+++ mssnapshot.stderrB.out 2012-04-19 21:33:02.495306558 -0500
@@ -1,5 +1,9 @@
relaying data between gdb and process ....
vgdb-error value changed from 0 to 999999
+
+
+Missing separate debuginfo for /lib64/libc.so.6
+Try: zypper install -C "debuginfo(build-id)=92ec8fe859846a62345f74696ab349721415587a"
general valgrind monitor commands:
help [debug] : monitor command help. With debug: + debugging commands
v.wait [<ms>] : sleep <ms> (default 0) then continue
=================================================
./valgrind-old/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2012-04-19 21:30:13.069870649 -0500
+++ stack_switch.stderr.out 2012-04-19 21:34:03.478464851 -0500
@@ -0,0 +1,3 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
+
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc212-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc212-s390x 2012-04-19 21:30:13.264842382 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:34:27.647960599 -0500
@@ -75,17 +75,6 @@
at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
- at 0x........: mainSort (origin5-bz2.c:2859)
- by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
- by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
- by 0x........: handle_compress (origin5-bz2.c:4753)
- by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
- by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
- by 0x........: main (origin5-bz2.c:6484)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
-
-Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -131,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc234-s390x
=================================================
--- origin5-bz2.stderr.exp-glibc234-s390x 2012-04-19 21:30:13.232847020 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:34:27.647960599 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2012-04-19 21:30:13.214849630 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:34:27.647960599 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc25-x86
=================================================
--- origin5-bz2.stderr.exp-glibc25-x86 2012-04-19 21:30:13.278840352 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:34:27.647960599 -0500
@@ -12,7 +12,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -21,7 +21,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
by 0x........: handle_compress (origin5-bz2.c:4750)
by 0x........: BZ2_bzCompress (origin5-bz2.c:4822)
@@ -30,7 +30,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -41,7 +41,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -52,7 +52,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -63,7 +63,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -74,7 +74,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -85,7 +85,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
by 0x........: BZ2_blockSort (origin5-bz2.c:3105)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -96,7 +96,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -107,7 +107,7 @@
Uninitialised value was created by a client request
at 0x........: main (origin5-bz2.c:6479)
-Use of uninitialised value of size 4
+Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2275)
by 0x........: BZ2_blockSort (origin5-bz2.c:3116)
by 0x........: BZ2_compressBlock (origin5-bz2.c:4034)
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
<truncated beyond 100 lines>
=================================================
./valgrind-old/memcheck/tests/origin5-bz2.stderr.diff-glibc27-ppc64
=================================================
--- origin5-bz2.stderr.exp-glibc27-ppc64 2012-04-19 21:30:13.211850065 -0500
+++ origin5-bz2.stderr.out 2012-04-19 21:34:27.647960599 -0500
@@ -1,7 +1,7 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6481)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Conditional jump or move depends on uninitialised value(s)
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -10,7 +10,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -19,7 +19,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: copy_input_until_stop (origin5-bz2.c:4686)
@@ -28,7 +28,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2820)
@@ -39,7 +39,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2823)
@@ -50,7 +50,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2854)
@@ -61,7 +61,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2858)
@@ -72,7 +72,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2963)
@@ -83,7 +83,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: mainSort (origin5-bz2.c:2964)
@@ -94,7 +94,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
at 0x........: fallbackSort (origin5-bz2.c:2269)
@@ -105,7 +105,7 @@
by 0x........: BZ2_bzBuffToBuffCompress (origin5-bz2.c:5630)
by 0x........: main (origin5-bz2.c:6484)
Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6481)
+ at 0x........: main (origin5-bz2.c:6479)
Use of uninitialised value of size 8
<truncated beyond 100 lines>
|
|
From: Tom H. <to...@co...> - 2012-04-20 02:51:07
|
valgrind revision: 12513 VEX revision: 2290 C compiler: gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2) Assembler: GNU assembler version 2.20.51.0.2-20.fc13 20091009 C library: GNU C Library stable release version 2.12.2 uname -mrs: Linux 3.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 13 (Goddard) Nightly build on bristol ( x86_64, Fedora 13 ) Started at 2012-04-20 03:21:23 BST Ended at 2012-04-20 03:50:49 BST 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 == 599 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/err_disable4 (stderr) memcheck/tests/linux/stack_switch (stderr) helgrind/tests/pth_barrier3 (stderr) |
|
From: <sv...@va...> - 2012-04-20 02:50:35
|
florian 2012-04-20 03:50:28 +0100 (Fri, 20 Apr 2012)
New Revision: 2291
Log:
Minor non-functional tweak.
Modified files:
branches/TCHAIN/priv/host_s390_defs.c
Modified: branches/TCHAIN/priv/host_s390_defs.c (+2 -2)
===================================================================
--- branches/TCHAIN/priv/host_s390_defs.c 2012-04-20 03:18:31 +01:00 (rev 2290)
+++ branches/TCHAIN/priv/host_s390_defs.c 2012-04-20 03:50:28 +01:00 (rev 2291)
@@ -7849,9 +7849,9 @@
if (shortOK) {
p = s390_emit_BRCL(p, S390_CC_ALWAYS, delta); /* 6 bytes */
- /* Make sre that BRCL fits into the patchable part of an xdirect
+ /* Make sure that BRCL fits into the patchable part of an xdirect
code sequence */
- vassert(6 < s390_xdirect_patchable_len());
+ vassert(6 <= s390_xdirect_patchable_len());
/* Fill remaining bytes with 0x00 (invalid opcode) */
Int i;
|
|
From: Tom H. <to...@co...> - 2012-04-20 02:44:39
|
valgrind revision: 12512 VEX revision: 2289 C compiler: gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) Assembler: GNU assembler version 2.20.51.0.7-8.fc14 20100318 C library: GNU C Library stable release version 2.13 uname -mrs: Linux 3.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 14 (Laughlin) Nightly build on bristol ( x86_64, Fedora 14 ) Started at 2012-04-20 03:11:38 BST Ended at 2012-04-20 03:43:02 BST 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 == 614 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/origin5-bz2 (stderr) drd/tests/pth_create_chain (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 == 614 tests, 3 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/origin5-bz2 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2012-04-20 03:27:45.161193602 +0100 --- new.short 2012-04-20 03:43:02.692292187 +0100 *************** *** 8,10 **** ! == 614 tests, 3 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) --- 8,10 ---- ! == 614 tests, 4 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) *************** *** 15,16 **** --- 15,17 ---- memcheck/tests/origin5-bz2 (stderr) + drd/tests/pth_create_chain (stderr) |
|
From: Tom H. <to...@co...> - 2012-04-20 02:36:21
|
valgrind revision: 12512 VEX revision: 2289 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) 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.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 15 (Lovelock) Nightly build on bristol ( x86_64, Fedora 15 ) Started at 2012-04-20 03:02:55 BST Ended at 2012-04-20 03:34:22 BST 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, 3 stderr failures, 0 stdout failures, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) |
|
From: Tom H. <to...@co...> - 2012-04-20 02:24:32
|
valgrind revision: 12512 VEX revision: 2289 C compiler: gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2) 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.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 16 (Verne) Nightly build on bristol ( x86_64, Fedora 16 ) Started at 2012-04-20 02:51:41 BST Ended at 2012-04-20 03:24:16 BST 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, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) memcheck/tests/str_tester (stderr) |
|
From: <sv...@va...> - 2012-04-20 02:19:43
|
sewardj 2012-04-20 03:19:35 +0100 (Fri, 20 Apr 2012)
New Revision: 12513
Log:
Fill in some more bits to do with t-chaining for ppc64
(still doesn't work) (Valgrind side)
Modified files:
branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc32-linux.S
branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S
branches/TCHAIN/coregrind/m_scheduler/scheduler.c
branches/TCHAIN/coregrind/m_translate.c
branches/TCHAIN/coregrind/m_transtab.c
branches/TCHAIN/coregrind/pub_core_dispatch.h
Modified: branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc32-linux.S (+5 -5)
===================================================================
--- branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc32-linux.S 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc32-linux.S 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -62,7 +62,7 @@
/* r4 holds guest_state */
/* r5 holds host_addr */
- /* ----- entry point to VG_(run_innerloop) ----- */
+ /* ----- entry point to VG_(disp_run_translations) ----- */
/* For Linux/ppc32 we need the SysV ABI, which uses
LR->4(parent_sp), CR->anywhere.
(The AIX ABI, used on Darwin,
@@ -104,7 +104,7 @@
stfd 14,352(1)
LafterFP1:
- /* General reg save area : 72 bytes */
+ /* General reg save area : 76 bytes */
stw 31,348(1)
stw 30,344(1)
stw 29,340(1)
@@ -289,8 +289,8 @@
vcmpequw. 8,6,7 /* CR[24] = 1 if v6 == v7 */
bt 24,invariant_violation /* branch if all_equal */
#endif
+
LafterVMX8:
-
/* otherwise we're OK */
b remove_frame
@@ -410,7 +410,7 @@
handing the caller the pair (Chain_me_S, RA) */
li 6, VG_TRC_CHAIN_ME_TO_SLOW_EP
mflr 7
- /* 8 = imm32 r30, disp_cp_chain_me_to_slowEP
+ /* 8 = imm32-fixed2 r30, disp_cp_chain_me_to_slowEP
4 = mtctr r30
4 = btctr
*/
@@ -426,7 +426,7 @@
handing the caller the pair (Chain_me_S, RA) */
li 6, VG_TRC_CHAIN_ME_TO_FAST_EP
mflr 7
- /* 8 = imm32 r30, disp_cp_chain_me_to_fastEP
+ /* 8 = imm32-fixed2 r30, disp_cp_chain_me_to_fastEP
4 = mtctr r30
4 = btctr
*/
Modified: branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S (+258 -383)
===================================================================
--- branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/m_dispatch/dispatch-ppc64-linux.S 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -39,57 +39,61 @@
/* References to globals via the TOC */
/*
- .globl vgPlain_tt_fast
+ .globl vgPlain_tt_fast
.lcomm vgPlain_tt_fast,4,4
.type vgPlain_tt_fast, @object
*/
- .section ".toc","aw"
+.section ".toc","aw"
.tocent__vgPlain_tt_fast:
.tc vgPlain_tt_fast[TC],vgPlain_tt_fast
-.tocent__vgPlain_tt_fastN:
- .tc vgPlain_tt_fastN[TC],vgPlain_tt_fastN
-.tocent__vgPlain_dispatch_ctr:
- .tc vgPlain_dispatch_ctr[TC],vgPlain_dispatch_ctr
+.tocent__vgPlain_stats__n_xindirs:
+ .tc vgPlain_stats__n_xindirs[TC],vgPlain_stats__n_xindirs
+.tocent__vgPlain_stats__n_xindir_misses:
+ .tc vgPlain_stats__n_xindir_misses[TC],vgPlain_stats__n_xindir_misses
.tocent__vgPlain_machine_ppc64_has_VMX:
.tc vgPlain_machine_ppc64_has_VMX[TC],vgPlain_machine_ppc64_has_VMX
/*------------------------------------------------------------*/
/*--- ---*/
-/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
-/*--- run all translations except no-redir ones. ---*/
+/*--- The dispatch loop. VG_(disp_run_translations) is ---*/
+/*--- used to run all translations, ---*/
+/*--- including no-redir ones. ---*/
/*--- ---*/
/*------------------------------------------------------------*/
/*----------------------------------------------------*/
-/*--- Preamble (set everything up) ---*/
+/*--- Entry and preamble (set everything up) ---*/
/*----------------------------------------------------*/
/* signature:
-UWord VG_(run_innerloop) ( void* guest_state, UWord do_profiling );
+void VG_(disp_run_translations)( UWord* two_words,
+ void* guest_state,
+ Addr host_addr );
*/
.section ".text"
.align 2
-.globl VG_(run_innerloop)
+.globl VG_(disp_run_translations)
.section ".opd","aw"
.align 3
-VG_(run_innerloop):
-.quad .VG_(run_innerloop),.TOC.@tocbase,0
+VG_(disp_run_translations):
+.quad .VG_(disp_run_translations),.TOC.@tocbase,0
.previous
-.type .VG_(run_innerloop),@function
-.globl .VG_(run_innerloop)
-.VG_(run_innerloop):
- /* r3 holds guest_state */
- /* r4 holds do_profiling */
+.type .VG_(disp_run_translations),@function
+.globl .VG_(disp_run_translations)
+.VG_(disp_run_translations):
+ /* r3 holds two_words */
+ /* r4 holds guest_state */
+ /* r5 holds host_addr */
- /* ----- entry point to VG_(run_innerloop) ----- */
+ /* ----- entry point to VG_(disp_run_translations) ----- */
/* PPC64 ABI saves LR->16(prt_sp), CR->8(prt_sp)) */
/* Save lr, cr */
- mflr 0
- std 0,16(1)
- mfcr 0
- std 0,8(1)
+ mflr 6
+ std 6,16(1)
+ mfcr 6
+ std 6,8(1)
/* New stack frame */
stdu 1,-624(1) /* sp should maintain 16-byte alignment */
@@ -116,7 +120,7 @@
stfd 15,488(1)
stfd 14,480(1)
- /* General reg save area : 144 bytes */
+ /* General reg save area : 152 bytes */
std 31,472(1)
std 30,464(1)
std 29,456(1)
@@ -135,58 +139,56 @@
std 16,352(1)
std 15,344(1)
std 14,336(1)
- /* Probably not necessary to save r13 (thread-specific ptr),
- as VEX stays clear of it... but what the hey. */
std 13,328(1)
+ std 3,104(1) /* save two_words for later */
/* It's necessary to save/restore VRSAVE in the AIX / Darwin ABI.
The Linux kernel might not actually use VRSAVE for its intended
purpose, but it should be harmless to preserve anyway. */
- /* r3, r4 are live here, so use r5 */
- ld 5,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
- ld 5,0(5)
- cmpldi 5,0
+ /* r3, r4, r5 are live here, so use r6 */
+ ld 6,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
+ ld 6,0(6)
+ cmpldi 6,0
beq .LafterVMX1
/* VRSAVE save word : 32 bytes */
- mfspr 5,256 /* vrsave reg is spr number 256 */
- stw 5,324(1)
+ mfspr 6,256 /* vrsave reg is spr number 256 */
+ stw 6,324(1)
/* Alignment padding : 4 bytes */
/* Vector reg save area (quadword aligned) : 192 bytes */
- li 5,304
- stvx 31,5,1
- li 5,288
- stvx 30,5,1
- li 5,272
- stvx 29,5,1
- li 5,256
- stvx 28,5,1
- li 5,240
- stvx 27,5,1
- li 5,224
- stvx 26,5,1
- li 5,208
- stvx 25,5,1
- li 5,192
- stvx 24,5,1
- li 5,176
- stvx 23,5,1
- li 5,160
- stvx 22,5,1
- li 5,144
- stvx 21,5,1
- li 5,128
- stvx 20,5,1
+ li 6,304
+ stvx 31,6,1
+ li 6,288
+ stvx 30,6,1
+ li 6,272
+ stvx 29,6,1
+ li 6,256
+ stvx 28,6,1
+ li 6,240
+ stvx 27,6,1
+ li 6,224
+ stvx 26,6,1
+ li 6,208
+ stvx 25,6,1
+ li 6,192
+ stvx 24,6,1
+ li 6,176
+ stvx 23,6,1
+ li 6,160
+ stvx 22,6,1
+ li 6,144
+ stvx 21,6,1
+ li 6,128
+ stvx 20,6,1
.LafterVMX1:
/* Local variable space... */
- /* r3 holds guest_state */
- /* r4 holds do_profiling */
- mr 31,3
- std 3,104(1) /* spill orig guest_state ptr */
+ /* r3 holds two_words */
+ /* r4 holds guest_state */
+ /* r5 holds host_addr */
/* 96(sp) used later to check FPSCR[RM] */
/* 88(sp) used later to load fpscr with zero */
@@ -201,13 +203,6 @@
0(sp) : back-chain
*/
-// CAB TODO: Use a caller-saved reg for orig guest_state ptr
-// - rem to set non-allocateable in isel.c
-
- /* hold dispatch_ctr (=32bit value) in r29 */
- ld 29,.tocent__vgPlain_dispatch_ctr@toc(2)
- lwz 29,0(29) /* 32-bit zero-extending load */
-
/* set host FPU control word to the default mode expected
by VEX-generated code. See comments in libvex.h for
more info. */
@@ -215,16 +210,16 @@
fsub 3,3,3 is not a reliable way to do this, since if
f3 holds a NaN or similar then we don't necessarily
wind up with zero. */
- li 5,0
- stw 5,88(1)
+ li 6,0
+ stw 6,88(1)
lfs 3,88(1)
mtfsf 0xFF,3 /* fpscr = lo32 of f3 */
/* set host AltiVec control word to the default mode expected
by VEX-generated code. */
- ld 5,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
- ld 5,0(5)
- cmpldi 5,0
+ ld 6,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
+ ld 6,0(6)
+ cmpldi 6,0
beq .LafterVMX2
vspltisw 3,0x0 /* generate zero */
@@ -234,196 +229,34 @@
/* make a stack frame for the code we are calling */
stdu 1,-48(1)
- /* fetch %CIA into r3 */
- ld 3,OFFSET_ppc64_CIA(31)
+ /* Set up the guest state ptr */
+ mr 31,4 /* r31 (generated code gsp) = r4 */
- /* fall into main loop (the right one) */
- /* r4 = do_profiling. It's probably trashed after here,
- but that's OK: we don't need it after here. */
- cmplwi 4,0
- beq .VG_(run_innerloop__dispatch_unprofiled)
- b .VG_(run_innerloop__dispatch_profiled)
+ /* and jump into the code cache. Chained translations in
+ the code cache run, until for whatever reason, they can't
+ continue. When that happens, the translation in question
+ will jump (or call) to one of the continuation points
+ VG_(cp_...) below. */
+ mtctr 5
+ bctr
/*NOTREACHED*/
-
/*----------------------------------------------------*/
-/*--- NO-PROFILING (standard) dispatcher ---*/
+/*--- Postamble and exit. ---*/
/*----------------------------------------------------*/
- .section ".text"
- .align 2
- .globl VG_(run_innerloop__dispatch_unprofiled)
- .section ".opd","aw"
- .align 3
-VG_(run_innerloop__dispatch_unprofiled):
- .quad .VG_(run_innerloop__dispatch_unprofiled),.TOC.@tocbase,0
- .previous
- .type .VG_(run_innerloop__dispatch_unprofiled),@function
- .globl .VG_(run_innerloop__dispatch_unprofiled)
-.VG_(run_innerloop__dispatch_unprofiled):
- /* At entry: Live regs:
- r1 (=sp)
- r2 (toc pointer)
- r3 (=CIA = next guest address)
- r29 (=dispatch_ctr)
- r31 (=guest_state)
- Stack state:
- 144(r1) (=var space for FPSCR[RM])
- */
- /* Has the guest state pointer been messed with? If yes, exit.
- Also set up & VG_(tt_fast) early in an attempt at better
- scheduling. */
- ld 5, .tocent__vgPlain_tt_fast@toc(2) /* &VG_(tt_fast) */
- rldicl. 0,31,0,63
- bne .gsp_changed
+.postamble:
+ /* At this point, r6 and r7 contain two
+ words to be returned to the caller. r6
+ holds a TRC value, and r7 optionally may
+ hold another word (for CHAIN_ME exits, the
+ address of the place to patch.) */
- /* save the jump address in the guest state */
- std 3,OFFSET_ppc64_CIA(31)
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- subi 29,29,1
- cmpldi 29,0
- beq .counter_is_zero
-
- /* try a fast lookup in the translation cache */
- /* r4 = VG_TT_FAST_HASH(addr) * sizeof(FastCacheEntry)
- = ((r3 >>u 2) & VG_TT_FAST_MASK) << 4 */
- rldicl 4,3, 62, 64-VG_TT_FAST_BITS /* entry# */
- sldi 4,4,4 /* entry# * sizeof(FastCacheEntry) */
- add 5,5,4 /* & VG_(tt_fast)[entry#] */
- ld 6,0(5) /* .guest */
- ld 7,8(5) /* .host */
- cmpd 3,6
- bne .fast_lookup_failed
-
- /* Found a match. Call .host. */
- mtctr 7
- bctrl
-
- /* On return from guest code:
- r3 holds destination (original) address.
- r31 may be unchanged (guest_state), or may indicate further
- details of the control transfer requested to *r3.
- */
- /* start over */
- b .VG_(run_innerloop__dispatch_unprofiled)
- /*NOTREACHED*/
- .size .VG_(run_innerloop), .-.VG_(run_innerloop)
-
-
-/*----------------------------------------------------*/
-/*--- PROFILING dispatcher (can be much slower) ---*/
-/*----------------------------------------------------*/
-
- .section ".text"
- .align 2
- .globl VG_(run_innerloop__dispatch_profiled)
- .section ".opd","aw"
- .align 3
-VG_(run_innerloop__dispatch_profiled):
- .quad .VG_(run_innerloop__dispatch_profiled),.TOC.@tocbase,0
- .previous
- .type .VG_(run_innerloop__dispatch_profiled),@function
- .globl .VG_(run_innerloop__dispatch_profiled)
-.VG_(run_innerloop__dispatch_profiled):
- /* At entry: Live regs:
- r1 (=sp)
- r2 (toc pointer)
- r3 (=CIA = next guest address)
- r29 (=dispatch_ctr)
- r31 (=guest_state)
- Stack state:
- 144(r1) (=var space for FPSCR[RM])
- */
- /* Has the guest state pointer been messed with? If yes, exit.
- Also set up & VG_(tt_fast) early in an attempt at better
- scheduling. */
- ld 5, .tocent__vgPlain_tt_fast@toc(2) /* &VG_(tt_fast) */
- rldicl. 0,31,0,63
- bne .gsp_changed
-
- /* save the jump address in the guest state */
- std 3,OFFSET_ppc64_CIA(31)
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- subi 29,29,1
- cmpldi 29,0
- beq .counter_is_zero
-
- /* try a fast lookup in the translation cache */
- /* r4 = VG_TT_FAST_HASH(addr) * sizeof(FastCacheEntry)
- = ((r3 >>u 2) & VG_TT_FAST_MASK) << 4 */
- rldicl 4,3, 62, 64-VG_TT_FAST_BITS /* entry# */
- sldi 4,4,4 /* entry# * sizeof(FastCacheEntry) */
- add 5,5,4 /* & VG_(tt_fast)[entry#] */
- ld 6,0(5) /* .guest */
- ld 7,8(5) /* .host */
- cmpd 3,6
- bne .fast_lookup_failed
-
- /* increment bb profile counter VG_(tt_fastN)[x] (=32bit val) */
- ld 9, .tocent__vgPlain_tt_fastN@toc(2)
- srdi 4, 4,1 /* entry# * sizeof(UInt*) */
- ldx 9, 9,4 /* r7 = VG_(tt_fastN)[VG_TT_HASH(addr)] */
- lwz 6, 0(9) /* *(UInt*)r7 ++ */
- addi 6, 6,1
- stw 6, 0(9)
-
- /* Found a match. Call .host. */
- mtctr 7
- bctrl
-
- /* On return from guest code:
- r3 holds destination (original) address.
- r31 may be unchanged (guest_state), or may indicate further
- details of the control transfer requested to *r3.
- */
- /* start over */
- b .VG_(run_innerloop__dispatch_profiled)
- /*NOTREACHED*/
- .size .VG_(run_a_noredir_translation), .-.VG_(run_a_noredir_translation)
-
-
-/*----------------------------------------------------*/
-/*--- exit points ---*/
-/*----------------------------------------------------*/
-
-.gsp_changed:
- /* Someone messed with the gsp (in r31). Have to
- defer to scheduler to resolve this. dispatch ctr
- is not yet decremented, so no need to increment. */
- /* %CIA is NOT up to date here. First, need to write
- %r3 back to %CIA, but without trashing %r31 since
- that holds the value we want to return to the scheduler.
- Hence use %r5 transiently for the guest state pointer. */
- ld 5,152(1) /* original guest_state ptr */
- std 3,OFFSET_ppc64_CIA(5)
- mr 3,31 /* r3 = new gsp value */
- b .run_innerloop_exit
- /*NOTREACHED*/
-
-.counter_is_zero:
- /* %CIA is up to date */
- /* back out decrement of the dispatch counter */
- addi 29,29,1
- li 3,VG_TRC_INNER_COUNTERZERO
- b .run_innerloop_exit
-
-.fast_lookup_failed:
- /* %CIA is up to date */
- /* back out decrement of the dispatch counter */
- addi 29,29,1
- li 3,VG_TRC_INNER_FASTMISS
- b .run_innerloop_exit
-
-
-
-/* All exits from the dispatcher go through here.
- r3 holds the return value.
-*/
-.run_innerloop_exit:
/* We're leaving. Check that nobody messed with
- VSCR or FPSCR. */
+ VSCR or FPSCR in ways we don't expect. */
+ /* Using r11 - value used again further on, so don't trash! */
+ ld 11,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
+ ld 11,0(11)
/* Set fpscr back to a known state, since vex-generated code
may have messed with fpscr[rm]. */
@@ -434,10 +267,7 @@
addi 1,1,16
mtfsf 0xFF,3 /* fpscr = f3 */
- /* Using r11 - value used again further on, so don't trash! */
- ld 11,.tocent__vgPlain_machine_ppc64_has_VMX@toc(2)
- ld 11,0(11)
- cmpldi 11,0
+ cmpldi 11,0 /* Do we have altivec? */
beq .LafterVMX8
/* Check VSCR[NJ] == 1 */
@@ -451,32 +281,19 @@
vspltw 7,7,0x3 /* flags-word to all lanes */
vcmpequw. 8,6,7 /* CR[24] = 1 if v6 == v7 */
bt 24,.invariant_violation /* branch if all_equal */
+
.LafterVMX8:
-
/* otherwise we're OK */
- b .run_innerloop_exit_REALLY
+ b .remove_frame
-
.invariant_violation:
- li 3,VG_TRC_INVARIANT_FAILED
- b .run_innerloop_exit_REALLY
+ li 6,VG_TRC_INVARIANT_FAILED
+ li 7,0
+ /* fall through */
-.run_innerloop_exit_REALLY:
- /* r3 holds VG_TRC_* value to return */
+.remove_frame:
+ /* Restore FP regs */
- /* Return to parent stack */
- addi 1,1,48
-
- /* Write ctr to VG_(dispatch_ctr) (=32bit value) */
- ld 5,.tocent__vgPlain_dispatch_ctr@toc(2)
- stw 29,0(5)
-
- /* Restore cr */
- lwz 0,44(1)
- mtcr 0
-
- /* Restore callee-saved registers... */
-
/* Floating-point regs */
lfd 31,616(1)
lfd 30,608(1)
@@ -497,31 +314,11 @@
lfd 15,488(1)
lfd 14,480(1)
- /* General regs */
- ld 31,472(1)
- ld 30,464(1)
- ld 29,456(1)
- ld 28,448(1)
- ld 27,440(1)
- ld 26,432(1)
- ld 25,424(1)
- ld 24,416(1)
- ld 23,408(1)
- ld 22,400(1)
- ld 21,392(1)
- ld 20,384(1)
- ld 19,376(1)
- ld 18,368(1)
- ld 17,360(1)
- ld 16,352(1)
- ld 15,344(1)
- ld 14,336(1)
- ld 13,328(1)
-
- /* r11 already holds VG_(machine_ppc64_has_VMX) value */
- cmpldi 11,0
+ /* r11 already holds VG_(machine_ppc32_has_VMX) value */
+ cmplwi 11,0
beq .LafterVMX9
+ /* Restore Altivec regs */
/* VRSAVE */
lwz 4,324(1)
mfspr 4,256 /* VRSAVE reg is spr number 256 */
@@ -553,7 +350,33 @@
lvx 20,4,1
.LafterVMX9:
- /* reset cr, lr, sp */
+ /* restore int regs, including importantly r3 (two_words) */
+ addi 1,1,48
+ ld 31,472(1)
+ ld 30,464(1)
+ ld 29,456(1)
+ ld 28,448(1)
+ ld 27,440(1)
+ ld 26,432(1)
+ ld 25,424(1)
+ ld 24,416(1)
+ ld 23,408(1)
+ ld 22,400(1)
+ ld 21,392(1)
+ ld 20,384(1)
+ ld 19,376(1)
+ ld 18,368(1)
+ ld 17,360(1)
+ ld 16,352(1)
+ ld 15,344(1)
+ ld 14,336(1)
+ ld 13,328(1)
+ std 3,104(1)
+ /* Stash return values */
+ std 6,0(3)
+ std 7,8(3)
+
+ /* restore lr & sp, and leave */
ld 0,632(1) /* stack_size + 8 */
mtcr 0
ld 0,640(1) /* stack_size + 16 */
@@ -562,95 +385,147 @@
blr
-/*------------------------------------------------------------*/
-/*--- ---*/
-/*--- A special dispatcher, for running no-redir ---*/
-/*--- translations. Just runs the given translation once. ---*/
-/*--- ---*/
-/*------------------------------------------------------------*/
+/*----------------------------------------------------*/
+/*--- Continuation points ---*/
+/*----------------------------------------------------*/
-/* signature:
-void VG_(run_a_noredir_translation) ( UWord* argblock );
-*/
+/* ------ Chain me to slow entry point ------ */
+ .section ".text"
+ .align 2
+ .globl VG_(disp_cp_chain_me_to_slowEP)
+ .section ".opd","aw"
+ .align 3
+VG_(disp_cp_chain_me_to_slowEP):
+ .quad .VG_(disp_cp_chain_me_to_slowEP),.TOC.@tocbase,0
+ .previous
+ .type .VG_(disp_cp_chain_me_to_slowEP),@function
+ .globl .VG_(disp_cp_chain_me_to_slowEP)
+.VG_(disp_cp_chain_me_to_slowEP):
+ /* We got called. The return address indicates
+ where the patching needs to happen. Collect
+ the return address and, exit back to C land,
+ handing the caller the pair (Chain_me_S, RA) */
+ li 6, VG_TRC_CHAIN_ME_TO_SLOW_EP
+ mflr 7
+ /* 20 = imm64-fixed5 r30, disp_cp_chain_me_to_slowEP
+ 4 = mtctr r30
+ 4 = btctr
+ */
+ subi 7,7,20+4+4
+ b .postamble
-/* Run a no-redir translation. argblock points to 4 UWords, 2 to carry args
- and 2 to carry results:
- 0: input: ptr to translation
- 1: input: ptr to guest state
- 2: output: next guest PC
- 3: output: guest state pointer afterwards (== thread return code)
-*/
-.section ".text"
-.align 2
-.globl VG_(run_a_noredir_translation)
-.section ".opd","aw"
-.align 3
-VG_(run_a_noredir_translation):
-.quad .VG_(run_a_noredir_translation),.TOC.@tocbase,0
-.previous
-.type .VG_(run_a_noredir_translation),@function
-.globl .VG_(run_a_noredir_translation)
-.VG_(run_a_noredir_translation):
- /* save callee-save int regs, & lr */
- stdu 1,-512(1)
- std 14,256(1)
- std 15,264(1)
- std 16,272(1)
- std 17,280(1)
- std 18,288(1)
- std 19,296(1)
- std 20,304(1)
- std 21,312(1)
- std 22,320(1)
- std 23,328(1)
- std 24,336(1)
- std 25,344(1)
- std 26,352(1)
- std 27,360(1)
- std 28,368(1)
- std 29,376(1)
- std 30,384(1)
- std 31,392(1)
- mflr 31
- std 31,400(1)
- std 2,408(1) /* also preserve R2, just in case .. */
+/* ------ Chain me to fast entry point ------ */
+ .section ".text"
+ .align 2
+ .globl VG_(disp_cp_chain_me_to_fastEP)
+ .section ".opd","aw"
+ .align 3
+VG_(disp_cp_chain_me_to_fastEP):
+ .quad .VG_(disp_cp_chain_me_to_fastEP),.TOC.@tocbase,0
+ .previous
+ .type .VG_(disp_cp_chain_me_to_fastEP),@function
+ .globl .VG_(disp_cp_chain_me_to_fastEP)
+.VG_(disp_cp_chain_me_to_fastEP):
+ /* We got called. The return address indicates
+ where the patching needs to happen. Collect
+ the return address and, exit back to C land,
+ handing the caller the pair (Chain_me_S, RA) */
+ li 6, VG_TRC_CHAIN_ME_TO_FAST_EP
+ mflr 7
+ /* 20 = imm64-fixed5 r30, disp_cp_chain_me_to_fastEP
+ 4 = mtctr r30
+ 4 = btctr
+ */
+ subi 7,7,20+4+4
+ b .postamble
- std 3,416(1)
- ld 31,8(3)
- ld 30,0(3)
- mtlr 30
- blrl
+/* ------ Indirect but boring jump ------ */
+ .section ".text"
+ .align 2
+ .globl VG_(disp_cp_xindir)
+ .section ".opd","aw"
+ .align 3
+VG_(disp_cp_xindir):
+ .quad .VG_(disp_cp_xindir),.TOC.@tocbase,0
+ .previous
+ .type .VG_(disp_cp_xindir),@function
+ .globl .VG_(disp_cp_xindir)
+.VG_(disp_cp_xindir):
+ /* Where are we going? */
+ ld 3,OFFSET_ppc64_CIA(31)
- ld 4,416(1)
- std 3, 16(4)
- std 31,24(4)
+ /* stats only */
+ ld 5, .tocent__vgPlain_stats__n_xindirs@toc(2)
+ ld 6,0(5)
+ addi 6,6,1
+ std 6,0(5)
- ld 14,256(1)
- ld 15,264(1)
- ld 16,272(1)
- ld 17,280(1)
- ld 18,288(1)
- ld 19,296(1)
- ld 20,304(1)
- ld 21,312(1)
- ld 22,320(1)
- ld 23,328(1)
- ld 24,336(1)
- ld 25,344(1)
- ld 26,352(1)
- ld 27,360(1)
- ld 28,368(1)
- ld 29,376(1)
- ld 30,384(1)
- ld 31,400(1)
- mtlr 31
- ld 31,392(1)
- ld 2,408(1) /* also preserve R2, just in case .. */
+ /* r5 = &VG_(tt_fast) */
+ ld 5, .tocent__vgPlain_tt_fast@toc(2) /* &VG_(tt_fast) */
- addi 1,1,512
- blr
+ /* try a fast lookup in the translation cache */
+ /* r4 = VG_TT_FAST_HASH(addr) * sizeof(FastCacheEntry)
+ = ((r3 >>u 2) & VG_TT_FAST_MASK) << 4 */
+ rldicl 4,3, 62, 64-VG_TT_FAST_BITS /* entry# */
+ sldi 4,4,4 /* entry# * sizeof(FastCacheEntry) */
+ add 5,5,4 /* & VG_(tt_fast)[entry#] */
+ ld 6,0(5) /* .guest */
+ ld 7,8(5) /* .host */
+ cmpd 3,6
+ bne .fast_lookup_failed
+ /* Found a match. Jump to .host. */
+ mtctr 7
+ bctr
+.fast_lookup_failed:
+ /* stats only */
+ ld 5, .tocent__vgPlain_stats__n_xindir_misses@toc(2)
+ ld 6,0(5)
+ addi 6,6,1
+ std 6,0(5)
+
+ li 6,VG_TRC_INNER_FASTMISS
+ li 7,0
+ b .postamble
+ /*NOTREACHED*/
+
+/* ------ Assisted jump ------ */
+.section ".text"
+ .align 2
+ .globl VG_(disp_cp_xassisted)
+ .section ".opd","aw"
+ .align 3
+VG_(disp_cp_xassisted):
+ .quad .VG_(disp_cp_xassisted),.TOC.@tocbase,0
+ .previous
+ .type .VG_(disp_cp_xassisted),@function
+ .globl .VG_(disp_cp_xassisted)
+.VG_(disp_cp_xassisted):
+ /* r31 contains the TRC */
+ mr 6,31
+ li 7,0
+ b .postamble
+
+/* ------ Event check failed ------ */
+ .section ".text"
+ .align 2
+ .globl VG_(disp_cp_evcheck_fail)
+ .section ".opd","aw"
+ .align 3
+VG_(disp_cp_evcheck_fail):
+ .quad .VG_(disp_cp_evcheck_fail),.TOC.@tocbase,0
+ .previous
+ .type .VG_(disp_cp_evcheck_fail),@function
+ .globl .VG_(disp_cp_evcheck_fail)
+.VG_(disp_cp_evcheck_fail):
+ li 6,VG_TRC_INNER_COUNTERZERO
+ li 7,0
+ b .postamble
+
+
+.size .VG_(disp_run_translations), .-.VG_(disp_run_translations)
+
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
Modified: branches/TCHAIN/coregrind/m_translate.c (+17 -48)
===================================================================
--- branches/TCHAIN/coregrind/m_translate.c 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/m_translate.c 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -906,6 +906,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC64State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
Bool is64 = True;
IRType ty_Word = Ity_I64;
IROp op_CmpNE = Iop_CmpNE64;
@@ -919,6 +920,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC32State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC32State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC32State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC32State,guest_CIA);
Bool is64 = False;
IRType ty_Word = Ity_I32;
IROp op_CmpNE = Iop_CmpNE32;
@@ -970,7 +972,8 @@
mkU(0)
),
Ijk_EmFail,
- is64 ? IRConst_U64(0) : IRConst_U32(0)
+ is64 ? IRConst_U64(0) : IRConst_U32(0),
+ offB_CIA
)
);
@@ -997,6 +1000,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC64State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC64State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC64State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC64State,guest_CIA);
Bool is64 = True;
IRType ty_Word = Ity_I64;
IROp op_CmpNE = Iop_CmpNE64;
@@ -1008,6 +1012,7 @@
Int offB_REDIR_SP = offsetof(VexGuestPPC32State,guest_REDIR_SP);
Int offB_REDIR_STACK = offsetof(VexGuestPPC32State,guest_REDIR_STACK);
Int offB_EMWARN = offsetof(VexGuestPPC32State,guest_EMWARN);
+ Int offB_CIA = offsetof(VexGuestPPC32State,guest_CIA);
Bool is64 = False;
IRType ty_Word = Ity_I32;
IROp op_CmpNE = Iop_CmpNE32;
@@ -1049,7 +1054,8 @@
mkU(0)
),
Ijk_EmFail,
- is64 ? IRConst_U64(0) : IRConst_U32(0)
+ is64 ? IRConst_U64(0) : IRConst_U32(0),
+ offB_CIA
)
);
@@ -1514,58 +1520,21 @@
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 = (void*) &VG_(disp_cp_chain_me_to_slowEP);
- vta.disp_cp_chain_me_to_fastEP = (void*) &VG_(disp_cp_chain_me_to_fastEP);
- vta.disp_cp_xindir = (void*) &VG_(disp_cp_xindir);
+ vta.disp_cp_chain_me_to_slowEP
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_slowEP) );
+ vta.disp_cp_chain_me_to_fastEP
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_chain_me_to_fastEP) );
+ vta.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;
}
- /* Thins doesn't involve chaining and so is always allowable. */
- vta.disp_cp_xassisted = (void*) &VG_(disp_cp_xassisted);
+ /* This doesn't involve chaining and so is always allowable. */
+ vta.disp_cp_xassisted
+ = VG_(fnptr_to_fnentry)( &VG_(disp_cp_xassisted) );
-#if 0
- // FIXME tidy this up and make profiling work again
-# if defined(VGA_x86) || defined(VGA_amd64)
- if (!allow_redirection) {
- /* It's a no-redir translation. Will be run with the
- nonstandard dispatcher VG_(run_a_noredir_translation) and so
- needs a nonstandard return point. */
- vta.dispatch_assisted
- = (void*) &VG_(run_a_noredir_translation__return_point);
- vta.dispatch_unassisted
- = vta.dispatch_assisted;
- }
- else
- if (VG_(clo_profile_flags) > 0) {
- /* normal translation; although we're profiling. */
- vta.dispatch_assisted
- = (void*) &VG_(run_innerloop__dispatch_assisted_profiled);
- vta.dispatch_unassisted
- = (void*) &VG_(run_innerloop__dispatch_unassisted_profiled);
- }
- else {
- /* normal translation and we're not profiling (the normal case) */
- vta.dispatch_assisted
- = (void*) &VG_(run_innerloop__dispatch_assisted_unprofiled);
- vta.dispatch_unassisted
- = (void*) &VG_(run_innerloop__dispatch_unassisted_unprofiled);
- }
-
-# elif defined(VGA_ppc32) || defined(VGA_ppc64) \
- || defined(VGA_arm) || defined(VGA_s390x)
- /* See comment in libvex.h. This target uses a
- return-to-link-register scheme to get back to the dispatcher, so
- both fields are NULL. */
- vta.dispatch_assisted = NULL;
- vta.dispatch_unassisted = NULL;
-
-# else
-# error "Unknown arch"
-# endif
-#endif /* 0 */
-
/* Sheesh. Finally, actually _do_ the translation! */
tres = LibVEX_Translate ( &vta );
Modified: branches/TCHAIN/coregrind/pub_core_dispatch.h (+6 -6)
===================================================================
--- branches/TCHAIN/coregrind/pub_core_dispatch.h 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/pub_core_dispatch.h 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -66,13 +66,13 @@
/* We need to know addresses of the continuation-point (cp_) labels so
we can tell VEX what they are. They will get baked into the code
- VEX generates. The UChar is entirely mythical, but we need to
+ VEX generates. The type is entirely mythical, but we need to
state _some_ type, so as to keep gcc happy. */
-UChar VG_(disp_cp_chain_me_to_slowEP);
-UChar VG_(disp_cp_chain_me_to_fastEP);
-UChar VG_(disp_cp_xindir);
-UChar VG_(disp_cp_xassisted);
-UChar VG_(disp_cp_evcheck_fail);
+void VG_(disp_cp_chain_me_to_slowEP)(void);
+void VG_(disp_cp_chain_me_to_fastEP)(void);
+void VG_(disp_cp_xindir)(void);
+void VG_(disp_cp_xassisted)(void);
+void VG_(disp_cp_evcheck_fail)(void);
#endif // __PUB_CORE_DISPATCH_H
Modified: branches/TCHAIN/coregrind/m_transtab.c (+4 -2)
===================================================================
--- branches/TCHAIN/coregrind/m_transtab.c 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/m_transtab.c 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -805,8 +805,10 @@
UChar* place_to_patch
= ((HChar*)tte->tcptr) + ie->from_offs;
UChar* disp_cp_chain_me
- = ie->to_fastEP ? &VG_(disp_cp_chain_me_to_fastEP)
- : &VG_(disp_cp_chain_me_to_slowEP);
+ = VG_(fnptr_to_fnentry)(
+ ie->to_fastEP ? &VG_(disp_cp_chain_me_to_fastEP)
+ : &VG_(disp_cp_chain_me_to_slowEP)
+ );
UChar* place_to_jump_to_EXPECTED
= ie->to_fastEP ? to_fastEPaddr : to_slowEPaddr;
Modified: branches/TCHAIN/coregrind/m_scheduler/scheduler.c (+4 -3)
===================================================================
--- branches/TCHAIN/coregrind/m_scheduler/scheduler.c 2012-04-20 01:14:02 +01:00 (rev 12512)
+++ branches/TCHAIN/coregrind/m_scheduler/scheduler.c 2012-04-20 03:19:35 +01:00 (rev 12513)
@@ -871,8 +871,9 @@
//vg_assert(VG_(threads)[tid].siginfo.si_signo == 0);
/* Set up event counter stuff for the run. */
- tst->arch.vex.host_EvC_COUNTER = *dispatchCtrP;
- tst->arch.vex.host_EvC_FAILADDR = (HWord)&VG_(disp_cp_evcheck_fail);
+ tst->arch.vex.host_EvC_COUNTER = *dispatchCtrP;
+ tst->arch.vex.host_EvC_FAILADDR
+ = (HWord)VG_(fnptr_to_fnentry)( &VG_(disp_cp_evcheck_fail) );
if (0) {
vki_sigset_t m;
@@ -917,7 +918,7 @@
vg_assert((Int)tst->arch.vex.host_EvC_COUNTER >= -1);
vg_assert(tst->arch.vex.host_EvC_FAILADDR
- == (HWord)&VG_(disp_cp_evcheck_fail));
+ == (HWord)VG_(fnptr_to_fnentry)( &VG_(disp_cp_evcheck_fail)) );
done_this_time = *dispatchCtrP - ((Int)tst->arch.vex.host_EvC_COUNTER + 1);
|
|
From: <sv...@va...> - 2012-04-20 02:18:42
|
sewardj 2012-04-20 03:18:31 +0100 (Fri, 20 Apr 2012)
New Revision: 2290
Log:
Fill in some more bits to do with t-chaining for ppc64
(still doesn't work) (VEX side)
Modified files:
branches/TCHAIN/priv/host_ppc_defs.c
branches/TCHAIN/priv/host_ppc_isel.c
branches/TCHAIN/priv/main_main.c
Modified: branches/TCHAIN/priv/host_ppc_defs.c (+2 -2)
===================================================================
--- branches/TCHAIN/priv/host_ppc_defs.c 2012-04-20 01:13:28 +01:00 (rev 2289)
+++ branches/TCHAIN/priv/host_ppc_defs.c 2012-04-20 03:18:31 +01:00 (rev 2290)
@@ -3545,7 +3545,7 @@
/* Fix up the conditional jump, if there was one. */
if (i->Pin.XDirect.cond.test != Pct_ALWAYS) {
Int delta = p - ptmp;
- vassert(delta >= 16 && delta <= 32 && 0 == (delta & 3));
+ vassert(delta >= 16 && delta <= 64 && 0 == (delta & 3));
/* bc !ct,cf,delta */
mkFormB(ptmp, invertCondTest(i->Pin.XDirect.cond.test),
i->Pin.XDirect.cond.flag, (delta>>2), 0, 0);
@@ -4656,7 +4656,7 @@
/*NOTREACHED*/
done:
- vassert(p - &buf[0] <= 32);
+ vassert(p - &buf[0] <= 64);
return p - &buf[0];
}
Modified: branches/TCHAIN/priv/host_ppc_isel.c (+10 -10)
===================================================================
--- branches/TCHAIN/priv/host_ppc_isel.c 2012-04-20 01:13:28 +01:00 (rev 2289)
+++ branches/TCHAIN/priv/host_ppc_isel.c 2012-04-20 03:18:31 +01:00 (rev 2290)
@@ -4719,15 +4719,15 @@
/*---------------------------------------------------------*/
/* Translate an entire SB to ppc code. */
-HInstrArray* iselSB_PPC ( IRSB* bb,
- VexArch arch_host,
- VexArchInfo* archinfo_host,
- VexAbiInfo* vbi,
- Int offs_Host_EvC_Counter,
- Int offs_Host_EvC_FailAddr,
- Bool chainingAllowed,
- Bool addProfInc,
- Addr64 max_ga )
+HInstrArray* iselSB_PPC ( IRSB* bb,
+ VexArch arch_host,
+ VexArchInfo* archinfo_host,
+ VexAbiInfo* vbi,
+ Int offs_Host_EvC_Counter,
+ Int offs_Host_EvC_FailAddr,
+ Bool chainingAllowed,
+ Bool addProfInc,
+ Addr64 max_ga )
{
Int i, j;
HReg hregLo, hregMedLo, hregMedHi, hregHi;
@@ -4740,7 +4740,7 @@
vassert(arch_host == VexArchPPC32 || arch_host == VexArchPPC64);
mode64 = arch_host == VexArchPPC64;
- if (mode64) vassert(max_ga <= 0xFFFFFFFFULL);
+ if (!mode64) vassert(max_ga <= 0xFFFFFFFFULL);
/* do some sanity checks */
mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V
Modified: branches/TCHAIN/priv/main_main.c (+18 -16)
===================================================================
--- branches/TCHAIN/priv/main_main.c 2012-04-20 01:13:28 +01:00 (rev 2289)
+++ branches/TCHAIN/priv/main_main.c 2012-04-20 03:18:31 +01:00 (rev 2290)
@@ -334,7 +334,7 @@
host_word_type = Ity_I32;
vassert(are_valid_hwcaps(VexArchPPC32, vta->archinfo_host.hwcaps));
break;
-#if 0
+
case VexArchPPC64:
mode64 = True;
getAllocableRegs_PPC ( &n_available_real_regs,
@@ -347,16 +347,14 @@
ppInstr = (void(*)(HInstr*, Bool)) ppPPCInstr;
ppReg = (void(*)(HReg)) ppHRegPPC;
iselSB = iselSB_PPC;
- emit = (Int(*)(UChar*,Int,HInstr*,Bool,void*,void*))
+ emit = (Int(*)(Bool*,UChar*,Int,HInstr*,Bool,
+ void*,void*,void*,void*))
emit_PPCInstr;
host_is_bigendian = True;
host_word_type = Ity_I64;
vassert(are_valid_hwcaps(VexArchPPC64, vta->archinfo_host.hwcaps));
- /* return-to-dispatcher scheme */
- vassert(vta->dispatch_unassisted == NULL);
- vassert(vta->dispatch_assisted == NULL);
break;
-#endif
+
case VexArchS390X:
mode64 = True;
getAllocableRegs_S390 ( &n_available_real_regs,
@@ -462,16 +460,20 @@
vassert(sizeof( ((VexGuestPPC32State*)0)->guest_TILEN ) == 4);
vassert(sizeof( ((VexGuestPPC32State*)0)->guest_NRADDR ) == 4);
break;
-#if 0
+
case VexArchPPC64:
- preciseMemExnsFn = guest_ppc64_state_requires_precise_mem_exns;
- disInstrFn = disInstr_PPC;
- specHelper = guest_ppc64_spechelper;
- guest_sizeB = sizeof(VexGuestPPC64State);
- guest_word_type = Ity_I64;
- guest_layout = &ppc64Guest_layout;
- offB_TISTART = offsetof(VexGuestPPC64State,guest_TISTART);
- offB_TILEN = offsetof(VexGuestPPC64State,guest_TILEN);
+ preciseMemExnsFn = guest_ppc64_state_requires_precise_mem_exns;
+ disInstrFn = disInstr_PPC;
+ specHelper = guest_ppc64_spechelper;
+ guest_sizeB = sizeof(VexGuestPPC64State);
+ guest_word_type = Ity_I64;
+ guest_layout = &ppc64Guest_layout;
+ offB_TISTART = offsetof(VexGuestPPC64State,guest_TISTART);
+ offB_TILEN = offsetof(VexGuestPPC64State,guest_TILEN);
+ offB_GUEST_IP = offsetof(VexGuestPPC64State,guest_CIA);
+ szB_GUEST_IP = sizeof( ((VexGuestPPC64State*)0)->guest_CIA );
+ offB_HOST_EvC_COUNTER = offsetof(VexGuestPPC64State,host_EvC_COUNTER);
+ offB_HOST_EvC_FAILADDR = offsetof(VexGuestPPC64State,host_EvC_FAILADDR);
vassert(are_valid_hwcaps(VexArchPPC64, vta->archinfo_guest.hwcaps));
vassert(0 == sizeof(VexGuestPPC64State) % 16);
vassert(sizeof( ((VexGuestPPC64State*)0)->guest_TISTART ) == 8);
@@ -479,7 +481,7 @@
vassert(sizeof( ((VexGuestPPC64State*)0)->guest_NRADDR ) == 8);
vassert(sizeof( ((VexGuestPPC64State*)0)->guest_NRADDR_GPR2) == 8);
break;
-#endif
+
case VexArchS390X:
preciseMemExnsFn = guest_s390x_state_requires_precise_mem_exns;
disInstrFn = disInstr_S390;
|
|
From: Christian B. <bor...@de...> - 2012-04-20 02:14:20
|
valgrind revision: 12512 VEX revision: 2289 GCC version: gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] C library: GNU C Library stable release version 2.11.1 (20100118), by Roland McGrath et al. uname -mrs: Linux 2.6.32.54-0.3-default s390x Vendor version: Welcome to SUSE Linux Enterprise Server 11 SP1 (s390x) - Kernel %r (%t). Nightly build on sless390 ( SUSE Linux Enterprise Server 11 SP1 gcc 4.3.4 on z196 (s390x) ) Started at 2012-04-20 03:45:01 CEST Ended at 2012-04-20 04:13:42 CEST 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 == 525 tests, 4 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) |
|
From: Tom H. <to...@co...> - 2012-04-20 02:14:08
|
valgrind revision: 12512 VEX revision: 2289 C compiler: gcc (GCC) 4.7.0 20120322 (Red Hat 4.7.0-1) Assembler: GNU assembler version 2.22.52.0.1-10.fc17 20120131 C library: GNU C Library stable release version 2.15 uname -mrs: Linux 3.1.0-7.fc16.x86_64 x86_64 Vendor version: Fedora release 17 (Beefy Miracle) Nightly build on bristol ( x86_64, Fedora 17 (Beefy Miracle) ) Started at 2012-04-20 02:42:13 BST Ended at 2012-04-20 03:13:47 BST 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, 12 stderr failures, 1 stdout failure, 1 stderrB failure, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinfcallRU (stderr) gdbserver_tests/mcinfcallWSRU (stderr) gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/mcmain_pic (stderr) gdbserver_tests/nlcontrolc (stdoutB) gdbserver_tests/nlpasssigalrm (stdoutB) memcheck/tests/err_disable4 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/overlap (stderr) memcheck/tests/str_tester (stderr) none/tests/process_vm_readv_writev (stderr) drd/tests/bar_bad (stderr) drd/tests/bar_bad_xml (stderr) drd/tests/pth_cancel_locked (stderr) exp-sgcheck/tests/preen_invars (stdout) exp-sgcheck/tests/preen_invars (stderr) |
|
From: Christian B. <bor...@de...> - 2012-04-20 02:05:35
|
valgrind revision: 12512 VEX revision: 2289 GCC version: gcc (GCC) 4.5.3 20110121 (Red Hat 4.5.3-5) C library: GNU C Library stable release version 2.12.1, by Roland McGrath et al. uname -mrs: Linux 3.1.0-rc9-andreas-gde346b6-dirty s390x Vendor version: unknown Nightly build on fedora390 ( Fedora 13/14/15 mix with gcc 3.5.3 on z196 (s390x) ) Started at 2012-04-20 03:45:01 CEST Ended at 2012-04-20 04:05:31 CEST 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 == 524 tests, 8 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) drd/tests/circular_buffer (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) drd/tests/tc21_pthonce (stderr) |