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-02 21:56:12
|
sewardj 2012-04-02 22:56:03 +0100 (Mon, 02 Apr 2012)
New Revision: 12484
Log:
Add translation chaining support for amd64, x86 and ARM
(Valgrind side). See #296422.
Added files:
branches/TCHAIN/docs/internals/t-chaining-notes.txt
Modified files:
branches/TCHAIN/Makefile.all.am
branches/TCHAIN/coregrind/m_dispatch/dispatch-amd64-linux.S
branches/TCHAIN/coregrind/m_dispatch/dispatch-arm-linux.S
branches/TCHAIN/coregrind/m_dispatch/dispatch-x86-linux.S
branches/TCHAIN/coregrind/m_errormgr.c
branches/TCHAIN/coregrind/m_gdbserver/server.c
branches/TCHAIN/coregrind/m_libcproc.c
branches/TCHAIN/coregrind/m_main.c
branches/TCHAIN/coregrind/m_scheduler/scheduler.c
branches/TCHAIN/coregrind/m_translate.c
branches/TCHAIN/coregrind/m_transtab.c
branches/TCHAIN/coregrind/m_xarray.c
branches/TCHAIN/coregrind/pub_core_dispatch.h
branches/TCHAIN/coregrind/pub_core_dispatch_asm.h
branches/TCHAIN/coregrind/pub_core_libcproc.h
branches/TCHAIN/coregrind/pub_core_translate.h
branches/TCHAIN/coregrind/pub_core_transtab.h
branches/TCHAIN/coregrind/pub_core_transtab_asm.h
branches/TCHAIN/docs/Makefile.am
branches/TCHAIN/drd/drd_load_store.c
branches/TCHAIN/drd/tests/unit_bitmap.c
branches/TCHAIN/helgrind/hg_main.c
branches/TCHAIN/include/pub_tool_xarray.h
branches/TCHAIN/memcheck/tests/Makefile.am
branches/TCHAIN/memcheck/tests/unit_oset.c
branches/TCHAIN/none/tests/arm/Makefile.am
Added: branches/TCHAIN/docs/internals/t-chaining-notes.txt (+201 -0)
===================================================================
--- branches/TCHAIN/docs/internals/t-chaining-notes.txt 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/docs/internals/t-chaining-notes.txt 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -0,0 +1,201 @@
+
+DO NOT MERGE
+~~~~~~~~~~~
+
+Changes memcheck/tests/Makefile.am w.r.t. -mfloat-abi=softfp
+Ditto none/tests/arm/Makefile.am
+
+
+Verification todo
+~~~~~~~~~~~~~~~~~
+check that illegal insns on all targets don't cause the _toIR.c's to
+assert.
+
+check also with --vex-guest-chase-cond=yes
+
+check that all targets can run their insn set tests with
+--vex-guest-max-insns=1.
+
+
+Cleanups
+~~~~~~~~
+host_arm_isel.c and host_arm_defs.c: get rid of global var arm_hwcaps.
+
+host_x86_defs.c, host_amd64_defs.c: return proper VexInvalRange
+records from the patchers, instead of {0,0}, so that transparent
+self hosting works properly.
+
+
+Optimisations
+~~~~~~~~~~~~~
+all targets: change VG_(stats__n_xindirs) to a 32 bit counter, and
+empty out every now and again.
+
+amd64: XDirect: write const value to guest_RIP using single
+insn when the value is < 0x8000'0000
+
+arm: chain_XDirect: generate short form jumps when possible
+
+arm codegen: Generate ORRS for CmpwNEZ32(Or32(x,y))
+
+all targets: when nuking an entire sector, don't bother to undo the
+patching for any translations within the sector (nor with their
+invalidations).
+
+(somewhat implausible) for jumps to disp_cp_indir, have multiple
+copies of disp_cp_indir, one for each of the possible registers that
+could have held the target guest address before jumping to the stub.
+Then disp_cp_indir wouldn't have to reload it from memory each time.
+Might also have the effect of spreading out the indirect mispredict
+burden somewhat (across the multiple copies.)
+
+
+Implementation notes
+~~~~~~~~~~~~~~~~~~~~
+T-chaining changes -- summary
+
+* The code generators (host_blah_isel.c, host_blah_defs.[ch]) interact
+ more closely with Valgrind than before. In particular the
+ instruction selectors must use one of 3 different kinds of
+ control-transfer instructions: XDirect, XIndir and XAssisted.
+ All archs must use these the same; no more ad-hoc control transfer
+ instructions.
+ (more detail below)
+
+
+* With T-chaining, translations can jump between each other without
+ going through the dispatcher loop every time. This means that the
+ event check (counter dec, and exit if negative) the dispatcher loop
+ previously did now needs to be compiled into each translation.
+
+
+* The assembly dispatcher code (dispatch-arch-os.S) is still
+ present. It still provides table lookup services for
+ indirect branches, but it also provides a new feature:
+ dispatch points, to which the generated code jumps. There
+ are 5:
+
+ VG_(disp_cp_chain_me_to_slowEP):
+ VG_(disp_cp_chain_me_to_fastEP):
+ These are chain-me requests, used for Boring conditional and
+ unconditional jumps to destinations known at JIT time. The
+ generated code calls these (doesn't jump to them) and the
+ stub recovers the return address. These calls never return;
+ instead the call is done so that the stub knows where the
+ calling point is. It needs to know this so it can patch
+ the calling point to the requested destination.
+ VG_(disp_cp_xindir):
+ Old-style table lookup and go; used for indirect jumps
+ VG_(disp_cp_xassisted):
+ Most general and slowest kind. Can transfer to anywhere, but
+ first returns to scheduler to do some other event (eg a syscall)
+ before continuing.
+ VG_(disp_cp_evcheck_fail):
+ Code jumps here when the event check fails.
+
+
+* new instructions in backends: XDirect, XIndir and XAssisted.
+ XDirect is used for chainable jumps. It is compiled into a
+ call to VG_(disp_cp_chain_me_to_slowEP) or
+ VG_(disp_cp_chain_me_to_fastEP).
+
+ XIndir is used for indirect jumps. It is compiled into a jump
+ to VG_(disp_cp_xindir)
+
+ XAssisted is used for "assisted" (do something first, then jump)
+ transfers. It is compiled into a jump to VG_(disp_cp_xassisted)
+
+ All 3 of these may be conditional.
+
+ More complexity: in some circumstances (no-redir translations)
+ all transfers must be done with XAssisted. In such cases the
+ instruction selector will be told this.
+
+
+* Patching: XDirect is compiled basically into
+ %r11 = &VG_(disp_cp_chain_me_to_{slow,fast}EP)
+ call *%r11
+ Backends must provide a function (eg) chainXDirect_AMD64
+ which converts it into a jump to a specified destination
+ jmp $delta-of-PCs
+ or
+ %r11 = 64-bit immediate
+ jmpq *%r11
+ depending on branch distance.
+
+ Backends must provide a function (eg) unchainXDirect_AMD64
+ which restores the original call-to-the-stub version.
+
+
+* Event checks. Each translation now has two entry points,
+ the slow one (slowEP) and fast one (fastEP). Like this:
+
+ slowEP:
+ counter--
+ if (counter < 0) goto VG_(disp_cp_evcheck_fail)
+ fastEP:
+ (rest of the translation)
+
+ slowEP is used for control flow transfers that are or might be
+ a back edge in the control flow graph. Insn selectors are
+ given the address of the highest guest byte in the block so
+ they can determine which edges are definitely not back edges.
+
+ The counter is placed in the first 8 bytes of the guest state,
+ and the address of VG_(disp_cp_evcheck_fail) is placed in
+ the next 8 bytes. This allows very compact checks on all
+ targets, since no immediates need to be synthesised, eg:
+
+ decq 0(%baseblock-pointer)
+ jns fastEP
+ jmpq *8(baseblock-pointer)
+ fastEP:
+
+ On amd64 a non-failing check is therefore 2 insns; all 3 occupy
+ just 8 bytes.
+
+ On amd64 the event check is created by a special single
+ pseudo-instruction AMD64_EvCheck.
+
+
+* BB profiling (for --profile-flags=). The dispatch assembly
+ dispatch-arch-os.S no longer deals with this and so is much
+ simplified. Instead the profile inc is compiled into each
+ translation, as the insn immediately following the event
+ check. Again, on amd64 a pseudo-insn AMD64_ProfInc is used.
+ Counters are now 64 bit even on 32 bit hosts, to avoid overflow.
+
+ One complexity is that at JIT time it is not known where the
+ address of the counter is. To solve this, VexTranslateResult
+ now returns the offset of the profile inc in the generated
+ code. When the counter address is known, VEX can be called
+ again to patch it in. Backends must supply eg
+ patchProfInc_AMD64 to make this happen.
+
+
+* Front end changes (guest_blah_toIR.c)
+
+ The way the guest program counter is handled has changed
+ significantly. Previously, the guest PC was updated (in IR)
+ at the start of each instruction, except for the first insn
+ in an IRSB. This is inconsistent and doesn't work with the
+ new framework.
+
+ Now, each instruction must update the guest PC as its last
+ IR statement -- not its first. And no special exemption for
+ the first insn in the block. As before most of these are
+ optimised out by ir_opt, so no concerns about efficiency.
+
+ As a logical side effect of this, exits (IRStmt_Exit) and the
+ block-end transfer are both considered to write to the guest state
+ (the guest PC) and so need to be told the offset of it.
+
+ IR generators (eg disInstr_AMD64) are no longer allowed to set the
+ IRSB::next, to specify the block-end transfer address. Instead they
+ now indicate, to the generic steering logic that drives them (iow,
+ guest_generic_bb_to_IR.c), that the block has ended. This then
+ generates effectively "goto GET(PC)" (which, again, is optimised
+ away). What this does mean is that if the IR generator function
+ ends the IR of the last instruction in the block with an incorrect
+ assignment to the guest PC, execution will transfer to an incorrect
+ destination -- making the error obvious quickly.
Modified: branches/TCHAIN/drd/tests/unit_bitmap.c (+2 -0)
===================================================================
--- branches/TCHAIN/drd/tests/unit_bitmap.c 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/drd/tests/unit_bitmap.c 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -48,6 +48,8 @@
{ return memset(s, c, sz); }
void* VG_(memcpy)(void *d, const void *s, SizeT sz)
{ return memcpy(d, s, sz); }
+void* VG_(memmove)(void *d, const void *s, SizeT sz)
+{ return memmove(d, s, sz); }
Int VG_(memcmp)(const void* s1, const void* s2, SizeT n)
{ return memcmp(s1, s2, n); }
UInt VG_(printf)(const HChar *format, ...)
Modified: branches/TCHAIN/coregrind/m_xarray.c (+14 -0)
===================================================================
--- branches/TCHAIN/coregrind/m_xarray.c 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/coregrind/m_xarray.c 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -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: branches/TCHAIN/none/tests/arm/Makefile.am (+3 -3)
===================================================================
--- branches/TCHAIN/none/tests/arm/Makefile.am 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/none/tests/arm/Makefile.am 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -39,14 +39,14 @@
v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb
vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
- -mfpu=neon -mfloat-abi=softfp \
+ -mfpu=neon \
-mthumb
neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
- -mfpu=neon -mfloat-abi=softfp \
+ -mfpu=neon \
-mthumb
neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
- -mfpu=neon -mfloat-abi=softfp \
+ -mfpu=neon \
-mthumb
Modified: branches/TCHAIN/coregrind/m_transtab.c (+698 -181)
===================================================================
--- branches/TCHAIN/coregrind/m_transtab.c 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/coregrind/m_transtab.c 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -31,8 +31,10 @@
#include "pub_core_basics.h"
#include "pub_core_debuglog.h"
-#include "pub_core_machine.h" // For VG(machine_get_VexArchInfo)
+#include "pub_core_machine.h" // For VG_(machine_get_VexArchInfo)
#include "pub_core_libcbase.h"
+#include "pub_core_vki.h" // to keep pub_core_libproc.h happy, sigh
+#include "pub_core_libcproc.h" // VG_(invalidate_icache)
#include "pub_core_libcassert.h"
#include "pub_core_libcprint.h"
#include "pub_core_options.h"
@@ -40,14 +42,10 @@
#include "pub_core_transtab.h"
#include "pub_core_aspacemgr.h"
#include "pub_core_mallocfree.h" // VG_(out_of_memory_NORETURN)
+#include "pub_core_xarray.h"
+#include "pub_core_dispatch.h" // For VG_(disp_cp*) addresses
-// JRS FIXME get rid of this somehow
-#if defined(VGP_arm_linux)
-# include "pub_core_vkiscnums.h" // __ARM_NR_cacheflush
-# include "pub_core_syscall.h" // VG_(do_syscallN)
-#endif
-
/* #define DEBUG_TRANSTAB */
@@ -67,6 +65,7 @@
'deleted') and it is strongly recommended not to change this.
65521 is the largest prime <= 65535. */
#define N_TTES_PER_SECTOR /*30011*/ /*40009*/ 65521
+//DEBUG-ONLY: #define N_TTES_PER_SECTOR 10007
/* Because each sector contains a hash table of TTEntries, we need to
specify the maximum allowable loading, after which the sector is
@@ -91,6 +90,46 @@
/*------------------ TYPES ------------------*/
+/* In edges ("to-me") in the graph created by chaining. */
+typedef
+ struct {
+ UInt from_sNo; /* sector number */
+ UInt from_tteNo; /* TTE number in given sector */
+ UInt from_offs; /* code offset from TCEntry::tcptr where the patch is */
+ Bool to_fastEP; /* Is the patch to a fast or slow entry point? */
+ }
+ InEdge;
+
+
+/* Out edges ("from-me") in the graph created by chaining. */
+typedef
+ struct {
+ UInt to_sNo; /* sector number */
+ UInt to_tteNo; /* TTE number in given sector */
+ UInt from_offs; /* code offset in owning translation where patch is */
+ }
+ OutEdge;
+
+
+#define N_FIXED_IN_EDGE_ARR 3
+typedef
+ struct {
+ UInt n_fixed; /* 0 .. N_FIXED_IN_EDGE_ARR */
+ InEdge fixed[N_FIXED_IN_EDGE_ARR];
+ XArray* var; /* XArray* of InEdgeArr */
+ }
+ InEdgeArr;
+
+#define N_FIXED_OUT_EDGE_ARR 2
+typedef
+ struct {
+ UInt n_fixed; /* 0 .. N_FIXED_OUT_EDGE_ARR */
+ OutEdge fixed[N_FIXED_OUT_EDGE_ARR];
+ XArray* var; /* XArray* of OutEdgeArr */
+ }
+ OutEdgeArr;
+
+
/* A translation-table entry. This indicates precisely which areas of
guest code are included in the translation, and contains all other
auxiliary info too. */
@@ -102,7 +141,7 @@
Count is an entry count for the translation and is
incremented by 1 every time the translation is used, if we
are profiling. */
- UInt count;
+ ULong count;
UShort weight;
/* Status of the slot. Note, we need to be able to do lazy
@@ -143,15 +182,70 @@
// sec->ec2tte[ tte2ec_ec[i] ][ tte2ec_ix[i] ]
// should be the index
// of this TTEntry in the containing Sector's tt array.
+
+ /* Admin information for chaining. 'in_edges' is a set of the
+ patch points which jump to this translation -- hence are
+ predecessors in the control flow graph. 'out_edges' points
+ to successors in the control flow graph -- translations to
+ which this one has a patched jump. In short these are just
+ backwards and forwards edges in the graph of patched-together
+ blocks. The 'in_edges' contain slightly more info, enough
+ that we can undo the chaining of each mentioned patch point.
+ The 'out_edges' list exists only so that we can visit the
+ 'in_edges' entries of all blocks we're patched through to, in
+ order to remove ourselves from then when we're deleted. */
+
+ /* It is possible, although very unlikely, that a block A has
+ more than one patched jump to block B. This could happen if
+ (eg) A finishes "jcond B; jmp B".
+
+ This means in turn that B's in_edges set can list A more than
+ once (twice in this example). However, each such entry must
+ have a different from_offs, since a patched jump can only
+ jump to one place at once (it's meaningless for it to have
+ multiple destinations.) IOW, the successor and predecessor
+ edges in the graph are not uniquely determined by a
+ TTEntry --> TTEntry pair, but rather by a
+ (TTEntry,offset) --> TTEntry triple.
+
+ If A has multiple edges to B then B will mention A multiple
+ times in its in_edges. To make things simpler, we then
+ require that A mentions B exactly the same number of times in
+ its out_edges. Furthermore, a matching out-in pair must have
+ the same offset (from_offs). This facilitates sanity
+ checking, and it facilitates establishing the invariant that
+ a out_edges set may not have duplicates when using the
+ equality defined by (TTEntry,offset). Hence the out_edges
+ and in_edges sets really do have both have set semantics.
+
+ eg if A has been patched to B at offsets 42 and 87 (in A)
+ then A.out_edges = { (B,42), (B,87) } (in any order)
+ and B.in_edges = { (A,42), (A,87) } (in any order)
+
+ Hence for each node pair P->Q in the graph, there's a 1:1
+ mapping between P.out_edges and Q.in_edges.
+ */
+ InEdgeArr in_edges;
+ OutEdgeArr out_edges;
}
TTEntry;
+/* A structure used for mapping host code addresses back to the
+ relevant TTEntry. Used when doing chaining, for finding the
+ TTEntry to which some arbitrary patch address belongs. */
+typedef
+ struct {
+ UChar* start;
+ UInt len;
+ UInt tteNo;
+ }
+ HostExtent;
+
/* Finally, a sector itself. Each sector contains an array of
TCEntries, which hold code, and an array of TTEntries, containing
all required administrative info. Profiling is supported using the
- TTEntry .count and .weight fields, if required. Each sector is
- independent in that no cross-sector references are allowed.
+ TTEntry .count and .weight fields, if required.
If the sector is not in use, all three pointers are NULL and
tt_n_inuse is zero.
@@ -181,6 +275,11 @@
Int ec2tte_size[ECLASS_N];
Int ec2tte_used[ECLASS_N];
UShort* ec2tte[ECLASS_N];
+
+ /* The host extents. The [start, +len) ranges are constructed
+ in strictly non-overlapping order, so we can binary search
+ them at any time. */
+ XArray* host_extents; /* XArray* of HostExtent */
}
Sector;
@@ -238,31 +337,7 @@
*/
/*global*/ __attribute__((aligned(16)))
FastCacheEntry VG_(tt_fast)[VG_TT_FAST_SIZE];
-/*
-#define TRANSTAB_BOGUS_GUEST_ADDR ((Addr)1)
-*/
-/* For profiling, we have a parallel array of pointers to .count
- fields in TT entries. Again, these pointers must be invalidated
- when translations disappear. A NULL pointer suffices to indicate
- an unused slot.
-
- When not profiling (the normal case, VG_(clo_profile_flags) == 0),
- all tt_fastN entries are set to NULL at startup and never read nor
- written after that.
-
- When profiling (VG_(clo_profile_flags) > 0), tt_fast and tt_fastN
- change together: if tt_fast[i].guest is TRANSTAB_BOGUS_GUEST_ADDR
- then the corresponding tt_fastN[i] must be null. If
- tt_fast[i].guest is any other value, then tt_fastN[i] *must* point
- to the .count field of the corresponding TT entry.
-
- tt_fast and tt_fastN are referred to from assembly code
- (dispatch.S).
-*/
-/*global*/ UInt* VG_(tt_fastN)[VG_TT_FAST_SIZE];
-
-
/* Make sure we're not used before initialisation. */
static Bool init_done = False;
@@ -270,30 +345,483 @@
/*------------------ STATS DECLS ------------------*/
/* Number of fast-cache updates and flushes done. */
-ULong n_fast_flushes = 0;
-ULong n_fast_updates = 0;
+static ULong n_fast_flushes = 0;
+static ULong n_fast_updates = 0;
/* Number of full lookups done. */
-ULong n_full_lookups = 0;
-ULong n_lookup_probes = 0;
+static ULong n_full_lookups = 0;
+static ULong n_lookup_probes = 0;
/* Number/osize/tsize of translations entered; also the number of
those for which self-checking was requested. */
-ULong n_in_count = 0;
-ULong n_in_osize = 0;
-ULong n_in_tsize = 0;
-ULong n_in_sc_count = 0;
+static ULong n_in_count = 0;
+static ULong n_in_osize = 0;
+static ULong n_in_tsize = 0;
+static ULong n_in_sc_count = 0;
/* Number/osize of translations discarded due to lack of space. */
-ULong n_dump_count = 0;
-ULong n_dump_osize = 0;
+static ULong n_dump_count = 0;
+static ULong n_dump_osize = 0;
/* Number/osize of translations discarded due to requests to do so. */
-ULong n_disc_count = 0;
-ULong n_disc_osize = 0;
+static ULong n_disc_count = 0;
+static ULong n_disc_osize = 0;
/*-------------------------------------------------------------*/
+/*--- Misc ---*/
+/*-------------------------------------------------------------*/
+
+static void* ttaux_malloc ( HChar* tag, SizeT n )
+{
+ return VG_(arena_malloc)(VG_AR_TTAUX, tag, n);
+}
+
+static void ttaux_free ( void* p )
+{
+ VG_(arena_free)(VG_AR_TTAUX, p);
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- Chaining support ---*/
+/*-------------------------------------------------------------*/
+
+static inline TTEntry* index_tte ( UInt sNo, UInt tteNo )
+{
+ vg_assert(sNo < N_SECTORS);
+ vg_assert(tteNo < N_TTES_PER_SECTOR);
+ Sector* s = §ors[sNo];
+ vg_assert(s->tt);
+ TTEntry* tte = &s->tt[tteNo];
+ vg_assert(tte->status == InUse);
+ return tte;
+}
+
+static void InEdge__init ( InEdge* ie )
+{
+ ie->from_sNo = -1; /* invalid */
+ ie->from_tteNo = 0;
+ ie->from_offs = 0;
+ ie->to_fastEP = False;
+}
+
+static void OutEdge__init ( OutEdge* oe )
+{
+ oe->to_sNo = -1; /* invalid */
+ oe->to_tteNo = 0;
+ oe->from_offs = 0;
+}
+
+static void TTEntry__init ( TTEntry* tte )
+{
+ VG_(memset)(tte, 0, sizeof(*tte));
+}
+
+static UWord InEdgeArr__size ( InEdgeArr* iea )
+{
+ if (iea->var) {
+ vg_assert(iea->n_fixed == 0);
+ return VG_(sizeXA)(iea->var);
+ } else {
+ vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR);
+ return iea->n_fixed;
+ }
+}
+
+static void InEdgeArr__makeEmpty ( InEdgeArr* iea )
+{
+ if (iea->var) {
+ vg_assert(iea->n_fixed == 0);
+ VG_(deleteXA)(iea->var);
+ iea->var = NULL;
+ } else {
+ vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR);
+ iea->n_fixed = 0;
+ }
+}
+
+static
+InEdge* InEdgeArr__index ( InEdgeArr* iea, UWord i )
+{
+ if (iea->var) {
+ vg_assert(iea->n_fixed == 0);
+ return (InEdge*)VG_(indexXA)(iea->var, i);
+ } else {
+ vg_assert(i < iea->n_fixed);
+ return &iea->fixed[i];
+ }
+}
+
+static
+void InEdgeArr__deleteIndex ( InEdgeArr* iea, UWord i )
+{
+ if (iea->var) {
+ vg_assert(iea->n_fixed == 0);
+ VG_(removeIndexXA)(iea->var, i);
+ } else {
+ vg_assert(i < iea->n_fixed);
+ for (; i+1 < iea->n_fixed; i++) {
+ iea->fixed[i] = iea->fixed[i+1];
+ }
+ iea->n_fixed--;
+ }
+}
+
+static
+void InEdgeArr__add ( InEdgeArr* iea, InEdge* ie )
+{
+ if (iea->var) {
+ vg_assert(iea->n_fixed == 0);
+ VG_(addToXA)(iea->var, ie);
+ } else {
+ vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR);
+ if (iea->n_fixed == N_FIXED_IN_EDGE_ARR) {
+ /* The fixed array is full, so we have to initialise an
+ XArray and copy the fixed array into it. */
+ iea->var = VG_(newXA)(ttaux_malloc, "transtab.IEA__add",
+ ttaux_free,
+ sizeof(InEdge));
+ UWord i;
+ for (i = 0; i < iea->n_fixed; i++) {
+ VG_(addToXA)(iea->var, &iea->fixed[i]);
+ }
+ VG_(addToXA)(iea->var, ie);
+ iea->n_fixed = 0;
+ } else {
+ /* Just add to the fixed array. */
+ iea->fixed[iea->n_fixed++] = *ie;
+ }
+ }
+}
+
+static UWord OutEdgeArr__size ( OutEdgeArr* oea )
+{
+ if (oea->var) {
+ vg_assert(oea->n_fixed == 0);
+ return VG_(sizeXA)(oea->var);
+ } else {
+ vg_assert(oea->n_fixed <= N_FIXED_OUT_EDGE_ARR);
+ return oea->n_fixed;
+ }
+}
+
+static void OutEdgeArr__makeEmpty ( OutEdgeArr* oea )
+{
+ if (oea->var) {
+ vg_assert(oea->n_fixed == 0);
+ VG_(deleteXA)(oea->var);
+ oea->var = NULL;
+ } else {
+ vg_assert(oea->n_fixed <= N_FIXED_OUT_EDGE_ARR);
+ oea->n_fixed = 0;
+ }
+}
+
+static
+OutEdge* OutEdgeArr__index ( OutEdgeArr* oea, UWord i )
+{
+ if (oea->var) {
+ vg_assert(oea->n_fixed == 0);
+ return (OutEdge*)VG_(indexXA)(oea->var, i);
+ } else {
+ vg_assert(i < oea->n_fixed);
+ return &oea->fixed[i];
+ }
+}
+
+static
+void OutEdgeArr__deleteIndex ( OutEdgeArr* oea, UWord i )
+{
+ if (oea->var) {
+ vg_assert(oea->n_fixed == 0);
+ VG_(removeIndexXA)(oea->var, i);
+ } else {
+ vg_assert(i < oea->n_fixed);
+ for (; i+1 < oea->n_fixed; i++) {
+ oea->fixed[i] = oea->fixed[i+1];
+ }
+ oea->n_fixed--;
+ }
+}
+
+static
+void OutEdgeArr__add ( OutEdgeArr* oea, OutEdge* oe )
+{
+ if (oea->var) {
+ vg_assert(oea->n_fixed == 0);
+ VG_(addToXA)(oea->var, oe);
+ } else {
+ vg_assert(oea->n_fixed <= N_FIXED_OUT_EDGE_ARR);
+ if (oea->n_fixed == N_FIXED_OUT_EDGE_ARR) {
+ /* The fixed array is full, so we have to initialise an
+ XArray and copy the fixed array into it. */
+ oea->var = VG_(newXA)(ttaux_malloc, "transtab.OEA__add",
+ ttaux_free,
+ sizeof(OutEdge));
+ UWord i;
+ for (i = 0; i < oea->n_fixed; i++) {
+ VG_(addToXA)(oea->var, &oea->fixed[i]);
+ }
+ VG_(addToXA)(oea->var, oe);
+ oea->n_fixed = 0;
+ } else {
+ /* Just add to the fixed array. */
+ oea->fixed[oea->n_fixed++] = *oe;
+ }
+ }
+}
+
+static
+Int HostExtent__cmpOrd ( void* v1, void* v2 )
+{
+ HostExtent* hx1 = (HostExtent*)v1;
+ HostExtent* hx2 = (HostExtent*)v2;
+ if (hx1->start + hx1->len <= hx2->start) return -1;
+ if (hx2->start + hx2->len <= hx1->start) return 1;
+ return 0; /* partial overlap */
+}
+
+static __attribute__((noinline))
+Bool find_TTEntry_from_hcode( /*OUT*/UInt* from_sNo,
+ /*OUT*/UInt* from_tteNo,
+ void* hcode )
+{
+ Int i;
+
+ /* Search order logic copied from VG_(search_transtab). */
+ for (i = 0; i < N_SECTORS; i++) {
+ Int sno = sector_search_order[i];
+ if (UNLIKELY(sno == -1))
+ return False; /* run out of sectors to search */
+
+ Sector* sec = §ors[sno];
+ XArray* /* of HostExtent */ host_extents = sec->host_extents;
+ vg_assert(host_extents);
+
+ HostExtent key;
+ VG_(memset)(&key, 0, sizeof(key));
+ key.start = hcode;
+ key.len = 1;
+ Word firstW = -1, lastW = -1;
+ Bool found = VG_(lookupXA_UNSAFE)(
+ host_extents, &key, &firstW, &lastW,
+ (Int(*)(void*,void*))HostExtent__cmpOrd
+ );
+ vg_assert(firstW == lastW); // always true, even if not found
+ if (found) {
+ HostExtent* hx = VG_(indexXA)(host_extents, firstW);
+ UInt tteNo = hx->tteNo;
+ /* Do some additional sanity checks. */
+ vg_assert(tteNo <= N_TTES_PER_SECTOR);
+ vg_assert(sec->tt[tteNo].status == InUse);
+ /* Can only half check that the found TTEntry contains hcode,
+ due to not having a length value for the hcode in the
+ TTEntry. */
+ vg_assert((UChar*)sec->tt[tteNo].tcptr <= (UChar*)hcode);
+ /* Looks plausible */
+ *from_sNo = sno;
+ *from_tteNo = (UInt)tteNo;
+ return True;
+ }
+ }
+ return False;
+}
+
+
+/* Figure out whether or not hcode is jitted code present in the main
+ code cache (but not in the no-redir cache). Used for sanity
+ checking. */
+static Bool is_in_the_main_TC ( void* hcode )
+{
+ Int i, sno;
+ for (i = 0; i < N_SECTORS; i++) {
+ sno = sector_search_order[i];
+ if (sno == -1)
+ break; /* run out of sectors to search */
+ if ((UChar*)hcode >= (UChar*)sectors[sno].tc
+ && (UChar*)hcode <= (UChar*)sectors[sno].tc_next
+ + sizeof(ULong) - 1)
+ return True;
+ }
+ return False;
+}
+
+
+/* Fulfill a chaining request, and record admin info so we
+ can undo it later, if required.
+*/
+void VG_(tt_tc_do_chaining) ( void* from__patch_addr,
+ UInt to_sNo,
+ UInt to_tteNo,
+ Bool to_fastEP )
+{
+ /* Get the CPU info established at startup. */
+ VexArch vex_arch = VexArch_INVALID;
+ VG_(machine_get_VexArchInfo)( &vex_arch, NULL );
+
+ // host_code is where we're patching to. So it needs to
+ // take into account, whether we're jumping to the slow
+ // or fast entry point. By definition, the fast entry point
+ // is exactly one event check's worth of code along from
+ // the slow (tcptr) entry point.
+ TTEntry* to_tte = index_tte(to_sNo, to_tteNo);
+ void* host_code = ((UChar*)to_tte->tcptr)
+ + (to_fastEP ? LibVEX_evCheckSzB(vex_arch) : 0);
+
+ // stay sane -- the patch point (dst) is in this sector's code cache
+ vg_assert( (UChar*)host_code >= (UChar*)sectors[to_sNo].tc );
+ vg_assert( (UChar*)host_code <= (UChar*)sectors[to_sNo].tc_next
+ + sizeof(ULong) - 1 );
+ // stay sane -- the patch src is in some sector's code cache
+ vg_assert( is_in_the_main_TC(from__patch_addr) );
+
+ /* 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 );
+ VG_(invalidate_icache)( (void*)vir.start, vir.len );
+
+ /* Now do the tricky bit -- update the ch_succs and ch_preds info
+ for the two translations involved, so we can undo the chaining
+ later, which we will have to do if the to_ block gets removed
+ for whatever reason. */
+ /* Find the TTEntry for the from__ code. This isn't simple since
+ we only know the patch address, which is going to be somewhere
+ inside the from_ block. */
+ UInt from_sNo = (UInt)-1;
+ UInt from_tteNo = (UInt)-1;
+ Bool from_found
+ = find_TTEntry_from_hcode( &from_sNo, &from_tteNo,
+ from__patch_addr );
+ vg_assert(from_found);
+ TTEntry* from_tte = index_tte(from_sNo, from_tteNo);
+
+ /* This is the new from_ -> to_ link to add. */
+ InEdge ie;
+ InEdge__init(&ie);
+ ie.from_sNo = from_sNo;
+ ie.from_tteNo = from_tteNo;
+ ie.to_fastEP = to_fastEP;
+ HWord from_offs = (HWord)( (UChar*)from__patch_addr
+ - (UChar*)from_tte->tcptr );
+ vg_assert(from_offs < 100000/* let's say */);
+ ie.from_offs = (UInt)from_offs;
+
+ /* This is the new to_ -> from_ backlink to add. */
+ OutEdge oe;
+ OutEdge__init(&oe);
+ oe.to_sNo = to_sNo;
+ oe.to_tteNo = to_tteNo;
+ oe.from_offs = (UInt)from_offs;
+
+ /* Add .. */
+ InEdgeArr__add(&to_tte->in_edges, &ie);
+ OutEdgeArr__add(&from_tte->out_edges, &oe);
+}
+
+
+/* Unchain one patch, as described by the specified InEdge. For
+ sanity check purposes only (to check that the patched location is
+ as expected) it also requires the fast and slow entry point
+ addresses of the destination block (that is, the block that owns
+ this InEdge). */
+__attribute__((noinline))
+static void unchain_one ( VexArch vex_arch,
+ InEdge* ie,
+ void* to_fastEPaddr, void* to_slowEPaddr )
+{
+ vg_assert(ie);
+ TTEntry* tte
+ = index_tte(ie->from_sNo, ie->from_tteNo);
+ 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);
+ UChar* place_to_jump_to_EXPECTED
+ = ie->to_fastEP ? to_fastEPaddr : to_slowEPaddr;
+
+ // stay sane: both src and dst for this unchaining are
+ // in the main code cache
+ vg_assert( is_in_the_main_TC(place_to_patch) ); // src
+ vg_assert( is_in_the_main_TC(place_to_jump_to_EXPECTED) ); // dst
+ // dst check is ok because LibVEX_UnChain checks that
+ // place_to_jump_to_EXPECTED really is the current dst, and
+ // asserts if it isn't.
+ VexInvalRange vir
+ = LibVEX_UnChain( vex_arch, place_to_patch,
+ place_to_jump_to_EXPECTED, disp_cp_chain_me );
+ VG_(invalidate_icache)( (void*)vir.start, vir.len );
+}
+
+
+/* The specified block is about to be deleted. Update the preds and
+ succs of its associated blocks accordingly. This includes undoing
+ any chained jumps to this block. */
+static
+void unchain_in_preparation_for_deletion ( VexArch vex_arch,
+ UInt here_sNo, UInt here_tteNo )
+{
+ if (0)
+ VG_(printf)("QQQ unchain_in_prep %u.%u\n", here_sNo, here_tteNo);
+ UWord i, j, n, m;
+ Int evCheckSzB = LibVEX_evCheckSzB(vex_arch);
+ TTEntry* here_tte = index_tte(here_sNo, here_tteNo);
+ vg_assert(here_tte->status == InUse);
+
+ /* Visit all InEdges owned by here_tte. */
+ n = InEdgeArr__size(&here_tte->in_edges);
+ for (i = 0; i < n; i++) {
+ InEdge* ie = InEdgeArr__index(&here_tte->in_edges, i);
+ // Undo the chaining.
+ UChar* here_slow_EP = (UChar*)here_tte->tcptr;
+ UChar* here_fast_EP = here_slow_EP + evCheckSzB;
+ unchain_one(vex_arch, ie, here_fast_EP, here_slow_EP);
+ // Find the corresponding entry in the "from" node's out_edges,
+ // and remove it.
+ TTEntry* from_tte = index_tte(ie->from_sNo, ie->from_tteNo);
+ m = OutEdgeArr__size(&from_tte->out_edges);
+ vg_assert(m > 0); // it must have at least one entry
+ for (j = 0; j < m; j++) {
+ OutEdge* oe = OutEdgeArr__index(&from_tte->out_edges, j);
+ if (oe->to_sNo == here_sNo && oe->to_tteNo == here_tteNo
+ && oe->from_offs == ie->from_offs)
+ break;
+ }
+ vg_assert(j < m); // "oe must be findable"
+ OutEdgeArr__deleteIndex(&from_tte->out_edges, j);
+ }
+
+ /* Visit all OutEdges owned by here_tte. */
+ n = OutEdgeArr__size(&here_tte->out_edges);
+ for (i = 0; i < n; i++) {
+ OutEdge* oe = OutEdgeArr__index(&here_tte->out_edges, i);
+ // Find the corresponding entry in the "to" node's in_edges,
+ // and remove it.
+ TTEntry* to_tte = index_tte(oe->to_sNo, oe->to_tteNo);
+ m = InEdgeArr__size(&to_tte->in_edges);
+ vg_assert(m > 0); // it must have at least one entry
+ for (j = 0; j < m; j++) {
+ InEdge* ie = InEdgeArr__index(&to_tte->in_edges, j);
+ if (ie->from_sNo == here_sNo && ie->from_tteNo == here_tteNo
+ && ie->from_offs == oe->from_offs)
+ break;
+ }
+ vg_assert(j < m); // "ie must be findable"
+ InEdgeArr__deleteIndex(&to_tte->in_edges, j);
+ }
+
+ InEdgeArr__makeEmpty(&here_tte->in_edges);
+ OutEdgeArr__makeEmpty(&here_tte->out_edges);
+}
+
+
+/*-------------------------------------------------------------*/
/*--- Address-range equivalence class stuff ---*/
/*-------------------------------------------------------------*/
@@ -398,12 +926,12 @@
old_sz = sec->ec2tte_size[ec];
old_ar = sec->ec2tte[ec];
new_sz = old_sz==0 ? 8 : old_sz<64 ? 2*old_sz : (3*old_sz)/2;
- new_ar = VG_(arena_malloc)(VG_AR_TTAUX, "transtab.aECN.1",
- new_sz * sizeof(UShort));
+ new_ar = ttaux_malloc("transtab.aECN.1",
+ new_sz * sizeof(UShort));
for (i = 0; i < old_sz; i++)
new_ar[i] = old_ar[i];
if (old_ar)
- VG_(arena_free)(VG_AR_TTAUX, old_ar);
+ ttaux_free(old_ar);
sec->ec2tte_size[ec] = new_sz;
sec->ec2tte[ec] = new_ar;
@@ -575,7 +1103,6 @@
/* forwards */
static Bool sanity_check_redir_tt_tc ( void );
-static Bool sanity_check_fastcache ( void );
static Bool sanity_check_sector_search_order ( void )
{
@@ -630,8 +1157,6 @@
}
if ( !sanity_check_redir_tt_tc() )
return False;
- if ( !sanity_check_fastcache() )
- return False;
if ( !sanity_check_sector_search_order() )
return False;
return True;
@@ -669,13 +1194,11 @@
return k32 % N_TTES_PER_SECTOR;
}
-static void setFastCacheEntry ( Addr64 key, ULong* tcptr, UInt* count )
+static void setFastCacheEntry ( Addr64 key, ULong* tcptr )
{
UInt cno = (UInt)VG_TT_FAST_HASH(key);
VG_(tt_fast)[cno].guest = (Addr)key;
VG_(tt_fast)[cno].host = (Addr)tcptr;
- if (VG_(clo_profile_flags) > 0)
- VG_(tt_fastN)[cno] = count;
n_fast_updates++;
/* This shouldn't fail. It should be assured by m_translate
which should reject any attempt to make translation of code
@@ -683,23 +1206,7 @@
vg_assert(VG_(tt_fast)[cno].guest != TRANSTAB_BOGUS_GUEST_ADDR);
}
-/* Invalidate the fast cache's counter array, VG_(tt_fastN). */
-static void invalidateFastNCache ( void )
-{
- UInt j;
- vg_assert(VG_TT_FAST_SIZE > 0 && (VG_TT_FAST_SIZE % 4) == 0);
- for (j = 0; j < VG_TT_FAST_SIZE; j += 4) {
- VG_(tt_fastN)[j+0] = NULL;
- VG_(tt_fastN)[j+1] = NULL;
- VG_(tt_fastN)[j+2] = NULL;
- VG_(tt_fastN)[j+3] = NULL;
- }
- vg_assert(j == VG_TT_FAST_SIZE);
-}
-
-/* Invalidate the fast cache VG_(tt_fast). If profiling, also
- invalidate the fast cache's counter array VG_(tt_fastN), otherwise
- don't touch it. */
+/* Invalidate the fast cache VG_(tt_fast). */
static void invalidateFastCache ( void )
{
UInt j;
@@ -713,42 +1220,19 @@
VG_(tt_fast)[j+3].guest = TRANSTAB_BOGUS_GUEST_ADDR;
}
- if (VG_(clo_profile_flags) > 0)
- invalidateFastNCache();
-
vg_assert(j == VG_TT_FAST_SIZE);
n_fast_flushes++;
}
-static Bool sanity_check_fastcache ( void )
+/* Returns True if the sector has been used before (hence, if we have
+ to eject existing code in it), False if it's never been used
+ before. */
+static Bool initialiseSector ( Int sno )
{
- UInt j;
- if (0) VG_(printf)("sanity check fastcache\n");
- if (VG_(clo_profile_flags) > 0) {
- /* profiling */
- for (j = 0; j < VG_TT_FAST_SIZE; j++) {
- if (VG_(tt_fastN)[j] == NULL
- && VG_(tt_fast)[j].guest != TRANSTAB_BOGUS_GUEST_ADDR)
- return False;
- if (VG_(tt_fastN)[j] != NULL
- && VG_(tt_fast)[j].guest == TRANSTAB_BOGUS_GUEST_ADDR)
- return False;
- }
- } else {
- /* not profiling */
- for (j = 0; j < VG_TT_FAST_SIZE; j++) {
- if (VG_(tt_fastN)[j] != NULL)
- return False;
- }
- }
- return True;
-}
-
-static void initialiseSector ( Int sno )
-{
- Int i;
- SysRes sres;
+ Int i;
+ SysRes sres;
Sector* sec;
+ Bool has_been_used_before = False;
vg_assert(isValidSector(sno));
{ Bool sane = sanity_check_sector_search_order();
@@ -768,6 +1252,7 @@
vg_assert(sec->ec2tte_used[i] == 0);
vg_assert(sec->ec2tte[i] == NULL);
}
+ vg_assert(sec->host_extents == NULL);
VG_(debugLog)(1,"transtab", "allocate sector %d\n", sno);
@@ -793,6 +1278,12 @@
sec->tt[i].n_tte2ec = 0;
}
+ /* Set up the host_extents array. */
+ sec->host_extents
+ = VG_(newXA)(ttaux_malloc, "transtab.initialiseSector(host_extents)",
+ ttaux_free,
+ sizeof(HostExtent));
+
/* Add an entry in the sector_search_order */
for (i = 0; i < N_SECTORS; i++) {
if (sector_search_order[i] == -1)
@@ -808,11 +1299,16 @@
/* Sector has been used before. Dump the old contents. */
VG_(debugLog)(1,"transtab", "recycle sector %d\n", sno);
+ has_been_used_before = True;
vg_assert(sec->tt != NULL);
vg_assert(sec->tc_next != NULL);
n_dump_count += sec->tt_n_inuse;
+ VexArch vex_arch = VexArch_INVALID;
+ VG_(machine_get_VexArchInfo)( &vex_arch, NULL );
+
/* Visit each just-about-to-be-abandoned translation. */
+VG_(printf)("QQQ unlink-entire-sector: %d START\n", sno);
for (i = 0; i < N_TTES_PER_SECTOR; i++) {
if (sec->tt[i].status == InUse) {
vg_assert(sec->tt[i].n_tte2ec >= 1);
@@ -824,12 +1320,14 @@
sec->tt[i].entry,
sec->tt[i].vge );
}
+ unchain_in_preparation_for_deletion(vex_arch, sno, i);
} else {
vg_assert(sec->tt[i].n_tte2ec == 0);
}
sec->tt[i].status = Empty;
sec->tt[i].n_tte2ec = 0;
}
+VG_(printf)("QQQ unlink-entire-sector: %d END\n", sno);
/* Free up the eclass structures. */
for (i = 0; i < ECLASS_N; i++) {
@@ -838,13 +1336,18 @@
vg_assert(sec->ec2tte[i] == NULL);
} else {
vg_assert(sec->ec2tte[i] != NULL);
- VG_(arena_free)(VG_AR_TTAUX, sec->ec2tte[i]);
+ ttaux_free(sec->ec2tte[i]);
sec->ec2tte[i] = NULL;
sec->ec2tte_size[i] = 0;
sec->ec2tte_used[i] = 0;
}
}
+ /* Empty out the host extents array. */
+ vg_assert(sec->host_extents != NULL);
+ VG_(dropTailXA)(sec->host_extents, VG_(sizeXA)(sec->host_extents));
+ vg_assert(VG_(sizeXA)(sec->host_extents) == 0);
+
/* Sanity check: ensure it is already in
sector_search_order[]. */
for (i = 0; i < N_SECTORS; i++) {
@@ -865,54 +1368,8 @@
{ Bool sane = sanity_check_sector_search_order();
vg_assert(sane);
}
-}
-static void invalidate_icache ( void *ptr, Int nbytes )
-{
-# if defined(VGA_ppc32) || defined(VGA_ppc64)
- Addr startaddr = (Addr) ptr;
- Addr endaddr = startaddr + nbytes;
- Addr cls;
- Addr addr;
- VexArchInfo vai;
-
- if (nbytes == 0) return;
- vg_assert(nbytes > 0);
-
- VG_(machine_get_VexArchInfo)( NULL, &vai );
- cls = vai.ppc_cache_line_szB;
-
- /* Stay sane .. */
- vg_assert(cls == 32 || cls == 64 || cls == 128);
-
- startaddr &= ~(cls - 1);
- for (addr = startaddr; addr < endaddr; addr += cls) {
- __asm__ __volatile__("dcbst 0,%0" : : "r" (addr));
- }
- __asm__ __volatile__("sync");
- for (addr = startaddr; addr < endaddr; addr += cls) {
- __asm__ __volatile__("icbi 0,%0" : : "r" (addr));
- }
- __asm__ __volatile__("sync; isync");
-
-# elif defined(VGA_x86)
- /* no need to do anything, hardware provides coherence */
-
-# elif defined(VGA_amd64)
- /* no need to do anything, hardware provides coherence */
-
-# elif defined(VGA_s390x)
- /* no need to do anything, hardware provides coherence */
-
-# elif defined(VGP_arm_linux)
- /* ARM cache flushes are privileged, so we must defer to the kernel. */
- Addr startaddr = (Addr) ptr;
- Addr endaddr = startaddr + nbytes;
- VG_(do_syscall2)(__NR_ARM_cacheflush, startaddr, endaddr);
-
-# else
-# error "Unknown ARCH"
-# endif
+ return has_been_used_before;
}
@@ -921,18 +1378,28 @@
pre: youngest_sector points to a valid (although possibly full)
sector.
+
+ Returns True if the call caused any existing translation(s) to get
+ thrown away in order to make space for this one.
*/
-void VG_(add_to_transtab)( VexGuestExtents* vge,
+Bool VG_(add_to_transtab)( VexGuestExtents* vge,
Addr64 entry,
AddrH code,
UInt code_len,
- Bool is_self_checking )
+ Bool is_self_checking,
+ Int offs_profInc,
+ VexArch arch_host )
{
Int tcAvailQ, reqdQ, y, i;
ULong *tcptr, *tcptr2;
UChar* srcP;
UChar* dstP;
+ /* We need to tell the caller whether this call caused any code to
+ be thrown away due to the TC becoming full, and hence the oldest
+ Sector to be emptied out and recycled. */
+ Bool caused_code_discarding = False;
+
vg_assert(init_done);
vg_assert(vge->n_used >= 1 && vge->n_used <= 3);
@@ -952,8 +1419,10 @@
y = youngest_sector;
vg_assert(isValidSector(y));
- if (sectors[y].tc == NULL)
- initialiseSector(y);
+ if (sectors[y].tc == NULL) {
+ Bool used_before = initialiseSector(y);
+ vg_assert(!used_before);
+ }
/* Try putting the translation in this sector. */
reqdQ = (code_len + 7) >> 3;
@@ -983,7 +1452,8 @@
if (youngest_sector >= N_SECTORS)
youngest_sector = 0;
y = youngest_sector;
- initialiseSector(y);
+ caused_code_discarding = initialiseSector(y);
+
}
/* Be sure ... */
@@ -1002,13 +1472,10 @@
dstP = (UChar*)tcptr;
srcP = (UChar*)code;
- for (i = 0; i < code_len; i++)
- dstP[i] = srcP[i];
+ VG_(memcpy)(dstP, srcP, code_len);
sectors[y].tc_next += reqdQ;
sectors[y].tt_n_inuse++;
- invalidate_icache( dstP, code_len );
-
/* more paranoia */
tcptr2 = sectors[y].tc_next;
vg_assert(tcptr2 >= §ors[y].tc[0]);
@@ -1027,6 +1494,7 @@
i = 0;
}
+ TTEntry__init(§ors[y].tt[i]);
sectors[y].tt[i].status = InUse;
sectors[y].tt[i].tcptr = tcptr;
sectors[y].tt[i].count = 0;
@@ -1034,11 +1502,42 @@
sectors[y].tt[i].vge = *vge;
sectors[y].tt[i].entry = entry;
+ /* Patch in the profile counter location, if necessary. */
+ if (offs_profInc != -1) {
+ vg_assert(offs_profInc >= 0 && offs_profInc < code_len);
+ VexInvalRange vir
+ = LibVEX_PatchProfInc( arch_host,
+ dstP + offs_profInc,
+ §ors[y].tt[i].count );
+ VG_(invalidate_icache)( (void*)vir.start, vir.len );
+ }
+
+ VG_(invalidate_icache)( dstP, code_len );
+
+ /* Add this entry to the host_extents map, checking that we're
+ adding in order. */
+ { HostExtent hx;
+ hx.start = (UChar*)tcptr;
+ hx.len = code_len;
+ hx.tteNo = i;
+ vg_assert(hx.len > 0); /* bsearch fails w/ zero length entries */
+ XArray* hx_array = sectors[y].host_extents;
+ vg_assert(hx_array);
+ Word n = VG_(sizeXA)(hx_array);
+ if (n > 0) {
+ HostExtent* hx_prev = (HostExtent*)VG_(indexXA)(hx_array, n-1);
+ vg_assert(hx_prev->start + hx_prev->len <= hx.start);
+ }
+ VG_(addToXA)(hx_array, &hx);
+ }
+
/* Update the fast-cache. */
- setFastCacheEntry( entry, tcptr, §ors[y].tt[i].count );
+ setFastCacheEntry( entry, tcptr );
/* Note the eclass numbers for this translation. */
upd_eclasses_after_add( §ors[y], i );
+
+ return caused_code_discarding;
}
@@ -1046,7 +1545,9 @@
requested, a successful search can also cause the fast-caches to be
updated.
*/
-Bool VG_(search_transtab) ( /*OUT*/AddrH* result,
+Bool VG_(search_transtab) ( /*OUT*/AddrH* res_hcode,
+ /*OUT*/UInt* res_sNo,
+ /*OUT*/UInt* res_tteNo,
Addr64 guest_addr,
Bool upd_cache )
{
@@ -1076,10 +1577,13 @@
/* found it */
if (upd_cache)
setFastCacheEntry(
- guest_addr, sectors[sno].tt[k].tcptr,
- §ors[sno].tt[k].count );
- if (result)
- *result = (AddrH)sectors[sno].tt[k].tcptr;
+ guest_addr, sectors[sno].tt[k].tcptr );
+ if (res_hcode)
+ *res_hcode = (AddrH)sectors[sno].tt[k].tcptr;
+ if (res_sNo)
+ *res_sNo = sno;
+ if (res_tteNo)
+ *res_tteNo = k;
/* pull this one one step closer to the front. For large
apps this more or less halves the number of required
probes. */
@@ -1147,16 +1651,23 @@
/* Delete a tt entry, and update all the eclass data accordingly. */
-static void delete_tte ( /*MOD*/Sector* sec, Int tteno )
+static void delete_tte ( /*MOD*/Sector* sec, UInt secNo, Int tteno,
+ VexArch vex_arch )
{
Int i, ec_num, ec_idx;
TTEntry* tte;
+ /* sec and secNo are mutually redundant; cross-check. */
+ vg_assert(sec == §ors[secNo]);
+
vg_assert(tteno >= 0 && tteno < N_TTES_PER_SECTOR);
tte = &sec->tt[tteno];
vg_assert(tte->status == InUse);
vg_assert(tte->n_tte2ec >= 1 && tte->n_tte2ec <= 3);
+ /* Unchain .. */
+ unchain_in_preparation_for_deletion(vex_arch, secNo, tteno);
+
/* Deal with the ec-to-tte links first. */
for (i = 0; i < tte->n_tte2ec; i++) {
ec_num = (Int)tte->tte2ec_ec[i];
@@ -1192,9 +1703,10 @@
only consider translations in the specified eclass. */
static
-Bool delete_translations_in_sector_eclass ( /*MOD*/Sector* sec,
+Bool delete_translations_in_sector_eclass ( /*MOD*/Sector* sec, UInt secNo,
Addr64 guest_start, ULong range,
- Int ec )
+ Int ec,
+ VexArch vex_arch )
{
Int i;
UShort tteno;
@@ -1218,7 +1730,7 @@
if (overlaps( guest_start, range, &tte->vge )) {
anyDeld = True;
- delete_tte( sec, (Int)tteno );
+ delete_tte( sec, secNo, (Int)tteno, vex_arch );
}
}
@@ -1231,8 +1743,9 @@
slow way, by inspecting all translations in sec. */
static
-Bool delete_translations_in_sector ( /*MOD*/Sector* sec,
- Addr64 guest_start, ULong range )
+Bool delete_translations_in_sector ( /*MOD*/Sector* sec, UInt secNo,
+ Addr64 guest_start, ULong range,
+ VexArch vex_arch )
{
Int i;
Bool anyDeld = False;
@@ -1241,7 +1754,7 @@
if (sec->tt[i].status == InUse
&& overlaps( guest_start, range, &sec->tt[i].vge )) {
anyDeld = True;
- delete_tte( sec, i );
+ delete_tte( sec, secNo, i, vex_arch );
}
}
@@ -1271,6 +1784,9 @@
if (range == 0)
return;
+ VexArch vex_arch = VexArch_INVALID;
+ VG_(machine_get_VexArchInfo)( &vex_arch, NULL );
+
/* There are two different ways to do this.
If the range fits within a single address-range equivalence
@@ -1310,9 +1826,13 @@
if (sec->tc == NULL)
continue;
anyDeleted |= delete_translations_in_sector_eclass(
- sec, guest_start, range, ec );
+ sec, sno, guest_start, range, ec,
+ vex_arch
+ );
anyDeleted |= delete_translations_in_sector_eclass(
- sec, guest_start, range, ECLASS_MISC );
+ sec, sno, guest_start, range, ECLASS_MISC,
+ vex_arch
+ );
}
} else {
@@ -1327,7 +1847,7 @@
if (sec->tc == NULL)
continue;
anyDeleted |= delete_translations_in_sector(
- sec, guest_start, range );
+ sec, sno, guest_start, range, vex_arch );
}
}
@@ -1483,7 +2003,7 @@
for (j = 0; j < code_len; j++)
dstP[j] = srcP[j];
- invalidate_icache( dstP, code_len );
+ VG_(invalidate_icache)( dstP, code_len );
unredir_tt[i].inUse = True;
unredir_tt[i].vge = *vge;
@@ -1573,18 +2093,15 @@
sectors[i].ec2tte_used[j] = 0;
sectors[i].ec2tte[j] = NULL;
}
+ sectors[i].host_extents = NULL;
}
/* Initialise the sector_search_order hint table. */
for (i = 0; i < N_SECTORS; i++)
sector_search_order[i] = -1;
- /* Initialise the fast caches. If not profiling (the usual case),
- we have to explicitly invalidate the fastN cache as
- invalidateFastCache() won't do that for us. */
+ /* Initialise the fast cache. */
invalidateFastCache();
- if (VG_(clo_profile_flags) == 0)
- invalidateFastNCache();
/* and the unredir tt/tc */
init_unredir_tt_tc();
Modified: branches/TCHAIN/coregrind/m_dispatch/dispatch-amd64-linux.S (+127 -227)
===================================================================
--- branches/TCHAIN/coregrind/m_dispatch/dispatch-amd64-linux.S 2012-04-02 22:25:14 +01:00 (rev 12483)
+++ branches/TCHAIN/coregrind/m_dispatch/dispatch-amd64-linux.S 2012-04-02 22:56:03 +01:00 (rev 12484)
@@ -39,30 +39,36 @@
/*------------------------------------------------------------*/
/*--- ---*/
-/*--- 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 );
+UWord VG_(disp_run_translations)( UWord* two_words,
+ void* guest_state,
+ Addr host_addr );
*/
+.text
+.globl VG_(disp_run_translations)
+.type VG_(disp_run_translations), @function
+VG_(disp_run_translations):
+ /* %rdi holds two_words */
+ /* %rsi holds guest_state */
+ /* %rdx holds host_addr */
-.text
-.globl VG_(run_innerloop)
-.type VG_(run_innerloop), @function
-VG_(run_innerloop):
- /* %rdi holds guest_state */
- /* %rsi holds do_profiling */
-
- /* ----- entry point to VG_(run_innerloop) ----- */
+ /* The preamble */
+
+ /* Save integer registers, since this is a pseudo-function. */
+ pushq %rax
pushq %rbx
pushq %rcx
- pushq %rdx
+ pushq %rdx
pushq %rsi
pushq %rbp
pushq %r8
@@ -73,21 +79,11 @@
pushq %r13
pushq %r14
pushq %r15
- pushq %rdi /* guest_state */
+ /* %rdi must be saved last */
+ pushq %rdi
- movq VG_(dispatch_ctr)@GOTPCREL(%rip), %r15
- movl (%r15), %r15d
- pushq %r15
+ /* Get the host CPU in the state expected by generated code. */
- /* 8(%rsp) holds cached copy of guest_state ptr */
- /* 0(%rsp) holds cached copy of VG_(dispatch_ctr) */
-
- /* Set up the guest state pointer */
- movq %rdi, %rbp
-
- /* fetch %RIP into %rax */
- movq OFFSET_amd64_RIP(%rbp), %rax
-
/* set host FPU control word to the default mode expected
by VEX-generated code. See comments in libvex.h for
more info. */
@@ -105,158 +101,37 @@
/* set dir flag to known value */
cld
- /* fall into main loop (the right one) */
- cmpq $0, %rsi
- je VG_(run_innerloop__dispatch_unassisted_unprofiled)
- jmp VG_(run_innerloop__dispatch_unassisted_profiled)
- /*NOTREACHED*/
+ /* Set up the guest state pointer */
+ movq %rsi, %rbp
-/*----------------------------------------------------*/
-/*--- NO-PROFILING (standard) dispatcher ---*/
-/*----------------------------------------------------*/
+ /* 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. */
+ jmpq *%rdx
+ /*NOTREACHED*/
-.align 16
-.global VG_(run_innerloop__dispatch_unassisted_unprofiled)
-VG_(run_innerloop__dispatch_unassisted_unprofiled):
- /* AT ENTRY: %rax is next guest addr, %rbp is the
- unmodified guest state ptr */
-
- /* save the jump address in the guest state */
- movq %rax, OFFSET_amd64_RIP(%rbp)
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- subl $1, 0(%rsp)
- jz counter_is_zero
-
- /* try a fast lookup in the translation cache */
- movabsq $VG_(tt_fast), %rcx
- movq %rax, %rbx /* next guest addr */
- andq $VG_TT_FAST_MASK, %rbx /* entry# */
- shlq $4, %rbx /* entry# * sizeof(FastCacheEntry) */
- movq 0(%rcx,%rbx,1), %r10 /* .guest */
- movq 8(%rcx,%rbx,1), %r11 /* .host */
- cmpq %rax, %r10
- jnz fast_lookup_failed
-
- /* Found a match. Jump to .host. */
- jmp *%r11
- ud2 /* persuade insn decoders not to speculate past here */
- /* generated code should run, then jump back to either
- VG_(run_innerloop__dispatch_unassisted_unprofiled)
- VG_(run_innerloop__dispatch_assisted_unprofiled). */
- /*NOTREACHED*/
-
-.align 16
-.global VG_(run_innerloop__dispatch_assisted_unprofiled)
-VG_(run_innerloop__dispatch_assisted_unprofiled):
- /* AT ENTRY: %rax is next guest addr, %rbp is the
- modified guest state ptr */
- /* We know the guest state pointer has been modified.
- So jump directly to gsp_changed. */
- jmp gsp_changed
- ud2
- /*NOTREACHED*/
-
/*----------------------------------------------------*/
-/*--- PROFILING dispatcher (can be much slower) ---*/
+/*--- Postamble and exit. ---*/
/*----------------------------------------------------*/
-.align 16
-.global VG_(run_innerloop__dispatch_unassisted_profiled)
-VG_(run_innerloop__dispatch_unassisted_profiled):
- /* AT ENTRY: %rax is next guest addr, %rbp is the
- unmodified guest state ptr */
-
- /* save the jump address in the guest state */
- movq %rax, OFFSET_amd64_RIP(%rbp)
-
- /* Are we out of timeslice? If yes, defer to scheduler. */
- subl $1, 0(%rsp)
- jz counter_is_zero
-
- /* try a fast lookup in the translation cache */
- movabsq $VG_(tt_fast), %rcx
- movq %rax, %rbx
- andq $VG_TT_FAST_MASK, %rbx /* entry# */
- shlq $4, %rbx /* entry# * sizeof(FastCacheEntry) */
- movq 0(%rcx,%rbx,1), %r10 /* .guest */
- movq 8(%rcx,%rbx,1), %r11 /* .host */
- cmpq %rax, %r10
- jnz fast_lookup_failed
-
- /* increment bb profile counter */
- movabsq $VG_(tt_fastN), %rdx
- shrq $1, %rbx /* entry# * sizeof(UInt*) */
- movq (%rdx,%rbx,1), %rdx
- addl $1, (%rdx)
-
- /* Found a match. Jump to .host. */
- jmp *%r11
- ud2 /* persuade insn decoders not to speculate past here */
- /* generated code should run, then jump back to either
- VG_(run_innerloop__dispatch_unassisted_profiled)
- VG_(run_innerloop__dispatch_assisted_profiled). */
- /*NOTREACHED*/
-
-.align 16
-.global VG_(run_innerloop__dispatch_assisted_profiled)
-VG_(run_innerloop__dispatch_assisted_profiled):
- /* AT ENTRY: %rax is next guest addr, %rbp is the
- modified guest state ptr */
-
- /* Well, we know the guest state pointer has been modified.
- So jump directly to gsp_changed. */
- jmp gsp_changed
- ud2
- /*NOTREACHED*/
-
-/*----------------------------------------------------*/
-/*--- exit points ---*/
-/*----------------------------------------------------*/
-
-gsp_changed:
- /* Someone messed with the gsp. Have to
- defer to scheduler to resolve this. dispatch ctr
- is not yet decremented, so no need to inc...
[truncated message content] |
|
From: <sv...@va...> - 2012-04-02 21:55:00
|
sewardj 2012-04-02 22:54:49 +0100 (Mon, 02 Apr 2012)
New Revision: 2273
Log:
Add translation chaining support for amd64, x86 and ARM (VEX side).
See #296422.
Modified files:
branches/TCHAIN/Makefile-gcc
branches/TCHAIN/priv/guest_amd64_defs.h
branches/TCHAIN/priv/guest_amd64_helpers.c
branches/TCHAIN/priv/guest_amd64_toIR.c
branches/TCHAIN/priv/guest_arm_defs.h
branches/TCHAIN/priv/guest_arm_helpers.c
branches/TCHAIN/priv/guest_arm_toIR.c
branches/TCHAIN/priv/guest_generic_bb_to_IR.c
branches/TCHAIN/priv/guest_generic_bb_to_IR.h
branches/TCHAIN/priv/guest_ppc_toIR.c
branches/TCHAIN/priv/guest_s390_toIR.c
branches/TCHAIN/priv/guest_x86_defs.h
branches/TCHAIN/priv/guest_x86_helpers.c
branches/TCHAIN/priv/guest_x86_toIR.c
branches/TCHAIN/priv/host_amd64_defs.c
branches/TCHAIN/priv/host_amd64_defs.h
branches/TCHAIN/priv/host_amd64_isel.c
branches/TCHAIN/priv/host_arm_defs.c
branches/TCHAIN/priv/host_arm_defs.h
branches/TCHAIN/priv/host_arm_isel.c
branches/TCHAIN/priv/host_x86_defs.c
branches/TCHAIN/priv/host_x86_defs.h
branches/TCHAIN/priv/host_x86_isel.c
branches/TCHAIN/priv/ir_defs.c
branches/TCHAIN/priv/ir_opt.c
branches/TCHAIN/priv/ir_opt.h
branches/TCHAIN/priv/main_main.c
branches/TCHAIN/pub/libvex.h
branches/TCHAIN/pub/libvex_guest_amd64.h
branches/TCHAIN/pub/libvex_guest_arm.h
branches/TCHAIN/pub/libvex_guest_x86.h
branches/TCHAIN/pub/libvex_ir.h
branches/TCHAIN/pub/libvex_trc_values.h
branches/TCHAIN/switchback/switchback.c
branches/TCHAIN/test_main.c
branches/TCHAIN/test_main.h
Modified: branches/TCHAIN/priv/host_amd64_isel.c (+165 -29)
===================================================================
--- branches/TCHAIN/priv/host_amd64_isel.c 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/host_amd64_isel.c 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -112,30 +112,46 @@
64-bit virtual HReg, which holds the high half
of the value.
+ - The host subarchitecture we are selecting insns for.
+ This is set at the start and does not change.
+
- The code array, that is, the insns selected so far.
- A counter, for generating new virtual registers.
- - 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.
+
Note, this is all host-independent. (JRS 20050201: well, kinda
... not completely. Compare with ISelEnv for X86.)
*/
typedef
struct {
+ /* Constant -- are set at the start and do not change. */
IRTypeEnv* type_env;
HReg* vregmap;
HReg* vregmapHI;
Int n_vregmap;
+ UInt hwcaps;
+
+ Bool chainingAllowed;
+ Addr64 max_ga;
+
+ /* These are modified as we go along. */
HInstrArray* code;
-
Int vreg_ctr;
-
- UInt hwcaps;
}
ISelEnv;
@@ -4131,14 +4147,47 @@
/* --------- EXIT --------- */
case Ist_Exit: {
- AMD64RI* dst;
- AMD64CondCode cc;
if (stmt->Ist.Exit.dst->tag != Ico_U64)
vpanic("iselStmt(amd64): Ist_Exit: dst is not a 64-bit value");
- dst = iselIntExpr_RI(env, IRExpr_Const(stmt->Ist.Exit.dst));
- cc = iselCondCode(env,stmt->Ist.Exit.guard);
- addInstr(env, AMD64Instr_Goto(stmt->Ist.Exit.jk, cc, dst));
- return;
+
+ AMD64CondCode cc = iselCondCode(env, stmt->Ist.Exit.guard);
+ AMD64AMode* amRIP = AMD64AMode_IR(stmt->Ist.Exit.offsIP,
+ hregAMD64_RBP());
+
+ /* Case: boring transfer to known address */
+ if (stmt->Ist.Exit.jk == Ijk_Boring) {
+ if (env->chainingAllowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool toFastEP
+ = ((Addr64)stmt->Ist.Exit.dst->Ico.U64) > env->max_ga;
+ if (0) vex_printf("%s", toFastEP ? "Y" : ",");
+ addInstr(env, AMD64Instr_XDirect(stmt->Ist.Exit.dst->Ico.U64,
+ amRIP, cc, toFastEP));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an assisted transfer,
+ as that's the only alternative that is allowable. */
+ HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, AMD64Instr_XAssisted(r, amRIP, cc, Ijk_Boring));
+ }
+ return;
+ }
+
+ /* Case: assisted transfer to arbitrary address */
+ switch (stmt->Ist.Exit.jk) {
+ case Ijk_SigSEGV: case Ijk_TInval: case Ijk_EmWarn: {
+ HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, AMD64Instr_XAssisted(r, amRIP, cc, stmt->Ist.Exit.jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Do we ever expect to see any other kind? */
+ goto stmt_fail;
}
default: break;
@@ -4153,18 +4202,83 @@
/*--- ISEL: Basic block terminators (Nexts) ---*/
/*---------------------------------------------------------*/
-static void iselNext ( ISelEnv* env, IRExpr* next, IRJumpKind jk )
+static void iselNext ( ISelEnv* env,
+ IRExpr* next, IRJumpKind jk, Int offsIP )
{
- AMD64RI* ri;
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");
+ vex_printf( "\n");
}
- ri = iselIntExpr_RI(env, next);
- addInstr(env, AMD64Instr_Goto(jk, Acc_ALWAYS,ri));
+
+ /* 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 */
+ AMD64AMode* amRIP = AMD64AMode_IR(offsIP, hregAMD64_RBP());
+ if (env->chainingAllowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool toFastEP
+ = ((Addr64)cdst->Ico.U64) > env->max_ga;
+ if (0) vex_printf("%s", toFastEP ? "X" : ".");
+ addInstr(env, AMD64Instr_XDirect(cdst->Ico.U64,
+ amRIP, Acc_ALWAYS,
+ toFastEP));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an indirect transfer,
+ as that's the cheapest alternative that is
+ allowable. */
+ HReg r = iselIntExpr_R(env, next);
+ addInstr(env, AMD64Instr_XAssisted(r, amRIP, Acc_ALWAYS,
+ Ijk_Boring));
+ }
+ return;
+ }
+ }
+
+ /* Case: call/return (==boring) transfer to any address */
+ switch (jk) {
+ case Ijk_Boring: case Ijk_Ret: case Ijk_Call: {
+ HReg r = iselIntExpr_R(env, next);
+ AMD64AMode* amRIP = AMD64AMode_IR(offsIP, hregAMD64_RBP());
+ if (env->chainingAllowed) {
+ addInstr(env, AMD64Instr_XIndir(r, amRIP, Acc_ALWAYS));
+ } else {
+ addInstr(env, AMD64Instr_XAssisted(r, amRIP, Acc_ALWAYS,
+ Ijk_Boring));
+ }
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Case: some other kind of transfer to any address */
+ switch (jk) {
+ case Ijk_Sys_syscall: case Ijk_ClientReq: case Ijk_NoRedir:
+ case Ijk_Yield: case Ijk_SigTRAP: {
+ HReg r = iselIntExpr_R(env, next);
+ AMD64AMode* amRIP = AMD64AMode_IR(offsIP, hregAMD64_RBP());
+ addInstr(env, AMD64Instr_XAssisted(r, amRIP, Acc_ALWAYS, jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ vex_printf( "\n-- PUT(%d) = ", offsIP);
+ ppIRExpr( next );
+ vex_printf( "; exit-");
+ ppIRJumpKind(jk);
+ vex_printf( "\n");
+ vassert(0); // are we expecting any other kind?
}
@@ -4174,14 +4288,21 @@
/* Translate an entire SB to amd64 code. */
-HInstrArray* iselSB_AMD64 ( IRSB* bb, VexArch arch_host,
- VexArchInfo* archinfo_host,
- VexAbiInfo* vbi/*UNUSED*/ )
+HInstrArray* iselSB_AMD64 ( IRSB* bb,
+ VexArch arch_host,
+ VexArchInfo* archinfo_host,
+ VexAbiInfo* vbi/*UNUSED*/,
+ Int offs_Host_EvC_Counter,
+ Int offs_Host_EvC_FailAddr,
+ Bool chainingAllowed,
+ Bool addProfInc,
+ Addr64 max_ga )
{
- Int i, j;
- HReg hreg, hregHI;
- ISelEnv* env;
- UInt hwcaps_host = archinfo_host->hwcaps;
+ Int i, j;
+ HReg hreg, hregHI;
+ ISelEnv* env;
+ UInt hwcaps_host = archinfo_host->hwcaps;
+ AMD64AMode *amCounter, *amFailAddr;
/* sanity ... */
vassert(arch_host == VexArchAMD64);
@@ -4207,7 +4328,9 @@
env->vregmapHI = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
/* and finally ... */
- env->hwcaps = hwcaps_host;
+ env->chainingAllowed = chainingAllowed;
+ env->hwcaps = hwcaps_host;
+ env->max_ga = max_ga;
/* For each IR temporary, allocate a suitably-kinded virtual
register. */
@@ -4233,12 +4356,25 @@
}
env->vreg_ctr = j;
+ /* The very first instruction must be an event check. */
+ amCounter = AMD64AMode_IR(offs_Host_EvC_Counter, hregAMD64_RBP());
+ amFailAddr = AMD64AMode_IR(offs_Host_EvC_FailAddr, hregAMD64_RBP());
+ addInstr(env, AMD64Instr_EvCheck(amCounter, amFailAddr));
+
+ /* 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_patchProfCtr. */
+ if (addProfInc) {
+ addInstr(env, AMD64Instr_ProfInc());
+ }
+
/* Ok, finally we can iterate over the statements. */
for (i = 0; i < bb->stmts_used; i++)
if (bb->stmts[i])
- iselStmt(env,bb->stmts[i]);
+ iselStmt(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;
Modified: branches/TCHAIN/priv/guest_ppc_toIR.c (+11 -11)
===================================================================
--- branches/TCHAIN/priv/guest_ppc_toIR.c 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/guest_ppc_toIR.c 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -1500,7 +1500,7 @@
if (mode64) {
vassert(typeOfIRTemp(irsb->tyenv, addr) == Ity_I64);
stmt(
- IRStmt_Exit(
+ IRStmt_Exit3(
binop(Iop_CmpNE64,
binop(Iop_And64, mkexpr(addr), mkU64(align-1)),
mkU64(0)),
@@ -1511,7 +1511,7 @@
} else {
vassert(typeOfIRTemp(irsb->tyenv, addr) == Ity_I32);
stmt(
- IRStmt_Exit(
+ IRStmt_Exit3(
binop(Iop_CmpNE32,
binop(Iop_And32, mkexpr(addr), mkU32(align-1)),
mkU32(0)),
@@ -2690,7 +2690,7 @@
so that Valgrind's dispatcher sees the warning. */
putGST( PPC_GST_EMWARN, mkU32(ew) );
stmt(
- IRStmt_Exit(
+ IRStmt_Exit3(
binop(Iop_CmpNE32, mkU32(ew), mkU32(EmWarn_NONE)),
Ijk_EmWarn,
mkSzConst( ty, nextInsnAddr()) ));
@@ -4975,7 +4975,7 @@
for (i = 0; i < maxBytes; i++) {
/* if (nBytes < (i+1)) goto NIA; */
- stmt( IRStmt_Exit( binop(Iop_CmpLT32U, e_nbytes, mkU32(i+1)),
+ stmt( IRStmt_Exit3( binop(Iop_CmpLT32U, e_nbytes, mkU32(i+1)),
Ijk_Boring,
mkSzConst( ty, nextInsnAddr()) ));
/* when crossing into a new dest register, set it to zero. */
@@ -5026,7 +5026,7 @@
for (i = 0; i < maxBytes; i++) {
/* if (nBytes < (i+1)) goto NIA; */
- stmt( IRStmt_Exit( binop(Iop_CmpLT32U, e_nbytes, mkU32(i+1)),
+ stmt( IRStmt_Exit3( binop(Iop_CmpLT32U, e_nbytes, mkU32(i+1)),
Ijk_Boring,
mkSzConst( ty, nextInsnAddr() ) ));
/* check for crossing into a new src register. */
@@ -5301,7 +5301,7 @@
cond_ok is either zero or nonzero, since that's the cheapest
way to compute it. Anding them together gives a value which
is either zero or non zero and so that's what we must test
- for in the IRStmt_Exit. */
+ for in the IRStmt_Exit3. */
assign( ctr_ok, branch_ctr_ok( BO ) );
assign( cond_ok, branch_cond_ok( BO, BI ) );
assign( do_branch,
@@ -5316,7 +5316,7 @@
if (flag_LK)
putGST( PPC_GST_LR, e_nia );
- stmt( IRStmt_Exit(
+ stmt( IRStmt_Exit3(
binop(Iop_CmpNE32, mkexpr(do_branch), mkU32(0)),
flag_LK ? Ijk_Call : Ijk_Boring,
mkSzConst(ty, tgt) ) );
@@ -5351,7 +5351,7 @@
if (flag_LK)
putGST( PPC_GST_LR, e_nia );
- stmt( IRStmt_Exit(
+ stmt( IRStmt_Exit3(
binop(Iop_CmpEQ32, mkexpr(cond_ok), mkU32(0)),
Ijk_Boring,
c_nia ));
@@ -5391,7 +5391,7 @@
if (flag_LK)
putGST( PPC_GST_LR, e_nia );
- stmt( IRStmt_Exit(
+ stmt( IRStmt_Exit3(
binop(Iop_CmpEQ32, mkexpr(do_branch), mkU32(0)),
Ijk_Boring,
c_nia ));
@@ -5558,7 +5558,7 @@
if ((TO & b11100) == b11100 || (TO & b00111) == b00111) {
/* Unconditional trap. Just do the exit without
testing the arguments. */
- stmt( IRStmt_Exit(
+ stmt( IRStmt_Exit3(
binop(opCMPEQ, const0, const0),
Ijk_SigTRAP,
mode64 ? IRConst_U64(cia) : IRConst_U32((UInt)cia)
@@ -5601,7 +5601,7 @@
tmp = binop(opAND, binop(opCMPORDU, argLe, argRe), const4);
cond = binop(opOR, tmp, cond);
}
- stmt( IRStmt_Exit(
+ stmt( IRStmt_Exit3(
binop(opCMPNE, cond, const0),
Ijk_SigTRAP,
mode64 ? IRConst_U64(cia) : IRConst_U32((UInt)cia)
Modified: branches/TCHAIN/priv/guest_amd64_defs.h (+0 -1)
===================================================================
--- branches/TCHAIN/priv/guest_amd64_defs.h 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/guest_amd64_defs.h 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -47,7 +47,6 @@
bb_to_IR.h. */
extern
DisResult disInstr_AMD64 ( IRSB* irbb,
- Bool put_IP,
Bool (*resteerOkFn) ( void*, Addr64 ),
Bool resteerCisOk,
void* callback_opaque,
Modified: branches/TCHAIN/pub/libvex_trc_values.h (+3 -0)
===================================================================
--- branches/TCHAIN/pub/libvex_trc_values.h 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/pub/libvex_trc_values.h 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -80,6 +80,9 @@
#define VEX_TRC_JMP_SYS_SYSENTER 79 /* do syscall before continuing */
+#define VEX_TRC_JMP_BORING 95 /* return to sched, but just
+ keep going; no special action */
+
#endif /* ndef __LIBVEX_TRC_VALUES_H */
/*---------------------------------------------------------------*/
Modified: branches/TCHAIN/priv/guest_x86_toIR.c (+156 -114)
===================================================================
--- branches/TCHAIN/priv/guest_x86_toIR.c 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/guest_x86_toIR.c 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -768,7 +768,8 @@
binop( mkSizedOp(tyE,Iop_CasCmpNE8),
mkexpr(oldTmp), mkexpr(expTmp) ),
Ijk_Boring, /*Ijk_NoRedir*/
- IRConst_U32( restart_point )
+ IRConst_U32( restart_point ),
+ OFFB_EIP
));
}
@@ -1340,36 +1341,55 @@
/*--- JMP helpers ---*/
/*------------------------------------------------------------*/
-static void jmp_lit( IRJumpKind kind, Addr32 d32 )
+static void jmp_lit( /*MOD*/DisResult* dres,
+ IRJumpKind kind, Addr32 d32 )
{
- irsb->next = mkU32(d32);
- irsb->jumpkind = kind;
+ vassert(dres->whatNext == Dis_Continue);
+ vassert(dres->len == 0);
+ vassert(dres->continueAt == 0);
+ vassert(dres->jk_StopHere == Ijk_INVALID);
+ dres->whatNext = Dis_StopHere;
+ dres->jk_StopHere = kind;
+ stmt( IRStmt_Put( OFFB_EIP, mkU32(d32) ) );
}
-static void jmp_treg( IRJumpKind kind, IRTemp t )
+static void jmp_treg( /*MOD*/DisResult* dres,
+ IRJumpKind kind, IRTemp t )
{
- irsb->next = mkexpr(t);
- irsb->jumpkind = kind;
+ vassert(dres->whatNext == Dis_Continue);
+ vassert(dres->len == 0);
+ vassert(dres->continueAt == 0);
+ vassert(dres->jk_StopHere == Ijk_INVALID);
+ dres->whatNext = Dis_StopHere;
+ dres->jk_StopHere = kind;
+ stmt( IRStmt_Put( OFFB_EIP, mkexpr(t) ) );
}
static
-void jcc_01( X86Condcode cond, Addr32 d32_false, Addr32 d32_true )
+void jcc_01( /*MOD*/DisResult* dres,
+ X86Condcode cond, Addr32 d32_false, Addr32 d32_true )
{
Bool invert;
X86Condcode condPos;
+ vassert(dres->whatNext == Dis_Continue);
+ vassert(dres->len == 0);
+ vassert(dres->continueAt == 0);
+ vassert(dres->jk_StopHere == Ijk_INVALID);
+ dres->whatNext = Dis_StopHere;
+ dres->jk_StopHere = Ijk_Boring;
condPos = positiveIse_X86Condcode ( cond, &invert );
if (invert) {
stmt( IRStmt_Exit( mk_x86g_calculate_condition(condPos),
Ijk_Boring,
- IRConst_U32(d32_false) ) );
- irsb->next = mkU32(d32_true);
- irsb->jumpkind = Ijk_Boring;
+ IRConst_U32(d32_false),
+ OFFB_EIP ) );
+ stmt( IRStmt_Put( OFFB_EIP, mkU32(d32_true) ) );
} else {
stmt( IRStmt_Exit( mk_x86g_calculate_condition(condPos),
Ijk_Boring,
- IRConst_U32(d32_true) ) );
- irsb->next = mkU32(d32_false);
- irsb->jumpkind = Ijk_Boring;
+ IRConst_U32(d32_true),
+ OFFB_EIP ) );
+ stmt( IRStmt_Put( OFFB_EIP, mkU32(d32_false) ) );
}
}
@@ -1450,7 +1470,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, unop(Iop_64HIto32, mkexpr(r64)), mkU32(0)),
Ijk_MapFail,
- IRConst_U32( guest_EIP_curr_instr )
+ IRConst_U32( guest_EIP_curr_instr ),
+ OFFB_EIP
)
);
@@ -3009,7 +3030,7 @@
/* Group 5 extended opcodes. */
static
UInt dis_Grp5 ( UChar sorb, Bool locked, Int sz, Int delta,
- DisResult* dres, Bool* decode_OK )
+ /*MOD*/DisResult* dres, /*OUT*/Bool* decode_OK )
{
Int len;
UChar modrm;
@@ -3054,13 +3075,13 @@
assign(t2, binop(Iop_Sub32, getIReg(4,R_ESP), mkU32(4)));
putIReg(4, R_ESP, mkexpr(t2));
storeLE( mkexpr(t2), mkU32(guest_EIP_bbstart+delta+1));
- jmp_treg(Ijk_Call,t1);
- dres->whatNext = Dis_StopHere;
+ jmp_treg(dres, Ijk_Call, t1);
+ vassert(dres->whatNext == Dis_StopHere);
break;
case 4: /* jmp Ev */
vassert(sz == 4);
- jmp_treg(Ijk_Boring,t1);
- dres->whatNext = Dis_StopHere;
+ jmp_treg(dres, Ijk_Boring, t1);
+ vassert(dres->whatNext == Dis_StopHere);
break;
case 6: /* PUSH Ev */
vassert(sz == 4 || sz == 2);
@@ -3110,13 +3131,13 @@
assign(t2, binop(Iop_Sub32, getIReg(4,R_ESP), mkU32(4)));
putIReg(4, R_ESP, mkexpr(t2));
storeLE( mkexpr(t2), mkU32(guest_EIP_bbstart+delta+len));
- jmp_treg(Ijk_Call,t1);
- dres->whatNext = Dis_StopHere;
+ jmp_treg(dres, Ijk_Call, t1);
+ vassert(dres->whatNext == Dis_StopHere);
break;
case 4: /* JMP Ev */
vassert(sz == 4);
- jmp_treg(Ijk_Boring,t1);
- dres->whatNext = Dis_StopHere;
+ jmp_treg(dres, Ijk_Boring, t1);
+ vassert(dres->whatNext == Dis_StopHere);
break;
case 6: /* PUSH Ev */
vassert(sz == 4 || sz == 2);
@@ -3253,7 +3274,8 @@
We assume the insn is the last one in the basic block, and so emit a jump
to the next insn, rather than just falling through. */
static
-void dis_REP_op ( X86Condcode cond,
+void dis_REP_op ( /*MOD*/DisResult* dres,
+ X86Condcode cond,
void (*dis_OP)(Int, IRTemp),
Int sz, Addr32 eip, Addr32 eip_next, HChar* name )
{
@@ -3264,7 +3286,7 @@
stmt( IRStmt_Exit( binop(Iop_CmpEQ32,mkexpr(tc),mkU32(0)),
Ijk_Boring,
- IRConst_U32(eip_next) ) );
+ IRConst_U32(eip_next), OFFB_EIP ) );
putIReg(4, R_ECX, binop(Iop_Sub32, mkexpr(tc), mkU32(1)) );
@@ -3272,12 +3294,14 @@
dis_OP (sz, t_inc);
if (cond == X86CondAlways) {
- jmp_lit(Ijk_Boring,eip);
+ jmp_lit(dres, Ijk_Boring, eip);
+ vassert(dres->whatNext == Dis_StopHere);
} else {
stmt( IRStmt_Exit( mk_x86g_calculate_condition(cond),
Ijk_Boring,
- IRConst_U32(eip) ) );
- jmp_lit(Ijk_Boring,eip_next);
+ IRConst_U32(eip), OFFB_EIP ) );
+ jmp_lit(dres, Ijk_Boring, eip_next);
+ vassert(dres->whatNext == Dis_StopHere);
}
DIP("%s%c\n", name, nameISize(sz));
}
@@ -3958,7 +3982,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, mkexpr(ew), mkU32(0)),
Ijk_EmWarn,
- IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta)
+ IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta),
+ OFFB_EIP
)
);
@@ -4000,7 +4025,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, mkexpr(ew), mkU32(0)),
Ijk_EmWarn,
- IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta)
+ IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta),
+ OFFB_EIP
)
);
break;
@@ -4948,7 +4974,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, mkexpr(ew), mkU32(0)),
Ijk_EmWarn,
- IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta)
+ IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta),
+ OFFB_EIP
)
);
@@ -6811,13 +6838,15 @@
}
static
-void dis_ret ( UInt d32 )
+void dis_ret ( /*MOD*/DisResult* dres, UInt d32 )
{
- IRTemp t1 = newTemp(Ity_I32), t2 = newTemp(Ity_I32);
+ IRTemp t1 = newTemp(Ity_I32);
+ IRTemp t2 = newTemp(Ity_I32);
assign(t1, getIReg(4,R_ESP));
assign(t2, loadLE(Ity_I32,mkexpr(t1)));
putIReg(4, R_ESP,binop(Iop_Add32, mkexpr(t1), mkU32(4+d32)));
- jmp_treg(Ijk_Ret,t2);
+ jmp_treg(dres, Ijk_Ret, t2);
+ vassert(dres->whatNext == Dis_StopHere);
}
/*------------------------------------------------------------*/
@@ -7523,7 +7552,8 @@
binop(Iop_And32, mkexpr(t1), mkU32(1<<18)),
mkU32(0) ),
Ijk_EmWarn,
- IRConst_U32( next_insn_EIP )
+ IRConst_U32( next_insn_EIP ),
+ OFFB_EIP
)
);
}
@@ -7700,7 +7730,8 @@
binop(Iop_And32,mkexpr(effective_addr),mkU32(0xF)),
mkU32(0)),
Ijk_SigSEGV,
- IRConst_U32(guest_EIP_curr_instr)
+ IRConst_U32(guest_EIP_curr_instr),
+ OFFB_EIP
)
);
}
@@ -7854,7 +7885,6 @@
static
DisResult disInstr_X86_WRK (
/*OUT*/Bool* expect_CAS,
- Bool put_IP,
Bool (*resteerOkFn) ( /*opaque*/void*, Addr64 ),
Bool resteerCisOk,
void* callback_opaque,
@@ -7893,9 +7923,10 @@
Bool pfx_lock = False;
/* Set result defaults. */
- dres.whatNext = Dis_Continue;
- dres.len = 0;
- dres.continueAt = 0;
+ dres.whatNext = Dis_Continue;
+ dres.len = 0;
+ dres.continueAt = 0;
+ dres.jk_StopHere = Ijk_INVALID;
*expect_CAS = False;
@@ -7904,10 +7935,6 @@
vassert(guest_EIP_bbstart + delta == guest_EIP_curr_instr);
DIP("\t0x%x: ", guest_EIP_bbstart+delta);
- /* We may be asked to update the guest EIP before going further. */
- if (put_IP)
- stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_curr_instr)) );
-
/* Spot "Special" instructions (see comment at top of file). */
{
UChar* code = (UChar*)(guest_code + delta);
@@ -7926,8 +7953,8 @@
/* %EDX = client_request ( %EAX ) */
DIP("%%edx = client_request ( %%eax )\n");
delta += 14;
- jmp_lit(Ijk_ClientReq, guest_EIP_bbstart+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_ClientReq, guest_EIP_bbstart+delta);
+ vassert(dres.whatNext == Dis_StopHere);
goto decode_success;
}
else
@@ -7949,8 +7976,8 @@
assign(t2, binop(Iop_Sub32, getIReg(4,R_ESP), mkU32(4)));
putIReg(4, R_ESP, mkexpr(t2));
storeLE( mkexpr(t2), mkU32(guest_EIP_bbstart+delta));
- jmp_treg(Ijk_NoRedir,t1);
- dres.whatNext = Dis_StopHere;
+ jmp_treg(&dres, Ijk_NoRedir, t1);
+ vassert(dres.whatNext == Dis_StopHere);
goto decode_success;
}
/* We don't know what it is. */
@@ -8537,7 +8564,8 @@
IRStmt_Exit(
binop(Iop_CmpNE32, mkexpr(ew), mkU32(0)),
Ijk_EmWarn,
- IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta)
+ IRConst_U32( ((Addr32)guest_EIP_bbstart)+delta),
+ OFFB_EIP
)
);
goto decode_success;
@@ -12729,7 +12757,8 @@
stmt( IRStmt_Exit(
binop(Iop_CmpEQ16, getIReg(2,R_ECX), mkU16(0)),
Ijk_Boring,
- IRConst_U32(d32)
+ IRConst_U32(d32),
+ OFFB_EIP
));
DIP("jcxz 0x%x\n", d32);
goto decode_success;
@@ -12752,13 +12781,11 @@
case 0xC2: /* RET imm16 */
d32 = getUDisp16(delta);
delta += 2;
- dis_ret(d32);
- dres.whatNext = Dis_StopHere;
+ dis_ret(&dres, d32);
DIP("ret %d\n", (Int)d32);
break;
case 0xC3: /* RET */
- dis_ret(0);
- dres.whatNext = Dis_StopHere;
+ dis_ret(&dres, 0);
DIP("ret\n");
break;
@@ -12782,8 +12809,8 @@
/* set %EFLAGS */
set_EFLAGS_from_value( t4, False/*!emit_AC_emwarn*/, 0/*unused*/ );
/* goto new EIP value */
- jmp_treg(Ijk_Ret,t2);
- dres.whatNext = Dis_StopHere;
+ jmp_treg(&dres, Ijk_Ret, t2);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("iret (very kludgey)\n");
break;
@@ -12815,8 +12842,8 @@
dres.whatNext = Dis_ResteerU;
dres.continueAt = (Addr64)(Addr32)d32;
} else {
- jmp_lit(Ijk_Call,d32);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Call, d32);
+ vassert(dres.whatNext == Dis_StopHere);
}
DIP("call 0x%x\n",d32);
}
@@ -13060,8 +13087,8 @@
/* ------------------------ INT ------------------------ */
case 0xCC: /* INT 3 */
- jmp_lit(Ijk_SigTRAP,((Addr32)guest_EIP_bbstart)+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_SigTRAP, ((Addr32)guest_EIP_bbstart)+delta);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("int $0x3\n");
break;
@@ -13082,8 +13109,8 @@
This used to handle just 0x40-0x43; Jikes RVM uses a larger
range (0x3F-0x49), and this allows some slack as well. */
if (d32 >= 0x3F && d32 <= 0x4F) {
- jmp_lit(Ijk_SigSEGV,((Addr32)guest_EIP_bbstart)+delta-2);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_SigSEGV, ((Addr32)guest_EIP_bbstart)+delta-2);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("int $0x%x\n", (Int)d32);
break;
}
@@ -13095,24 +13122,24 @@
if (d32 == 0x80) {
stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
mkU32(guest_EIP_curr_instr) ) );
- jmp_lit(Ijk_Sys_int128,((Addr32)guest_EIP_bbstart)+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Sys_int128, ((Addr32)guest_EIP_bbstart)+delta);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("int $0x80\n");
break;
}
if (d32 == 0x81) {
stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
mkU32(guest_EIP_curr_instr) ) );
- jmp_lit(Ijk_Sys_int129,((Addr32)guest_EIP_bbstart)+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Sys_int129, ((Addr32)guest_EIP_bbstart)+delta);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("int $0x81\n");
break;
}
if (d32 == 0x82) {
stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
mkU32(guest_EIP_curr_instr) ) );
- jmp_lit(Ijk_Sys_int130,((Addr32)guest_EIP_bbstart)+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Sys_int130, ((Addr32)guest_EIP_bbstart)+delta);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("int $0x82\n");
break;
}
@@ -13129,8 +13156,8 @@
dres.whatNext = Dis_ResteerU;
dres.continueAt = (Addr64)(Addr32)d32;
} else {
- jmp_lit(Ijk_Boring,d32);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Boring, d32);
+ vassert(dres.whatNext == Dis_StopHere);
}
DIP("jmp-8 0x%x\n", d32);
break;
@@ -13143,8 +13170,8 @@
dres.whatNext = Dis_ResteerU;
dres.continueAt = (Addr64)(Addr32)d32;
} else {
- jmp_lit(Ijk_Boring,d32);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Boring, d32);
+ vassert(dres.whatNext == Dis_StopHere);
}
DIP("jmp 0x%x\n", d32);
break;
@@ -13185,7 +13212,8 @@
stmt( IRStmt_Exit(
mk_x86g_calculate_condition((X86Condcode)(1 ^ (opc - 0x70))),
Ijk_Boring,
- IRConst_U32(guest_EIP_bbstart+delta) ) );
+ IRConst_U32(guest_EIP_bbstart+delta),
+ OFFB_EIP ) );
dres.whatNext = Dis_ResteerC;
dres.continueAt = (Addr64)(Addr32)d32;
comment = "(assumed taken)";
@@ -13204,7 +13232,8 @@
stmt( IRStmt_Exit(
mk_x86g_calculate_condition((X86Condcode)(opc - 0x70)),
Ijk_Boring,
- IRConst_U32(d32) ) );
+ IRConst_U32(d32),
+ OFFB_EIP ) );
dres.whatNext = Dis_ResteerC;
dres.continueAt = (Addr64)(Addr32)(guest_EIP_bbstart+delta);
comment = "(assumed not taken)";
@@ -13212,9 +13241,9 @@
else {
/* Conservative default translation - end the block at this
point. */
- jcc_01( (X86Condcode)(opc - 0x70),
+ jcc_01( &dres, (X86Condcode)(opc - 0x70),
(Addr32)(guest_EIP_bbstart+delta), d32);
- dres.whatNext = Dis_StopHere;
+ vassert(dres.whatNext == Dis_StopHere);
}
DIP("j%s-8 0x%x %s\n", name_X86Condcode(opc - 0x70), d32, comment);
break;
@@ -13227,7 +13256,8 @@
stmt( IRStmt_Exit(
binop(Iop_CmpEQ32, getIReg(4,R_ECX), mkU32(0)),
Ijk_Boring,
- IRConst_U32(d32)
+ IRConst_U32(d32),
+ OFFB_EIP
));
DIP("jecxz 0x%x\n", d32);
break;
@@ -13268,7 +13298,7 @@
default:
vassert(0);
}
- stmt( IRStmt_Exit(cond, Ijk_Boring, IRConst_U32(d32)) );
+ stmt( IRStmt_Exit(cond, Ijk_Boring, IRConst_U32(d32), OFFB_EIP) );
DIP("loop%s 0x%x\n", xtra, d32);
break;
@@ -13948,33 +13978,32 @@
abyte = getIByte(delta); delta++;
if (abyte == 0x66) { sz = 2; abyte = getIByte(delta); delta++; }
- dres.whatNext = Dis_StopHere;
switch (abyte) {
/* According to the Intel manual, "repne movs" should never occur, but
* in practice it has happened, so allow for it here... */
case 0xA4: sz = 1; /* REPNE MOVS<sz> */
case 0xA5:
- dis_REP_op ( X86CondNZ, dis_MOVS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repne movs" );
+ dis_REP_op ( &dres, X86CondNZ, dis_MOVS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repne movs" );
break;
case 0xA6: sz = 1; /* REPNE CMP<sz> */
case 0xA7:
- dis_REP_op ( X86CondNZ, dis_CMPS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repne cmps" );
+ dis_REP_op ( &dres, X86CondNZ, dis_CMPS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repne cmps" );
break;
case 0xAA: sz = 1; /* REPNE STOS<sz> */
case 0xAB:
- dis_REP_op ( X86CondNZ, dis_STOS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repne stos" );
+ dis_REP_op ( &dres, X86CondNZ, dis_STOS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repne stos" );
break;
case 0xAE: sz = 1; /* REPNE SCAS<sz> */
case 0xAF:
- dis_REP_op ( X86CondNZ, dis_SCAS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repne scas" );
+ dis_REP_op ( &dres, X86CondNZ, dis_SCAS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repne scas" );
break;
default:
@@ -13991,37 +14020,36 @@
abyte = getIByte(delta); delta++;
if (abyte == 0x66) { sz = 2; abyte = getIByte(delta); delta++; }
- dres.whatNext = Dis_StopHere;
switch (abyte) {
case 0xA4: sz = 1; /* REP MOVS<sz> */
case 0xA5:
- dis_REP_op ( X86CondAlways, dis_MOVS, sz, eip_orig,
- guest_EIP_bbstart+delta, "rep movs" );
+ dis_REP_op ( &dres, X86CondAlways, dis_MOVS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "rep movs" );
break;
case 0xA6: sz = 1; /* REPE CMP<sz> */
case 0xA7:
- dis_REP_op ( X86CondZ, dis_CMPS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repe cmps" );
+ dis_REP_op ( &dres, X86CondZ, dis_CMPS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repe cmps" );
break;
case 0xAA: sz = 1; /* REP STOS<sz> */
case 0xAB:
- dis_REP_op ( X86CondAlways, dis_STOS, sz, eip_orig,
- guest_EIP_bbstart+delta, "rep stos" );
+ dis_REP_op ( &dres, X86CondAlways, dis_STOS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "rep stos" );
break;
case 0xAC: sz = 1; /* REP LODS<sz> */
case 0xAD:
- dis_REP_op ( X86CondAlways, dis_LODS, sz, eip_orig,
- guest_EIP_bbstart+delta, "rep lods" );
+ dis_REP_op ( &dres, X86CondAlways, dis_LODS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "rep lods" );
break;
case 0xAE: sz = 1; /* REPE SCAS<sz> */
case 0xAF:
- dis_REP_op ( X86CondZ, dis_SCAS, sz, eip_orig,
- guest_EIP_bbstart+delta, "repe scas" );
+ dis_REP_op ( &dres, X86CondZ, dis_SCAS, sz, eip_orig,
+ guest_EIP_bbstart+delta, "repe scas" );
break;
case 0x90: /* REP NOP (PAUSE) */
@@ -14029,13 +14057,12 @@
DIP("rep nop (P4 pause)\n");
/* "observe" the hint. The Vex client needs to be careful not
to cause very long delays as a result, though. */
- jmp_lit(Ijk_Yield, ((Addr32)guest_EIP_bbstart)+delta);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Yield, ((Addr32)guest_EIP_bbstart)+delta);
+ vassert(dres.whatNext == Dis_StopHere);
break;
case 0xC3: /* REP RET -- same as normal ret? */
- dis_ret(0);
- dres.whatNext = Dis_StopHere;
+ dis_ret(&dres, 0);
DIP("rep ret\n");
break;
@@ -14741,7 +14768,8 @@
mk_x86g_calculate_condition((X86Condcode)
(1 ^ (opc - 0x80))),
Ijk_Boring,
- IRConst_U32(guest_EIP_bbstart+delta) ) );
+ IRConst_U32(guest_EIP_bbstart+delta),
+ OFFB_EIP ) );
dres.whatNext = Dis_ResteerC;
dres.continueAt = (Addr64)(Addr32)d32;
comment = "(assumed taken)";
@@ -14760,7 +14788,8 @@
stmt( IRStmt_Exit(
mk_x86g_calculate_condition((X86Condcode)(opc - 0x80)),
Ijk_Boring,
- IRConst_U32(d32) ) );
+ IRConst_U32(d32),
+ OFFB_EIP ) );
dres.whatNext = Dis_ResteerC;
dres.continueAt = (Addr64)(Addr32)(guest_EIP_bbstart+delta);
comment = "(assumed not taken)";
@@ -14768,9 +14797,9 @@
else {
/* Conservative default translation - end the block at
this point. */
- jcc_01( (X86Condcode)(opc - 0x80),
+ jcc_01( &dres, (X86Condcode)(opc - 0x80),
(Addr32)(guest_EIP_bbstart+delta), d32);
- dres.whatNext = Dis_StopHere;
+ vassert(dres.whatNext == Dis_StopHere);
}
DIP("j%s-32 0x%x %s\n", name_X86Condcode(opc - 0x80), d32, comment);
break;
@@ -14896,8 +14925,8 @@
point if the syscall needs to be restarted. */
stmt( IRStmt_Put( OFFB_IP_AT_SYSCALL,
mkU32(guest_EIP_curr_instr) ) );
- jmp_lit(Ijk_Sys_sysenter, 0/*bogus next EIP value*/);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_Sys_sysenter, 0/*bogus next EIP value*/);
+ vassert(dres.whatNext == Dis_StopHere);
DIP("sysenter");
break;
@@ -15073,8 +15102,8 @@
insn, but nevertheless be paranoid and update it again right
now. */
stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_curr_instr) ) );
- jmp_lit(Ijk_NoDecode, guest_EIP_curr_instr);
- dres.whatNext = Dis_StopHere;
+ jmp_lit(&dres, Ijk_NoDecode, guest_EIP_curr_instr);
+ vassert(dres.whatNext == Dis_StopHere);
dres.len = 0;
/* We also need to say that a CAS is not expected now, regardless
of what it might have been set to at the start of the function,
@@ -15088,6 +15117,20 @@
decode_success:
/* All decode successes end up here. */
+ switch (dres.whatNext) {
+ case Dis_Continue:
+ stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_bbstart + delta) ) );
+ break;
+ case Dis_ResteerU:
+ case Dis_ResteerC:
+ stmt( IRStmt_Put( OFFB_EIP, mkU32(dres.continueAt) ) );
+ break;
+ case Dis_StopHere:
+ break;
+ default:
+ vassert(0);
+ }
+
DIP("\n");
dres.len = delta - delta_start;
return dres;
@@ -15105,7 +15148,6 @@
is located in host memory at &guest_code[delta]. */
DisResult disInstr_X86 ( IRSB* irsb_IN,
- Bool put_IP,
Bool (*resteerOkFn) ( void*, Addr64 ),
Bool resteerCisOk,
void* callback_opaque,
@@ -15131,7 +15173,7 @@
x1 = irsb_IN->stmts_used;
expect_CAS = False;
- dres = disInstr_X86_WRK ( &expect_CAS, put_IP, resteerOkFn,
+ dres = disInstr_X86_WRK ( &expect_CAS, resteerOkFn,
resteerCisOk,
callback_opaque,
delta, archinfo, abiinfo );
@@ -15151,7 +15193,7 @@
/* inconsistency detected. re-disassemble the instruction so as
to generate a useful error message; then assert. */
vex_traceflags |= VEX_TRACE_FE;
- dres = disInstr_X86_WRK ( &expect_CAS, put_IP, resteerOkFn,
+ dres = disInstr_X86_WRK ( &expect_CAS, resteerOkFn,
resteerCisOk,
callback_opaque,
delta, archinfo, abiinfo );
Modified: branches/TCHAIN/Makefile-gcc (+3 -1)
===================================================================
--- branches/TCHAIN/Makefile-gcc 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/Makefile-gcc 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -88,7 +88,9 @@
-Wpointer-arith -Wbad-function-cast -Wcast-qual \
-Wcast-align -Wmissing-declarations \
-Wno-pointer-sign \
- $(EXTRA_CFLAGS) -g -O2 -fstrict-aliasing
+ $(EXTRA_CFLAGS) -g -O2 -fstrict-aliasing \
+ \
+ -O
#CC = icc
#CCFLAGS = -g -Wall -wd981 -wd279 -wd1287 -wd869 -wd111 -wd188 -wd186
Modified: branches/TCHAIN/priv/host_x86_isel.c (+164 -25)
===================================================================
--- branches/TCHAIN/priv/host_x86_isel.c 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/host_x86_isel.c 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -154,21 +154,38 @@
- The host subarchitecture we are selecting insns for.
This is set at the start and does not change.
- Note, this is all host-independent. */
+ - 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.
+
+ Note, this is all (well, mostly) host-independent.
+*/
+
typedef
struct {
+ /* Constant -- are set at the start and do not change. */
IRTypeEnv* type_env;
HReg* vregmap;
HReg* vregmapHI;
Int n_vregmap;
+ UInt hwcaps;
+
+ Bool chainingAllowed;
+ Addr64 max_ga;
+
+ /* These are modified as we go along. */
HInstrArray* code;
-
Int vreg_ctr;
-
- UInt hwcaps;
}
ISelEnv;
@@ -4038,14 +4055,48 @@
/* --------- EXIT --------- */
case Ist_Exit: {
- X86RI* dst;
- X86CondCode cc;
if (stmt->Ist.Exit.dst->tag != Ico_U32)
- vpanic("isel_x86: Ist_Exit: dst is not a 32-bit value");
- dst = iselIntExpr_RI(env, IRExpr_Const(stmt->Ist.Exit.dst));
- cc = iselCondCode(env,stmt->Ist.Exit.guard);
- addInstr(env, X86Instr_Goto(stmt->Ist.Exit.jk, cc, dst));
- return;
+ vpanic("iselStmt(x86): Ist_Exit: dst is not a 32-bit value");
+
+ X86CondCode cc = iselCondCode(env, stmt->Ist.Exit.guard);
+ X86AMode* amEIP = X86AMode_IR(stmt->Ist.Exit.offsIP,
+ hregX86_EBP());
+
+ /* Case: boring transfer to known address */
+ if (stmt->Ist.Exit.jk == Ijk_Boring) {
+ if (env->chainingAllowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool toFastEP
+ = ((Addr32)stmt->Ist.Exit.dst->Ico.U32) > env->max_ga;
+ if (0) vex_printf("%s", toFastEP ? "Y" : ",");
+ addInstr(env, X86Instr_XDirect(stmt->Ist.Exit.dst->Ico.U32,
+ amEIP, cc, toFastEP));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an assisted transfer,
+ as that's the only alternative that is allowable. */
+ HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, X86Instr_XAssisted(r, amEIP, cc, Ijk_Boring));
+ }
+ return;
+ }
+
+ /* Case: assisted transfer to arbitrary address */
+ switch (stmt->Ist.Exit.jk) {
+ case Ijk_MapFail:
+ case Ijk_SigSEGV: case Ijk_TInval: case Ijk_EmWarn: {
+ HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst));
+ addInstr(env, X86Instr_XAssisted(r, amEIP, cc, stmt->Ist.Exit.jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Do we ever expect to see any other kind? */
+ goto stmt_fail;
}
default: break;
@@ -4060,18 +4111,82 @@
/*--- ISEL: Basic block terminators (Nexts) ---*/
/*---------------------------------------------------------*/
-static void iselNext ( ISelEnv* env, IRExpr* next, IRJumpKind jk )
+static void iselNext ( ISelEnv* env,
+ IRExpr* next, IRJumpKind jk, Int offsIP )
{
- X86RI* ri;
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");
+ vex_printf( "\n");
}
- ri = iselIntExpr_RI(env, next);
- addInstr(env, X86Instr_Goto(jk, Xcc_ALWAYS,ri));
+
+ /* Case: boring transfer to known address */
+ if (next->tag == Iex_Const) {
+ IRConst* cdst = next->Iex.Const.con;
+ vassert(cdst->tag == Ico_U32);
+ if (jk == Ijk_Boring || jk == Ijk_Call) {
+ /* Boring transfer to known address */
+ X86AMode* amEIP = X86AMode_IR(offsIP, hregX86_EBP());
+ if (env->chainingAllowed) {
+ /* .. almost always true .. */
+ /* Skip the event check at the dst if this is a forwards
+ edge. */
+ Bool toFastEP
+ = ((Addr64)cdst->Ico.U32) > env->max_ga;
+ if (0) vex_printf("%s", toFastEP ? "X" : ".");
+ addInstr(env, X86Instr_XDirect(cdst->Ico.U32,
+ amEIP, Xcc_ALWAYS,
+ toFastEP));
+ } else {
+ /* .. very occasionally .. */
+ /* We can't use chaining, so ask for an assisted transfer,
+ as that's the only alternative that is allowable. */
+ HReg r = iselIntExpr_R(env, next);
+ addInstr(env, X86Instr_XAssisted(r, amEIP, Xcc_ALWAYS,
+ Ijk_Boring));
+ }
+ return;
+ }
+ }
+
+ /* Case: call/return (==boring) transfer to any address */
+ switch (jk) {
+ case Ijk_Boring: case Ijk_Ret: case Ijk_Call: {
+ HReg r = iselIntExpr_R(env, next);
+ X86AMode* amEIP = X86AMode_IR(offsIP, hregX86_EBP());
+ if (env->chainingAllowed) {
+ addInstr(env, X86Instr_XIndir(r, amEIP, Xcc_ALWAYS));
+ } else {
+ addInstr(env, X86Instr_XAssisted(r, amEIP, Xcc_ALWAYS,
+ Ijk_Boring));
+ }
+ return;
+ }
+ default:
+ break;
+ }
+
+ /* Case: some other kind of transfer to any address */
+ switch (jk) {
+ case Ijk_Sys_int128: case Ijk_ClientReq: case Ijk_NoRedir:
+ case Ijk_Yield: case Ijk_SigTRAP: {
+ HReg r = iselIntExpr_R(env, next);
+ X86AMode* amEIP = X86AMode_IR(offsIP, hregX86_EBP());
+ addInstr(env, X86Instr_XAssisted(r, amEIP, Xcc_ALWAYS, jk));
+ return;
+ }
+ default:
+ break;
+ }
+
+ vex_printf( "\n-- PUT(%d) = ", offsIP);
+ ppIRExpr( next );
+ vex_printf( "; exit-");
+ ppIRJumpKind(jk);
+ vex_printf( "\n");
+ vassert(0); // are we expecting any other kind?
}
@@ -4081,14 +4196,21 @@
/* Translate an entire SB to x86 code. */
-HInstrArray* iselSB_X86 ( IRSB* bb, VexArch arch_host,
- VexArchInfo* archinfo_host,
- VexAbiInfo* vbi/*UNUSED*/ )
+HInstrArray* iselSB_X86 ( IRSB* bb,
+ VexArch arch_host,
+ VexArchInfo* archinfo_host,
+ VexAbiInfo* vbi/*UNUSED*/,
+ Int offs_Host_EvC_Counter,
+ Int offs_Host_EvC_FailAddr,
+ Bool chainingAllowed,
+ Bool addProfInc,
+ Addr64 max_ga )
{
Int i, j;
HReg hreg, hregHI;
ISelEnv* env;
UInt hwcaps_host = archinfo_host->hwcaps;
+ X86AMode *amCounter, *amFailAddr;
/* sanity ... */
vassert(arch_host == VexArchX86);
@@ -4097,6 +4219,8 @@
| VEX_HWCAPS_X86_SSE2
| VEX_HWCAPS_X86_SSE3
| VEX_HWCAPS_X86_LZCNT)));
+ vassert(sizeof(max_ga) == 8);
+ vassert((max_ga >> 32) == 0);
/* Make up an initial environment to use. */
env = LibVEX_Alloc(sizeof(ISelEnv));
@@ -4115,7 +4239,9 @@
env->vregmapHI = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
/* and finally ... */
- env->hwcaps = hwcaps_host;
+ env->chainingAllowed = chainingAllowed;
+ env->hwcaps = hwcaps_host;
+ env->max_ga = max_ga;
/* For each IR temporary, allocate a suitably-kinded virtual
register. */
@@ -4140,11 +4266,24 @@
}
env->vreg_ctr = j;
+ /* The very first instruction must be an event check. */
+ amCounter = X86AMode_IR(offs_Host_EvC_Counter, hregX86_EBP());
+ amFailAddr = X86AMode_IR(offs_Host_EvC_FailAddr, hregX86_EBP());
+ addInstr(env, X86Instr_EvCheck(amCounter, amFailAddr));
+
+ /* 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_patchProfCtr. */
+ if (addProfInc) {
+ addInstr(env, X86Instr_ProfInc());
+ }
+
/* Ok, finally we can iterate over the statements. */
for (i = 0; i < bb->stmts_used; i++)
- iselStmt(env,bb->stmts[i]);
+ iselStmt(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;
Modified: branches/TCHAIN/priv/host_x86_defs.h (+83 -15)
===================================================================
--- branches/TCHAIN/priv/host_x86_defs.h 2012-04-02 22:24:12 +01:00 (rev 2272)
+++ branches/TCHAIN/priv/host_x86_defs.h 2012-04-02 22:54:49 +01:00 (rev 2273)
@@ -349,7 +349,9 @@
Xin_Sh3232, /* shldl or shrdl */
Xin_Push, /* push (32-bit?) value on stack */
Xin_Call, /* call to address in register */
- Xin_Goto, /* conditional/unconditional jmp to dst */
+ Xin_XDirect, /* direct transfer to GA */
+ Xin_XIndir, /* indirect transfer to GA */
+ Xin_XAssisted, /* assisted transfer to GA */
Xin_CMov32, /* conditional move */
Xin_LoadEX, /* mov{s,z}{b,w}l from mem to reg */
Xin_Store, /* store 16/8 bit value in memory */
@@ -378,7 +380,9 @@
Xin_Sse64FLo, /* SSE binary, 64F in lowest lane only */
Xin_SseReRg, /* SSE binary general reg-reg, Re, Rg */
Xin_SseCMov, /* SSE conditional move */
- Xin_SseShuf /* SSE2 shuffle (pshufd) */
+ Xin_SseShuf, /* SSE2 shuffle (pshufd) */
+ Xin_EvCheck, /* Event check */
+ Xin_ProfInc /* 64-bit profile counter increment */
}
X86InstrTag;
@@ -444,13 +448,30 @@
Addr32 target;
Int regparms; /* 0 .. 3 */
} Call;
- /* Pseudo-insn. Goto dst, on given condition (which could be
- Xcc_ALWAYS). */
+ /* Update the guest EIP value, then exit requesting to chain
+ to it. May be conditional. Urr, use of Addr32 implicitly
+ assumes that wordsize(guest) == wordsize(host). */
struct {
+ Addr32 dstGA; /* next guest address */
+ X86AMode* amEIP; /* amode in guest state for EIP */
+ X86CondCode cond; /* can be Xcc_ALWAYS */
+ Bool toFastEP; /* chain to the slow or fast point? */
+ } XDirect;
+ /* Boring transfer to a guest address not known at JIT time.
+ Not chainable. May be conditional. */
+ struct {
+ HReg dstGA;
+ X86AMode* amEIP;
+ X86CondCode cond; /* can be Xcc_ALWAYS */
+ } XIndir;
+ /* Assisted transfer to a guest address, most general case.
+ Not chainable. May be conditional. */
+ struct {
+ HReg dstGA;
+ X86AMode* amEIP;
+ X86CondCode cond; /* can be Xcc_ALWAYS */
IRJumpKind jk;
- X86CondCode cond;
- X86RI* dst;
- } Goto;
+ } XAssisted;
/* Mov src to dst on the given condition, which may not
be the bogus Xcc_ALWAYS. */
struct {
@@ -615,6 +636,15 @@
HReg src;
HReg dst;
} SseShuf;
+ struct {
+ X86AMode* amCounter;
+ X86AMode* amFailAddr;
+ } EvCheck;
+ struct {
+ /* No fields. The address of the counter to inc is
+ installed later, post-translation, by patching it in,
+ as it is not known at translation time. */
+ } ProfInc;
} Xin;
}
@@ -632,7 +662,12 @@
extern X86Instr* X86Instr_Sh3232 ( X86ShiftOp, UInt amt, HReg src, HReg dst );
extern X86Instr* X86Instr_Push ( X86RMI* );
extern X86Instr* X86Instr_Call ( X86CondCode, Addr32, Int );
-extern X86Instr* X86Instr_Goto ( IRJumpKind, X86CondCode cond, X86RI* dst );
+extern X86Instr* X86Instr_XDirect ( Addr32 dstGA, X86AMode* amEIP,
+ X86CondCode cond, Bool toFastEP );
+extern X86Instr* X86Instr_XIndir ( HReg dstGA, X86AMode* amEIP,
+ X86CondCode cond );
+extern X86Instr* X86Instr_XAssisted ( HReg dstGA, X86AMode* amEIP,
+ X86CondCode cond, IRJumpKind jk );
extern X86Instr* X86Instr_CMov32 ( X86CondCode, X86RM* src, HReg dst );
extern X86Instr* X86Instr_LoadEX ( UChar szSmall, Bool syned,
X86AMode* src, HReg dst );
@@ -663,6 +698,9 @@
extern X86Instr* X86Instr_SseReRg ( X86SseOp, HReg, HReg );
extern X86Instr* X86Instr_SseCMov ( X86CondCode, HReg src, HReg dst );
extern X86Instr* X86Instr_SseShuf ( Int order, HReg src, HReg dst );
+extern X86Instr* X86Instr_EvCheck ( X86AMode* amCounter,
+ X86AMode* amFailAddr );
+extern X86Instr* X86Instr_ProfInc ( void );
extern void ppX86Instr ( X86Instr*, Bool );
@@ -672,10 +710,13 @@
extern void getRegUsage_X86Instr ( HRegUsage*, X86Instr*, Bool );
extern void mapRegs_X86Instr ( HRegRemap*, X86Instr*, Bool );
extern Bool isMove_X86Instr ( X86Instr*, HReg*, HReg* );
-extern Int emit_X86Instr ( UChar* buf, Int nbuf, X86Instr*,
- Bool,
- void* dispatch_unassisted,
- void* dispatch_assisted );
+extern Int emit_X86Instr ( /*MB_MOD*/Bool* is_profInc,
+ UChar* buf, Int nbuf, X86Instr* i,
+ Bool mode64,
+ void* disp_cp_chain_me_to_slowEP,
+ void* disp_cp_chain_me_to_fastEP,
+ void* disp_cp_xindir,
+ void* disp_cp_xassisted );
extern void genSpill_X86 ( /*OUT*/HInstr** i1, /*OUT*/HInstr** i2,
HReg rreg, Int offset, Bool );
@@ -685,10 +726,37 @@
extern X86Instr* directReload_X86 ( X86Instr* i,
HReg vreg, Short spill_off );
extern void getAllocableRegs_X86 ( Int*, HReg** );
-extern HInstrArray* iselSB_X86 ( IRSB*, VexArch,
- VexArchInfo*,
- VexAbiInfo* );
+extern HInstrArray* iselSB_X86 ( IRSB*,
+ VexArch,
+ VexArchInfo*,
+ VexAbiInfo*,
+ Int offs_Host_EvC_Counter,
+ Int offs_Host_EvC_FailAddr,
+ Bool chainingAllowed,
+ Bool addProfInc,
+ Addr64 max_ga );
+/* How big is an event check? This is kind of a kludge because it
+ depends on the offsets of host_EvC_FAILADDR and host_EvC_COUNTER,
+ and so assumes that they are both <= 128, and so can use the short
+ offset encoding. This is all checked with assertions, so in the
+ worst case we will merely assert at startup. */
+extern Int evCheckSzB_X86 ( void );
+
+/* Perform a chaining and unchaining of an XDirect jump. */
+extern VexInvalRange chainXDirect_X86 ( void* place_to_chain,
+ void* disp_cp_chain_me_EXPECTED,
+ void* place_to_jump_to );
+
+extern VexInvalRange unchainXDirect_X86 ( void* place_to_unchain,
+ void* place_to_jump_to_EXPECTED,
+ void* disp_cp_chain_me );
+
+/* Patch the counter location into an existing ProfInc point. */
+extern VexInvalRange patchProfInc_X86 ( void* place_to_patch,
+ ULong* location_of_counter );
+
+
#endif /* ndef __VEX_HOST_X86_DEFS_H */
/*---------------------------------------------------------------*/
Modified...
[truncated message content] |
|
From: <sv...@va...> - 2012-04-02 21:25:21
|
sewardj 2012-04-02 22:25:14 +0100 (Mon, 02 Apr 2012)
New Revision: 12483
Log:
Fixes for capabilities checking w.r.t. Power DFP instructions
(Valgrind side). Fixes #297329.
(Maynard Johnson, may...@us...)
Modified files:
trunk/coregrind/m_machine.c
Modified: trunk/coregrind/m_machine.c (+24 -6)
===================================================================
--- trunk/coregrind/m_machine.c 2012-04-02 16:46:51 +01:00 (rev 12482)
+++ trunk/coregrind/m_machine.c 2012-04-02 22:25:14 +01:00 (rev 12483)
@@ -750,7 +750,7 @@
vki_sigaction_fromK_t saved_sigill_act, saved_sigfpe_act;
vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act;
- volatile Bool have_F, have_V, have_FX, have_GX, have_VX;
+ volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP;
Int r;
/* This is a kludge. Really we ought to back-convert saved_act
@@ -837,6 +837,13 @@
__asm__ __volatile__(".long 0xf0000564"); /* xsabsdp XT,XB */
}
+ /* Check for Decimal Floating Point (DFP) support. */
+ have_DFP = True;
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
+ have_DFP = False;
+ } else {
+ __asm__ __volatile__(".long 0xee4e8005"); /* dadd FRT,FRA, FRB */
+ }
/* determine dcbz/dcbzl sizes while we still have the signal
* handlers registered */
@@ -848,9 +855,9 @@
vg_assert(r == 0);
r = VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL);
vg_assert(r == 0);
- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d\n",
+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d\n",
(Int)have_F, (Int)have_V, (Int)have_FX,
- (Int)have_GX, (Int)have_VX);
+ (Int)have_GX, (Int)have_VX, (Int)have_DFP);
/* Make FP a prerequisite for VMX (bogusly so), and for FX and GX. */
if (have_V && !have_F)
have_V = False;
@@ -870,7 +877,9 @@
if (have_FX) vai.hwcaps |= VEX_HWCAPS_PPC32_FX;
if (have_GX) vai.hwcaps |= VEX_HWCAPS_PPC32_GX;
if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC32_VX;
+ if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC32_DFP;
+
/* But we're not done yet: VG_(machine_ppc32_set_clszB) must be
called before we're ready to go. */
return True;
@@ -883,7 +892,7 @@
vki_sigaction_fromK_t saved_sigill_act, saved_sigfpe_act;
vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act;
- volatile Bool have_F, have_V, have_FX, have_GX, have_VX;
+ volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP;
Int r;
/* This is a kludge. Really we ought to back-convert saved_act
@@ -962,6 +971,14 @@
__asm__ __volatile__(".long 0xf0000564"); /* xsabsdp XT,XB */
}
+ /* Check for Decimal Floating Point (DFP) support. */
+ have_DFP = True;
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
+ have_DFP = False;
+ } else {
+ __asm__ __volatile__(".long 0xee4e8005"); /* dadd FRT,FRA, FRB */
+ }
+
/* determine dcbz/dcbzl sizes while we still have the signal
* handlers registered */
find_ppc_dcbz_sz(&vai);
@@ -969,9 +986,9 @@
VG_(sigaction)(VKI_SIGILL, &saved_sigill_act, NULL);
VG_(sigaction)(VKI_SIGFPE, &saved_sigfpe_act, NULL);
VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL);
- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d\n",
+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d\n",
(Int)have_F, (Int)have_V, (Int)have_FX,
- (Int)have_GX, (Int)have_VX);
+ (Int)have_GX, (Int)have_VX, (Int)have_DFP);
/* on ppc64, if we don't even have FP, just give up. */
if (!have_F)
return False;
@@ -985,6 +1002,7 @@
if (have_FX) vai.hwcaps |= VEX_HWCAPS_PPC64_FX;
if (have_GX) vai.hwcaps |= VEX_HWCAPS_PPC64_GX;
if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC64_VX;
+ if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC64_DFP;
/* But we're not done yet: VG_(machine_ppc64_set_clszB) must be
called before we're ready to go. */
|
|
From: <sv...@va...> - 2012-04-02 21:24:19
|
sewardj 2012-04-02 22:24:12 +0100 (Mon, 02 Apr 2012)
New Revision: 2272
Log:
Fixes for capabilities checking w.r.t. Power DFP instructions (VEX
side). Fixes #297329. (Maynard Johnson, may...@us...)
Modified files:
trunk/priv/guest_ppc_toIR.c
trunk/priv/host_ppc_isel.c
trunk/priv/main_main.c
trunk/pub/libvex.h
Modified: trunk/priv/main_main.c (+6 -2)
===================================================================
--- trunk/priv/main_main.c 2012-04-02 15:08:42 +01:00 (rev 2271)
+++ trunk/priv/main_main.c 2012-04-02 22:24:12 +01:00 (rev 2272)
@@ -890,6 +890,7 @@
const UInt FX = VEX_HWCAPS_PPC32_FX;
const UInt GX = VEX_HWCAPS_PPC32_GX;
const UInt VX = VEX_HWCAPS_PPC32_VX;
+ const UInt DFP = VEX_HWCAPS_PPC32_DFP;
UInt c = hwcaps;
if (c == 0) return "ppc32-int";
if (c == F) return "ppc32-int-flt";
@@ -900,7 +901,8 @@
if (c == (F|V|FX)) return "ppc32-int-flt-vmx-FX";
if (c == (F|V|GX)) return "ppc32-int-flt-vmx-GX";
if (c == (F|V|FX|GX)) return "ppc32-int-flt-vmx-FX-GX";
- if (c == (F|V|FX|GX|VX)) return "ppc32-int-flt-vmx-FX-GX-VX";
+ if (c == (F|V|FX|GX|DFP)) return "ppc32-int-flt-vmx-FX-GX-DFP";
+ if (c == (F|V|FX|GX|VX|DFP)) return "ppc32-int-flt-vmx-FX-GX-VX-DFP";
return NULL;
}
@@ -912,6 +914,7 @@
const UInt FX = VEX_HWCAPS_PPC64_FX;
const UInt GX = VEX_HWCAPS_PPC64_GX;
const UInt VX = VEX_HWCAPS_PPC64_VX;
+ const UInt DFP = VEX_HWCAPS_PPC64_DFP;
UInt c = hwcaps;
if (c == 0) return "ppc64-int-flt";
if (c == FX) return "ppc64-int-flt-FX";
@@ -921,7 +924,8 @@
if (c == (V|FX)) return "ppc64-int-flt-vmx-FX";
if (c == (V|GX)) return "ppc64-int-flt-vmx-GX";
if (c == (V|FX|GX)) return "ppc64-int-flt-vmx-FX-GX";
- if (c == (V|FX|GX|VX)) return "ppc64-int-flt-vmx-FX-GX-VX";
+ if (c == (V|FX|GX|DFP)) return "ppc64-int-flt-vmx-FX-GX-DFP";
+ if (c == (V|FX|GX|VX|DFP)) return "ppc64-int-flt-vmx-FX-GX-VX-DFP";
return NULL;
}
Modified: trunk/priv/guest_ppc_toIR.c (+14 -4)
===================================================================
--- trunk/priv/guest_ppc_toIR.c 2012-04-02 15:08:42 +01:00 (rev 2271)
+++ trunk/priv/guest_ppc_toIR.c 2012-04-02 22:24:12 +01:00 (rev 2272)
@@ -13591,6 +13591,7 @@
Bool allow_FX = False;
Bool allow_GX = False;
Bool allow_VX = False; // Equates to "supports Power ISA 2.06
+ Bool allow_DFP = False;
UInt hwcaps = archinfo->hwcaps;
Long delta;
@@ -13601,12 +13602,14 @@
allow_FX = (0 != (hwcaps & VEX_HWCAPS_PPC64_FX));
allow_GX = (0 != (hwcaps & VEX_HWCAPS_PPC64_GX));
allow_VX = (0 != (hwcaps & VEX_HWCAPS_PPC64_VX));
+ allow_DFP = (0 != (hwcaps & VEX_HWCAPS_PPC64_DFP));
} else {
allow_F = (0 != (hwcaps & VEX_HWCAPS_PPC32_F));
allow_V = (0 != (hwcaps & VEX_HWCAPS_PPC32_V));
allow_FX = (0 != (hwcaps & VEX_HWCAPS_PPC32_FX));
allow_GX = (0 != (hwcaps & VEX_HWCAPS_PPC32_GX));
allow_VX = (0 != (hwcaps & VEX_HWCAPS_PPC32_VX));
+ allow_DFP = (0 != (hwcaps & VEX_HWCAPS_PPC32_DFP));
}
/* The running delta */
@@ -13805,7 +13808,7 @@
case 0x202: // dsub - DFP Subtract
case 0x22: // dmul - DFP Mult
case 0x222: // ddiv - DFP Divide
- if (!allow_GX) goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_arith( theInstr ))
goto decode_success;
case 0x3CE: // fcfidus (implemented as native insn)
@@ -14029,7 +14032,7 @@
case 0x202: // dsubq - DFP Subtract
case 0x22: // dmulq - DFP Mult
case 0x222: // ddivq - DFP Divide
- if (!allow_GX) goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_arithq( theInstr ))
goto decode_success;
goto decode_failure;
@@ -14586,7 +14589,13 @@
vex_printf("disInstr(ppc): "
"declined to decode a Graphics-Optional insn.\n");
goto decode_failure;
+ decode_noDFP:
+ vassert(!allow_DFP);
+ vex_printf("disInstr(ppc): "
+ "declined to decode a Decimal Floating Point insn.\n");
+ goto decode_failure;
+
decode_failure:
/* All decode failures end up here. */
opc2 = (theInstr) & 0x7FF;
@@ -14658,10 +14667,11 @@
/* do some sanity checks */
mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V
- | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX;
+ | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX
+ | VEX_HWCAPS_PPC32_DFP;
mask64 = VEX_HWCAPS_PPC64_V | VEX_HWCAPS_PPC64_FX
- | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX;
+ | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP;
if (mode64) {
vassert((hwcaps_guest & mask32) == 0);
Modified: trunk/priv/host_ppc_isel.c (+3 -2)
===================================================================
--- trunk/priv/host_ppc_isel.c 2012-04-02 15:08:42 +01:00 (rev 2271)
+++ trunk/priv/host_ppc_isel.c 2012-04-02 22:24:12 +01:00 (rev 2272)
@@ -4610,10 +4610,11 @@
/* do some sanity checks */
mask32 = VEX_HWCAPS_PPC32_F | VEX_HWCAPS_PPC32_V
- | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX;
+ | VEX_HWCAPS_PPC32_FX | VEX_HWCAPS_PPC32_GX | VEX_HWCAPS_PPC32_VX
+ | VEX_HWCAPS_PPC32_DFP;
mask64 = VEX_HWCAPS_PPC64_V | VEX_HWCAPS_PPC64_FX
- | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX;
+ | VEX_HWCAPS_PPC64_GX | VEX_HWCAPS_PPC64_VX | VEX_HWCAPS_PPC64_DFP;
if (mode64) {
vassert((hwcaps_host & mask32) == 0);
Modified: trunk/pub/libvex.h (+3 -0)
===================================================================
--- trunk/pub/libvex.h 2012-04-02 15:08:42 +01:00 (rev 2271)
+++ trunk/pub/libvex.h 2012-04-02 22:24:12 +01:00 (rev 2272)
@@ -96,6 +96,9 @@
(fres,frsqrte,fsel,stfiwx) */
#define VEX_HWCAPS_PPC64_VX (1<<16) /* Vector-scalar floating-point (VSX); implies ISA 2.06 or higher */
+#define VEX_HWCAPS_PPC32_DFP (1<<17) /* Decimal Floating Point (DFP) -- e.g., dadd */
+#define VEX_HWCAPS_PPC64_DFP (1<<18) /* Decimal Floating Point (DFP) -- e.g., dadd */
+
/* s390x: Hardware capability encoding
Bits Information
|
|
From: <sv...@va...> - 2012-04-02 15:47:00
|
bart 2012-04-02 16:46:51 +0100 (Mon, 02 Apr 2012)
New Revision: 12482
Log:
drd, realloc() intercept: Swap freeing and cleaning memory.
Modified files:
trunk/drd/drd_malloc_wrappers.c
Modified: trunk/drd/drd_malloc_wrappers.c (+1 -1)
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2012-04-02 16:45:51 +01:00 (rev 12481)
+++ trunk/drd/drd_malloc_wrappers.c 2012-04-02 16:46:51 +01:00 (rev 12482)
@@ -228,9 +228,9 @@
VG_(memcpy)(p_new, p_old, mc->size);
/* Free old memory. */
- VG_(cli_free)(p_old);
if (mc->size > 0)
s_stop_using_mem_callback(mc->data, mc->size);
+ VG_(cli_free)(p_old);
VG_(HT_remove)(s_malloc_list, (UWord)p_old);
/* Update state information. */
|
|
From: <sv...@va...> - 2012-04-02 15:45:58
|
bart 2012-04-02 16:45:51 +0100 (Mon, 02 Apr 2012)
New Revision: 12481
Log:
configure.in: Avoid that configure complains about "-----: command not found".
Modified files:
trunk/configure.in
Modified: trunk/configure.in (+0 -1)
===================================================================
--- trunk/configure.in 2012-04-02 16:10:37 +01:00 (rev 12480)
+++ trunk/configure.in 2012-04-02 16:45:51 +01:00 (rev 12481)
@@ -1097,7 +1097,6 @@
AC_MSG_RESULT([no])
])
------
CFLAGS=$safe_CFLAGS
AM_CONDITIONAL(HAS_DFP, test x$ac_asm_have_dfp = xyes -a x$ac_gcc_have_dfp = xyes)
|
|
From: <sv...@va...> - 2012-04-02 15:10:49
|
sewardj 2012-04-02 16:10:37 +0100 (Mon, 02 Apr 2012)
New Revision: 12480
Log:
Fix track-origin instrumentation for ppc32 following r2270/r12476
(initial DFP support). Maynard Johnson (may...@us...).
Modified files:
trunk/memcheck/mc_machine.c
Modified: trunk/memcheck/mc_machine.c (+2 -1)
===================================================================
--- trunk/memcheck/mc_machine.c 2012-04-02 15:52:23 +01:00 (rev 12479)
+++ trunk/memcheck/mc_machine.c 2012-04-02 16:10:37 +01:00 (rev 12480)
@@ -393,7 +393,8 @@
if (o == GOF(CIA) && sz == 4) return -1;
if (o == GOF(IP_AT_SYSCALL) && sz == 4) return -1; /* slot unused */
- if (o == GOF(FPROUND) && sz == 4) return -1;
+ if (o == GOF(FPROUND) && sz == 1) return -1;
+ if (o == GOF(DFPROUND) && sz == 1) return -1;
if (o == GOF(VRSAVE) && sz == 4) return -1;
if (o == GOF(EMWARN) && sz == 4) return -1;
if (o == GOF(TISTART) && sz == 4) return -1;
|
|
From: <sv...@va...> - 2012-04-02 14:52:30
|
sewardj 2012-04-02 15:52:23 +0100 (Mon, 02 Apr 2012)
New Revision: 12479
Log:
Swizzle external.
Modified directories:
branches/TCHAIN/
Modified: branches/TCHAIN/
Property changed: branches/TCHAIN (+0 -0)
___________________________________________________________________
Name: svn:externals
- VEX svn://svn.valgrind.org/vex/trunk
+ VEX svn://svn.valgrind.org/vex/branches/TCHAIN
|
|
From: <sv...@va...> - 2012-04-02 14:36:34
|
bart 2012-04-02 15:36:22 +0100 (Mon, 02 Apr 2012)
New Revision: 12478
Log:
drd, free() intercept: Swap freeing and cleaning memory.
Note: since the big lock is held while the malloc() and free() intercepts are
running, and since mmap() is treated by Valgrind as a non-blocking system call,
this code change is not expected to result in a behavior change of drd.
Modified files:
trunk/drd/drd_malloc_wrappers.c
Modified: trunk/drd/drd_malloc_wrappers.c (+2 -2)
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2012-04-02 15:26:30 +01:00 (rev 12477)
+++ trunk/drd/drd_malloc_wrappers.c 2012-04-02 15:36:22 +01:00 (rev 12478)
@@ -131,10 +131,10 @@
if (mc)
{
tl_assert(p == mc->data);
+ if (mc->size > 0)
+ s_stop_using_mem_callback(mc->data, mc->size);
if (dealloc)
VG_(cli_free)((void*)p);
- if (mc->size > 0)
- s_stop_using_mem_callback(mc->data, mc->size);
VG_(HT_remove)(s_malloc_list, (UWord)p);
VG_(free)(mc);
return True;
|
|
From: <sv...@va...> - 2012-04-02 14:26:43
|
sewardj 2012-04-02 15:26:30 +0100 (Mon, 02 Apr 2012)
New Revision: 12477
Log:
Make a copy of r2270/r12476 for work on translation chaining.
Copied directories:
branches/TCHAIN/ (from rev 12476, trunk/)
Copied: branches/TCHAIN/
(from rev 12476, trunk/)
|
|
From: <sv...@va...> - 2012-04-02 14:08:52
|
sewardj 2012-04-02 15:08:42 +0100 (Mon, 02 Apr 2012)
New Revision: 2271
Log:
Make a copy of r2270/r12476 for work on translation chaining.
Copied directories:
branches/TCHAIN/ (from rev 2270, trunk/)
Copied: branches/TCHAIN/
(from rev 2270, trunk/)
|
|
From: <sv...@va...> - 2012-04-02 10:22:18
|
sewardj 2012-04-02 11:22:05 +0100 (Mon, 02 Apr 2012)
New Revision: 12476
Log:
Initial support for POWER Processor decimal floating point
instruction support -- VEX side changes. See #295221.
This patch adds test cases. Also adds some minor Memcheck
instrumentation tweaks necessitated by the IR changes.
Added files:
trunk/none/tests/ppc32/test_dfp1.c
trunk/none/tests/ppc32/test_dfp1.stderr.exp
trunk/none/tests/ppc32/test_dfp1.stdout.exp
trunk/none/tests/ppc32/test_dfp1.vgtest
trunk/none/tests/ppc64/test_dfp1.c
trunk/none/tests/ppc64/test_dfp1.stderr.exp
trunk/none/tests/ppc64/test_dfp1.stdout.exp
trunk/none/tests/ppc64/test_dfp1.vgtest
trunk/tests/check_dfp_cap
Modified files:
trunk/configure.in
trunk/memcheck/mc_machine.c
trunk/memcheck/mc_translate.c
trunk/none/tests/ppc32/Makefile.am
trunk/none/tests/ppc64/Makefile.am
trunk/tests/Makefile.am
Modified: trunk/none/tests/ppc32/Makefile.am (+15 -2)
===================================================================
--- trunk/none/tests/ppc32/Makefile.am 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc32/Makefile.am 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -29,7 +29,8 @@
power6_bcmp.stderr.exp power6_bcmp.stdout.exp power6_bcmp.vgtest \
test_isa_2_06_part1.stderr.exp test_isa_2_06_part1.stdout.exp test_isa_2_06_part1.vgtest \
test_isa_2_06_part2.stderr.exp test_isa_2_06_part2.stdout.exp test_isa_2_06_part2.vgtest \
- test_isa_2_06_part3.stderr.exp test_isa_2_06_part3.stdout.exp test_isa_2_06_part3.vgtest
+ test_isa_2_06_part3.stderr.exp test_isa_2_06_part3.stdout.exp test_isa_2_06_part3.vgtest \
+ test_dfp1.stderr.exp test_dfp1.stdout.exp test_dfp1.vgtest
check_PROGRAMS = \
allexec \
@@ -39,8 +40,10 @@
testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \
test_isa_2_06_part1 \
test_isa_2_06_part2 \
- test_isa_2_06_part3
+ test_isa_2_06_part3 \
+ test_dfp1
+
AM_CFLAGS += @FLAG_M32@
AM_CXXFLAGS += @FLAG_M32@
AM_CCASFLAGS += @FLAG_M32@
@@ -61,6 +64,14 @@
VSX_FLAG =
endif
+if HAS_DFP
+BUILD_FLAGS_DFP = -mhard-dfp -mcpu=power6
+DFP_FLAG = -DHAS_DFP
+else
+BUILD_FLAGS_DFP =
+DFP_FLAG =
+endif
+
jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \
@FLAG_M32@ $(ALTIVEC_FLAG)
@@ -76,3 +87,5 @@
test_isa_2_06_part3_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(VSX_FLAG) \
@FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
+test_dfp1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -lm -g -mregnames $(DFP_FLAG) \
+ @FLAG_M32@ $(BUILD_FLAGS_DFP)
Modified: trunk/configure.in (+31 -0)
===================================================================
--- trunk/configure.in 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/configure.in 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -1070,7 +1070,38 @@
AM_CONDITIONAL(HAS_VSX, test x$ac_have_vsx = xyes)
+AC_MSG_CHECKING([that assembler knows DFP])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ __asm__ __volatile__("dadd 1, 2, 3");
+]])], [
+ac_asm_have_dfp=yes
+AC_MSG_RESULT([yes])
+], [
+ac_asm_have_dfp=no
+AC_MSG_RESULT([no])
+])
+
+AC_MSG_CHECKING([that compiler knows -mhard-dfp switch])
+safe_CFLAGS=$CFLAGS
+CFLAGS="-mhard-dfp"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+]], [[
+ __asm__ __volatile__("dadd 1, 2, 3");
+]])], [
+ac_gcc_have_dfp=yes
+AC_MSG_RESULT([yes])
+], [
+ac_gcc_have_dfp=no
+AC_MSG_RESULT([no])
+])
+
+-----
+CFLAGS=$safe_CFLAGS
+
+AM_CONDITIONAL(HAS_DFP, test x$ac_asm_have_dfp = xyes -a x$ac_gcc_have_dfp = xyes)
+
# Check for pthread_create@GLIBC2.0
AC_MSG_CHECKING([for pthread_create@GLIBC2.0()])
Property changed: trunk/tests/check_dfp_cap (+0 -0)
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/tests/check_dfp_cap (+10 -0)
===================================================================
--- trunk/tests/check_dfp_cap 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/tests/check_dfp_cap 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# We use this script to check whether or not the processor supports Decimal Floating Point (DFP).
+
+LD_SHOW_AUXV=1 /bin/true | grep dfp > /dev/null 2>&1
+if [ "$?" -ne "0" ]; then
+ exit 1
+else
+ exit 0
+fi
Modified: trunk/memcheck/mc_translate.c (+15 -0)
===================================================================
--- trunk/memcheck/mc_translate.c 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/memcheck/mc_translate.c 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -370,8 +370,11 @@
case Ity_I64:
case Ity_I128: return ty;
case Ity_F32: return Ity_I32;
+ case Ity_D32: return Ity_I32;
case Ity_F64: return Ity_I64;
+ case Ity_D64: return Ity_I64;
case Ity_F128: return Ity_I128;
+ case Ity_D128: return Ity_I128;
case Ity_V128: return Ity_V128;
default: ppIRType(ty);
VG_(tool_panic)("memcheck:shadowTypeV");
@@ -439,6 +442,7 @@
TempKind k;
IRTemp t;
IRType tyE = typeOfIRExpr(mce->sb->tyenv, e);
+
tl_assert(tyE == ty); /* so 'ty' is redundant (!) */
switch (cat) {
case 'V': k = VSh; break;
@@ -2322,18 +2326,26 @@
tl_assert(sameKindedAtoms(atom3,vatom3));
switch (op) {
case Iop_AddF128:
+ case Iop_AddD128:
case Iop_SubF128:
+ case Iop_SubD128:
case Iop_MulF128:
+ case Iop_MulD128:
case Iop_DivF128:
+ case Iop_DivD128:
/* I32(rm) x F128 x F128 -> F128 */
return mkLazy3(mce, Ity_I128, vatom1, vatom2, vatom3);
case Iop_AddF64:
+ case Iop_AddD64:
case Iop_AddF64r32:
case Iop_SubF64:
+ case Iop_SubD64:
case Iop_SubF64r32:
case Iop_MulF64:
+ case Iop_MulD64:
case Iop_MulF64r32:
case Iop_DivF64:
+ case Iop_DivD64:
case Iop_DivF64r32:
case Iop_ScaleF64:
case Iop_Yl2xF64:
@@ -3060,6 +3072,7 @@
return mkLazy2(mce, Ity_I64, vatom1, vatom2);
case Iop_F64HLtoF128:
+ case Iop_D64HLtoD128:
return assignNew('V', mce, Ity_I128, binop(Iop_64HLto128, vatom1, vatom2));
case Iop_F64toI32U:
@@ -3349,8 +3362,10 @@
return assignNew('V', mce, Ity_V128, unop(op, vatom));
case Iop_F128HItoF64: /* F128 -> high half of F128 */
+ case Iop_D128HItoD64: /* D128 -> high half of D128 */
return assignNew('V', mce, Ity_I64, unop(Iop_128HIto64, vatom));
case Iop_F128LOtoF64: /* F128 -> low half of F128 */
+ case Iop_D128LOtoD64: /* D128 -> low half of D128 */
return assignNew('V', mce, Ity_I64, unop(Iop_128to64, vatom));
case Iop_NegF128:
Added: trunk/none/tests/ppc64/test_dfp1.vgtest (+2 -0)
===================================================================
--- trunk/none/tests/ppc64/test_dfp1.vgtest 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc64/test_dfp1.vgtest 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,2 @@
+prereq: ../../../tests/check_dfp_cap
+prog: test_dfp1
Added: trunk/none/tests/ppc64/test_dfp1.stderr.exp (+2 -0)
===================================================================
--- trunk/none/tests/ppc64/test_dfp1.stderr.exp 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc64/test_dfp1.stderr.exp 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/ppc32/test_dfp1.stderr.exp (+2 -0)
===================================================================
--- trunk/none/tests/ppc32/test_dfp1.stderr.exp 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc32/test_dfp1.stderr.exp 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,2 @@
+
+
Added: trunk/none/tests/ppc32/test_dfp1.vgtest (+2 -0)
===================================================================
--- trunk/none/tests/ppc32/test_dfp1.vgtest 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc32/test_dfp1.vgtest 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,2 @@
+prereq: ../../../tests/check_dfp_cap
+prog: test_dfp1
Added: trunk/none/tests/ppc32/test_dfp1.c (+504 -0)
===================================================================
--- trunk/none/tests/ppc32/test_dfp1.c 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc32/test_dfp1.c 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,504 @@
+/* Copyright (C) 2012 IBM
+
+ Author: Maynard Johnson <may...@us...>
+
+ 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
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#if defined(HAS_DFP)
+
+register double f14 __asm__ ("fr14");
+register double f15 __asm__ ("fr15");
+register double f16 __asm__ ("fr16");
+register double f17 __asm__ ("fr17");
+register double f18 __asm__ ("fr18");
+register double f19 __asm__ ("fr19");
+
+
+typedef unsigned char Bool;
+#define True 1
+#define False 0
+
+
+#define ALLCR "cr0","cr1","cr2","cr3","cr4","cr5","cr6","cr7"
+
+#define SET_CR(_arg) \
+ __asm__ __volatile__ ("mtcr %0" : : "b"(_arg) : ALLCR );
+
+#define SET_XER(_arg) \
+ __asm__ __volatile__ ("mtxer %0" : : "b"(_arg) : "xer" );
+
+#define GET_CR(_lval) \
+ __asm__ __volatile__ ("mfcr %0" : "=b"(_lval) )
+
+#define GET_XER(_lval) \
+ __asm__ __volatile__ ("mfxer %0" : "=b"(_lval) )
+
+#define GET_CR_XER(_lval_cr,_lval_xer) \
+ do { GET_CR(_lval_cr); GET_XER(_lval_xer); } while (0)
+
+#define SET_CR_ZERO \
+ SET_CR(0)
+
+#define SET_XER_ZERO \
+ SET_XER(0)
+
+#define SET_CR_XER_ZERO \
+ do { SET_CR_ZERO; SET_XER_ZERO; } while (0)
+
+#define SET_FPSCR_ZERO \
+ do { double _d = 0.0; \
+ __asm__ __volatile__ ("mtfsf 0xFF, %0" : : "f"(_d) ); \
+ } while (0)
+
+#define GET_FPSCR(_arg) \
+ __asm__ __volatile__ ("mffs %0" : "=f"(_arg) )
+
+#define SET_FPSCR_DRN \
+ __asm__ __volatile__ ("mtfsf 1, %0, 0, 1" : : "f"(f14) )
+
+
+// The assembly-level instructions being tested
+static Bool do_dot;
+static void _test_dadd (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("dadd. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("dadd %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_dsub (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("dsub. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("dsub %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_dmul (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("dmul. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("dmul %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_ddiv (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("ddiv. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("ddiv %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+// Quad DFP arith instructions
+static void _test_daddq (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("daddq. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("daddq %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_dsubq (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("dsubq. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("dsubq %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_dmulq (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("dmulq. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("dmulq %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_ddivq (void)
+{
+ if (do_dot)
+ __asm__ __volatile__ ("ddivq. %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+ else
+ __asm__ __volatile__ ("ddivq %0, %1, %2" : "=f" (f18) : "f" (f14),"f" (f16));
+}
+
+static void _test_mffs (void)
+{
+ __asm__ __volatile__ ("mffs %0" : "=f"(f14));
+}
+
+static void _test_mtfsf (int upper)
+{
+ if (upper)
+ __asm__ __volatile__ ("mtfsf 1, %0, 0, 1" : : "f"(f14) );
+ else
+ __asm__ __volatile__ ("mtfsf 1, %0, 0, 0" : : "f"(f14) );
+}
+
+typedef void (*test_func_t)(void);
+typedef struct test_table
+{
+ test_func_t test_category;
+ char * name;
+} test_table_t;
+
+/*
+ * 345.0DD (0x2207c00000000000 0xe50)
+ * 1.2300e+5DD (0x2207c00000000000 0x14c000)
+ * -16.0DD (0xa207c00000000000 0xe0)
+ * 0.00189DD (0x2206c00000000000 0xcf)
+ * -4.1235DD (0xa205c00000000000 0x10a395bcf)
+ * 9.8399e+20DD (0x2209400000000000 0x253f1f534acdd4)
+ * 0DD (0x2208000000000000 0x0)
+ * 0DD (0x2208000000000000 0x0)
+ * infDD (0x7800000000000000 0x0)
+ * nanDD (0x7c00000000000000 0x0
+ */
+static unsigned long long dfp128_vals[] = {
+ // Some finite numbers
+ 0x2207c00000000000ULL, 0x0000000000000e50ULL,
+ 0x2207c00000000000ULL, 0x000000000014c000ULL,
+ 0xa207c00000000000ULL, 0x00000000000000e0ULL,
+ 0x2206c00000000000ULL, 0x00000000000000cfULL,
+ 0xa205c00000000000ULL, 0x000000010a395bcfULL,
+ 0x6209400000fd0000ULL, 0x00253f1f534acdd4ULL, // huge number
+ 0x000400000089b000ULL, 0x0a6000d000000049ULL, // very small number
+ // flavors of zero
+ 0x2208000000000000ULL, 0x0000000000000000ULL,
+ 0xa208000000000000ULL, 0x0000000000000000ULL, // negative
+ 0xa248000000000000ULL, 0x0000000000000000ULL,
+ // flavors of NAN
+ 0x7c00000000000000ULL, 0x0000000000000000ULL, // quiet
+ 0xfc00000000000000ULL, 0xc00100035b007700ULL,
+ 0x7e00000000000000ULL, 0xfe000000d0e0a0d0ULL, // signaling
+ // flavors of Infinity
+ 0x7800000000000000ULL, 0x0000000000000000ULL,
+ 0xf800000000000000ULL, 0x0000000000000000ULL, // negative
+ 0xf900000000000000ULL, 0x0000000000000000ULL
+};
+
+static unsigned long long dfp64_vals[] = {
+ // various finite numbers
+ 0x2234000000000e50ULL,
+ 0x223400000014c000ULL,
+ 0xa2340000000000e0ULL,// negative
+ 0x22240000000000cfULL,
+ 0xa21400010a395bcfULL,// negative
+ 0x6e4d3f1f534acdd4ULL,// huge number
+ 0x000400000089b000ULL,// very small number
+ // flavors of zero
+ 0x2238000000000000ULL,
+ 0xa238000000000000ULL,
+ 0x4248000000000000ULL,
+ // flavors of NAN
+ 0x7e34000000000111ULL,
+ 0xfe000000d0e0a0d0ULL,//signaling
+ 0xfc00000000000000ULL,//quiet
+ // flavors of Infinity
+ 0x7800000000000000ULL,
+ 0xf800000000000000ULL,//negative
+ 0x7a34000000000000ULL,
+};
+
+
+typedef struct dfp_test_args {
+ int fra_idx;
+ int frb_idx;
+} dfp_test_args_t;
+
+
+// Index pairs from dfp64_vals or dfp128_vals array to be used with dfp_two_arg_tests
+static dfp_test_args_t dfp_2args_x2[] = {
+ {0, 1},
+ {2, 1},
+ {3, 4},
+ {0, 6},
+ {2, 4},
+ {5, 1},
+ {5, 2},
+ {7, 8},
+ {7, 1},
+ {9, 15},
+ {8, 12},
+ {7, 11},
+ {13, 2},
+ {13, 14},
+ {15, 12},
+ {14, 11},
+ {12, 12},
+ {12, 11},
+ {11, 11}
+};
+
+// Index pairs from dfp64_vals array to be used with dfp_two_arg_tests
+static dfp_test_args_t dfp_2args_x1[] = {
+ {0, 1},
+ {2, 1},
+ {3, 4},
+ {0, 6},
+ {2, 4},
+ {5, 1},
+ {5, 2},
+ {7, 1},
+ {7, 2},
+ {8, 0},
+ {8, 1},
+ {8, 2},
+ {7, 8},
+ {12, 14},
+ {12, 1},
+ {12, 13},
+ {12, 12},
+ {12, 11},
+ {11, 14},
+ {11, 0},
+ {11, 13},
+ {11, 11},
+ {14, 14},
+ {14, 3},
+ {14, 15},
+};
+
+typedef enum {
+ LONG_TEST,
+ QUAD_TEST
+} precision_type_t;
+
+typedef struct dfp_test
+{
+ test_func_t test_func;
+ const char * name;
+ dfp_test_args_t * targs;
+ int num_tests;
+ precision_type_t precision;
+ const char * op;
+ Bool cr_supported;
+} dfp_test_t;
+
+
+static dfp_test_t
+dfp_two_arg_tests[] = {
+ { &_test_dadd, "dadd", dfp_2args_x1, 25, LONG_TEST, "+", False},
+ { &_test_dsub, "dsub", dfp_2args_x1, 25, LONG_TEST, "-", False},
+ { &_test_dmul, "dmul", dfp_2args_x2, 19, LONG_TEST, "*", False},
+ { &_test_ddiv, "ddiv", dfp_2args_x2, 19, LONG_TEST, "/", False},
+ { &_test_daddq, "daddq", dfp_2args_x1, 25, QUAD_TEST, "+", False},
+ { &_test_dsubq, "dsubq", dfp_2args_x1, 25, QUAD_TEST, "-", False},
+ { &_test_dmulq, "dmulq", dfp_2args_x2, 19, QUAD_TEST, "*", False},
+ { &_test_ddivq, "ddivq", dfp_2args_x2, 19, QUAD_TEST, "/", False},
+ { NULL, NULL, NULL, 0, 0, NULL}
+};
+
+static void test_dfp_two_arg_ops(void)
+{
+ test_func_t func;
+ unsigned long long u0, u0x, u1, u1x;
+ double res, d0, d1, *d0p, *d1p;
+ double d0x, d1x, *d0xp, *d1xp;
+ int k = 0;
+ u0x = u1x = 0;
+ d0p = &d0;
+ d0xp = &d0x;
+ d1p = &d1;
+ d1xp = &d1x;
+
+ while ((func = dfp_two_arg_tests[k].test_func)) {
+ int i, repeat = 1;
+ dfp_test_t test_group = dfp_two_arg_tests[k];
+ do_dot = False;
+
+again:
+ for (i = 0; i < test_group.num_tests; i++) {
+ unsigned int condreg;
+ unsigned int flags;
+
+ if (test_group.precision == LONG_TEST) {
+ u0 = dfp64_vals[test_group.targs[i].fra_idx];
+ u1 = dfp64_vals[test_group.targs[i].frb_idx];
+ } else {
+ u0 = dfp128_vals[test_group.targs[i].fra_idx * 2];
+ u0x = dfp128_vals[(test_group.targs[i].fra_idx * 2) + 1];
+ u1 = dfp128_vals[test_group.targs[i].frb_idx * 2];
+ u1x = dfp128_vals[(test_group.targs[i].frb_idx * 2) + 1];
+ }
+ *(unsigned long long *)d0p = u0;
+ *(unsigned long long *)d1p = u1;
+ f14 = d0;
+ f16 = d1;
+ if (test_group.precision == QUAD_TEST) {
+ *(unsigned long long *)d0xp = u0x;
+ *(unsigned long long *)d1xp = u1x;
+ f15 = d0x;
+ f17 = d1x;
+ }
+
+ SET_FPSCR_ZERO;
+ SET_CR_XER_ZERO;
+ (*func)();
+ GET_CR(flags);
+ res = f18;
+
+ condreg = (flags & 0x000000f0) >> 4;
+ printf("%s%s %016llx", test_group.name, do_dot? "." : "", u0);
+ if (test_group.precision == LONG_TEST) {
+ printf(" %s %016llx => %016llx",
+ test_group.op, u1, *((unsigned long long *)(&res)));
+ } else {
+ double resx = f19;
+ printf(" %016llx %s %016llx %016llx ==> %016llx %016llx",
+ u0x, test_group.op, u1, u1x,
+ *((unsigned long long *)(&res)), *((unsigned long long *)(&resx)));
+ }
+ if (test_group.cr_supported)
+ printf(" (cr = %08x)\n", condreg);
+ else
+ printf("\n");
+
+ }
+ printf("\n");
+ if (repeat) {
+ repeat = 0;
+ do_dot = True;
+ goto again;
+ }
+ k++;
+ printf( "\n" );
+ }
+}
+
+void test_move_toFrom_fpscr(void)
+{
+#define BFP_MAX_RM 3
+ int shift = 0;
+ unsigned long long i, max_rm, expected_val;
+ double fpscr_in, fpscr_out;
+ unsigned long long * hex_fpscr_in = (unsigned long long *)&fpscr_in;
+ unsigned long long * hex_fpscr_out = (unsigned long long *)&fpscr_out;
+
+
+ max_rm = 4;
+again:
+ /* NOTE: The first time through this loop is for setting the binary
+ * floating point rounding mode (bits 62:63 of FPSCR). The second time
+ * through is for setting the decimal floating point rounding mode
+ * (bits 29:31 of FPSCR). In the second time through this loop, the value
+ * returned should include the final binary FP rounding mode, along with
+ * the decimal FP rounding modes.
+ */
+ for (i = 0; i < max_rm; i++) {
+ *hex_fpscr_in = (i << shift);
+ f14 = fpscr_in;
+ _test_mtfsf(max_rm/8);
+ *hex_fpscr_in = 0ULL;
+ f14= fpscr_in;
+ _test_mffs();
+ fpscr_out = f14;
+ if (max_rm == 4) {
+ *hex_fpscr_out &= (max_rm - 1) << shift;
+ expected_val = i << shift;
+ } else {
+ *hex_fpscr_out &= BFP_MAX_RM | ((max_rm - 1) << shift);
+ expected_val = (i << shift) | BFP_MAX_RM;
+ }
+
+ printf("FPSCR %s floating point rounding mode %016llx == %016llx? %s\n",
+ (max_rm == 8) ? "decimal" : "binary",
+ *hex_fpscr_out, expected_val,
+ (expected_val == *hex_fpscr_out) ? "yes" : "no");
+ }
+ if (max_rm == 4) {
+ max_rm = 8;
+ shift = 32;
+ goto again;
+ }
+}
+
+void test_rounding_modes(void)
+{
+ int j;
+ unsigned long long u0, u1, rm_idx;
+ double res, d0, d1, *d0p, *d1p, fpscr;
+ unsigned long long * hex_fpscr = (unsigned long long *)&fpscr;
+ u0 = 0x26cc3f1f534acdd4ULL;
+ u1 = 0x27feff197a42ba06ULL;
+ d0p = &d0;
+ d1p = &d1;
+
+ for (j = 0; j < 12; j++) {
+ for (rm_idx = 0; rm_idx < 8; rm_idx++) {
+ *hex_fpscr = 0ULL;
+ __asm__ __volatile__ ("mffs %0" : "=f"(f14));
+ fpscr = f14;
+ *hex_fpscr &= 0xFFFFFFF0FFFFFFFFULL;
+ *hex_fpscr |= (rm_idx << 32);
+ f14 = fpscr;
+ SET_FPSCR_DRN;
+ *(unsigned long long *)d0p = u0;
+ *(unsigned long long *)d1p = u1;
+ f14 = d0;
+ f16 = d1;
+ _test_dmul();
+ res = f18;
+ printf("test #%d: dmul with rounding mode %d: %016llx * %016llx => %016llx\n",
+ j, (int)rm_idx, u0, u1, *((unsigned long long *)(&res)));
+ printf("\n");
+ }
+ // Changing the least significant bit of one of the dmul arguments give us more
+ // opportunities for different rounding modes to yield different results which
+ // can then be validated.
+ u0++;
+ }
+}
+
+static test_table_t
+ all_tests[] =
+{
+ { &test_dfp_two_arg_ops,
+ "Test DFP arithmetic instructions"},
+ { &test_rounding_modes,
+ "Test DFP rounding modes"},
+ { &test_move_toFrom_fpscr,
+ "Test move to/from FPSCR"},
+ { NULL, NULL }
+};
+#endif // HAS_DFP
+
+int main() {
+#if defined(HAS_DFP)
+
+ test_table_t aTest;
+ test_func_t func;
+ int i = 0;
+
+ while ((func = all_tests[i].test_category)) {
+ aTest = all_tests[i];
+ printf( "%s\n", aTest.name );
+ (*func)();
+ i++;
+ }
+
+#endif // HAS_DFP
+ return 0;
+}
Added: trunk/none/tests/ppc64/test_dfp1.stdout.exp (+583 -0)
===================================================================
--- trunk/none/tests/ppc64/test_dfp1.stdout.exp 2012-04-01 16:06:57 +01:00 (rev 12475)
+++ trunk/none/tests/ppc64/test_dfp1.stdout.exp 2012-04-02 11:22:05 +01:00 (rev 12476)
@@ -0,0 +1,583 @@
+Test DFP arithmetic instructions
+dadd 2234000000000e50 + 223400000014c000 => 223400000014ce50
+dadd a2340000000000e0 + 223400000014c000 => 223400000014a44c
+dadd 22240000000000cf + a21400010a395bcf => a21400010a1b9bcf
+dadd 2234000000000e50 + 000400000089b000 => 2e06500000000000
+dadd a2340000000000e0 + a21400010a395bcf => a21400080a395bcf
+dadd 6e4d3f1f534acdd4 + 223400000014c000 => 6e4d3f1f534acdd5
+dadd 6e4d3f1f534acdd4 + a2340000000000e0 => 6e4d3f1f534acdd4
+dadd 2238000000000000 + 223400000014c000 => 223400000014c000
+dadd 2238000000000000 + a2340000000000e0 => a2340000000000e0
+dadd a238000000000000 + 2234000000000e50 => 2234000000000e50
+dadd a238000000000000 + 223400000014c000 => 223400000014c000
+dadd a238000000000000 + a2340000000000e0 => a2340000000000e0
+dadd 2238000000000000 + a238000000000000 => 2238000000000000
+dadd fc00000000000000 + f800000000000000 => fc00000000000000
+dadd fc00000000000000 + 223400000014c000 => fc00000000000000
+dadd fc00000000000000 + 7800000000000000 => fc00000000000000
+dadd fc00000000000000 + fc00000000000000 => fc00000000000000
+dadd fc00000000000000 + fe000000d0e0a0d0 => fc000000d0e0a0d0
+dadd fe000000d0e0a0d0 + f800000000000000 => fc000000d0e0a0d0
+dadd fe000000d0e0a0d0 + 2234000000000e50 => fc000000d0e0a0d0
+dadd fe000000d0e0a0d0 + 7800000000000000 => fc000000d0e0a0d0
+dadd fe000000d0e0a0d0 + fe000000d0e0a0d0 => fc000000d0e0a0d0
+dadd f800000000000000 + f800000000000000 => f800000000000000
+dadd f800000000000000 + 22240000000000cf => f800000000000000
+dadd f800000000000000 + 7a34000000000000 => 7c00000000000000
+
+dadd. 2234000000000e50 + 223400000014c000 => 223400000014ce50
+dadd. a2340000000000e0 + 223400000014c000 => 223400000014a44c
+dadd. 22240000000000cf + a21400010a395bcf => a21400010a1b9bcf
+dadd. 2234000000000e50 + 000400000089b000 => 2e06500000000000
+dadd. a2340000000000e0 + a21400010a395bcf => a21400080a395bcf
+dadd. 6e4d3f1f534acdd4 + 223400000014c000 => 6e4d3f1f534acdd5
+dadd. 6e4d3f1f534acdd4 + a2340000000000e0 => 6e4d3f1f534acdd4
+dadd. 2238000000000000 + 223400000014c000 => 223400000014c000
+dadd. 2238000000000000 + a2340000000000e0 => a2340000000000e0
+dadd. a238000000000000 + 2234000000000e50 => 2234000000000e50
+dadd. a238000000000000 + 223400000014c000 => 223400000014c000
+dadd. a238000000000000 + a2340000000000e0 => a2340000000000e0
+dadd. 2238000000000000 + a238000000000000 => 2238000000000000
+dadd. fc00000000000000 + f800000000000000 => fc00000000000000
+dadd. fc00000000000000 + 223400000014c000 => fc00000000000000
+dadd. fc00000000000000 + 7800000000000000 => fc00000000000000
+dadd. fc00000000000000 + fc00000000000000 => fc00000000000000
+dadd. fc00000000000000 + fe000000d0e0a0d0 => fc000000d0e0a0d0
+dadd. fe000000d0e0a0d0 + f800000000000000 => fc000000d0e0a0d0
+dadd. fe000000d0e0a0d0 + 2234000000000e50 => fc000000d0e0a0d0
+dadd. fe000000d0e0a0d0 + 7800000000000000 => fc000000d0e0a0d0
+dadd. fe000000d0e0a0d0 + fe000000d0e0a0d0 => fc000000d0e0a0d0
+dadd. f800000000000000 + f800000000000000 => f800000000000000
+dadd. f800000000000000 + 22240000000000cf => f800000000000000
+dadd. f800000000000000 + 7a34000000000000 => 7c00000000000000
+
+
+dsub 2234000000000e50 - 223400000014c000 => a234000000149ad0
+dsub a2340000000000e0 - 223400000014c000 => a23400000014c0e0
+dsub 22240000000000cf - a21400010a395bcf => 221400010a571bcf
+dsub 2234000000000e50 - 000400000089b000 => 2e06500000000000
+dsub a2340000000000e0 - a21400010a395bcf => a214000477cb0d11
+dsub 6e4d3f1f534acdd4 - 223400000014c000 => 6e4d3f1f534acdd3
+dsub 6e4d3f1f534acdd4 - a2340000000000e0 => 6e4d3f1f534acdd4
+dsub 2238000000000000 - 223400000014c000 => a23400000014c000
+dsub 2238000000000000 - a2340000000000e0 => 22340000000000e0
+dsub a238000000000000 - 2234000000000e50 => a234000000000e50
+dsub a238000000000000 - 223400000014c000 => a23400000014c000
+dsub a238000000000000 - a2340000000000e0 => 22340000000000e0
+dsub 2238000000000000 - a238000000000000 => 2238000000000000
+dsub fc00000000000000 - f800000000000000 => fc00000000000000
+dsub fc00000000000000 - 223400000014c000 => fc00000000000000
+dsub fc00000000000000 - 7800000000000000 => fc00000000000000
+dsub fc00000000000000 - fc00000000000000 => fc00000000000000
+dsub fc00000000000000 - fe000000d0e0a0d0 => fc000000d0e0a0d0
+dsub fe000000d0e0a0d0 - f800000000000000 => fc000000d0e0a0d0
+dsub fe000000d0e0a0d0 - 2234000000000e50 => fc000000d0e0a0d0
+dsub fe000000d0e0a0d0 - 7800000000000000 => fc000000d0e0a0d0
+dsub fe000000d0e0a0d0 - fe000000d0e0a0d0 => fc000000d0e0a0d0
+dsub f800000000000000 - f800000000000000 => 7c00000000000000
+dsub f800000000000000 - 22240000000000cf => f800000000000000
+dsub f800000000000000 - 7a34000000000000 => f800000000000000
+
+dsub. 2234000000000e50 - 223400000014c000 => a234000000149ad0
+dsub. a2340000000000e0 - 223400000014c000 => a23400000014c0e0
+dsub. 22240000000000cf - a21400010a395bcf => 221400010a571bcf
+dsub. 2234000000000e50 - 000400000089b000 => 2e06500000000000
+dsub. a2340000000000e0 - a21400010a395bcf => a214000477cb0d11
+dsub. 6e4d3f1f534acdd4 - 223400000014c000 => 6e4d3f1f534acdd3
+dsub. 6e4d3f1f534acdd4 - a2340000000000e0 => 6e4d3f1f534acdd4
+dsub. 2238000000000000 - 223400000014c000 => a23400000014c000
+dsub. 2238000000000000 - a2340000000000e0 => 22340000000000e0
+dsub. a238000000000000 - 2234000000000e50 => a234000000000e50
+dsub. a238000000000000 - 223400000014c000 => a23400000014c000
+dsub. a238000000000000 - a2340000000000e0 => 22340000000000e0
+dsub. 2238000000000000 - a238000000000000 => 2238000000000000
+dsub. fc00000000000000 - f800000000000000 => fc00000000000000
+dsub. fc00000000000000 - 223400000014c000 => fc00000000000000
+dsub. fc00000000000000 - 7800000000000000 => fc00000000000000
+dsub. fc00000000000000 - fc00000000000000 => fc00000000000000
+dsub. fc00000000000000 - fe000000d0e0a0d0 => fc000000d0e0a0d0
+dsub. fe000000d0e0a0d0 - f800000000000000 => fc000000d0e0a0d0
+dsub. fe000000d0e0a0d0 - 2234000000000e50 => fc000000d0e0a0d0
+dsub. fe000000d0e0a0d0 - 7800000000000000 => fc000000d0e0a0d0
+dsub. fe000000d0e0a0d0 - fe000000d0e0a0d0 => fc000000d0e0a0d0
+dsub. f800000000000000 - f800000000000000 => 7c00000000000000
+dsub. f800000000000000 - 22240000000000cf => f800000000000000
+dsub. f800000000000000 - 7a34000000000000 => f800000000000000
+
+
+dmul 2234000000000e50 * 223400000014c000 => 22300001143a0000
+dmul a2340000000000e0 * 223400000014c000 => a23000000fa03000
+dmul 22240000000000cf * a21400010a395bcf => a20000fe5b36cca1
+dmul 2234000000000e50 * 000400000089b000 => 0000000c28a03000
+dmul a2340000000000e0 * a21400010a395bcf => 221000d67d31a940
+dmul 6e4d3f1f534acdd4 * 223400000014c000 => 266510610e1d3703
+dmul 6e4d3f1f534acdd4 * a2340000000000e0 => a656f47e5fba95b7
+dmul 2238000000000000 * a238000000000000 => a238000000000000
+dmul 2238000000000000 * 223400000014c000 => 2234000000000000
+dmul 4248000000000000 * 7a34000000000000 => 7c00000000000000
+dmul a238000000000000 * fc00000000000000 => fc00000000000000
+dmul 2238000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul 7800000000000000 * a2340000000000e0 => f800000000000000
+dmul 7800000000000000 * f800000000000000 => f800000000000000
+dmul 7a34000000000000 * fc00000000000000 => fc00000000000000
+dmul f800000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul fc00000000000000 * fc00000000000000 => fc00000000000000
+dmul fc00000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul fe000000d0e0a0d0 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+
+dmul. 2234000000000e50 * 223400000014c000 => 22300001143a0000
+dmul. a2340000000000e0 * 223400000014c000 => a23000000fa03000
+dmul. 22240000000000cf * a21400010a395bcf => a20000fe5b36cca1
+dmul. 2234000000000e50 * 000400000089b000 => 0000000c28a03000
+dmul. a2340000000000e0 * a21400010a395bcf => 221000d67d31a940
+dmul. 6e4d3f1f534acdd4 * 223400000014c000 => 266510610e1d3703
+dmul. 6e4d3f1f534acdd4 * a2340000000000e0 => a656f47e5fba95b7
+dmul. 2238000000000000 * a238000000000000 => a238000000000000
+dmul. 2238000000000000 * 223400000014c000 => 2234000000000000
+dmul. 4248000000000000 * 7a34000000000000 => 7c00000000000000
+dmul. a238000000000000 * fc00000000000000 => fc00000000000000
+dmul. 2238000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul. 7800000000000000 * a2340000000000e0 => f800000000000000
+dmul. 7800000000000000 * f800000000000000 => f800000000000000
+dmul. 7a34000000000000 * fc00000000000000 => fc00000000000000
+dmul. f800000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul. fc00000000000000 * fc00000000000000 => fc00000000000000
+dmul. fc00000000000000 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+dmul. fe000000d0e0a0d0 * fe000000d0e0a0d0 => fc000000d0e0a0d0
+
+
+ddiv 2234000000000e50 / 223400000014c000 => 29f20ccf848e2a4e
+ddiv a2340000000000e0 / 223400000014c000 => a5ed80474082c00b
+ddiv 22240000000000cf / a21400010a395bcf => b1eeabacabd62ac3
+ddiv 2234000000000e50 / 000400000089b000 => 7800000000000000
+ddiv a2340000000000e0 / a21400010a395bcf => 2dfc0e4e6a205575
+ddiv 6e4d3f1f534acdd4 / 223400000014c000 => 3e38ff87d92ca3c3
+ddiv 6e4d3f1f534acdd4 / a2340000000000e0 => ba48c92fea1aadc6
+ddiv 2238000000000000 / a238000000000000 => 7c00000000000000
+ddiv 2238000000000000 / 223400000014c000 => 223c000000000000
+ddiv 4248000000000000 / 7a34000000000000 => 0000000000000000
+ddiv a238000000000000 / fc00000000000000 => fc00000000000000
+ddiv 2238000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv 7800000000000000 / a2340000000000e0 => f800000000000000
+ddiv 7800000000000000 / f800000000000000 => 7c00000000000000
+ddiv 7a34000000000000 / fc00000000000000 => fc00000000000000
+ddiv f800000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv fc00000000000000 / fc00000000000000 => fc00000000000000
+ddiv fc00000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv fe000000d0e0a0d0 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+
+ddiv. 2234000000000e50 / 223400000014c000 => 29f20ccf848e2a4e
+ddiv. a2340000000000e0 / 223400000014c000 => a5ed80474082c00b
+ddiv. 22240000000000cf / a21400010a395bcf => b1eeabacabd62ac3
+ddiv. 2234000000000e50 / 000400000089b000 => 7800000000000000
+ddiv. a2340000000000e0 / a21400010a395bcf => 2dfc0e4e6a205575
+ddiv. 6e4d3f1f534acdd4 / 223400000014c000 => 3e38ff87d92ca3c3
+ddiv. 6e4d3f1f534acdd4 / a2340000000000e0 => ba48c92fea1aadc6
+ddiv. 2238000000000000 / a238000000000000 => 7c00000000000000
+ddiv. 2238000000000000 / 223400000014c000 => 223c000000000000
+ddiv. 4248000000000000 / 7a34000000000000 => 0000000000000000
+ddiv. a238000000000000 / fc00000000000000 => fc00000000000000
+ddiv. 2238000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv. 7800000000000000 / a2340000000000e0 => f800000000000000
+ddiv. 7800000000000000 / f800000000000000 => 7c00000000000000
+ddiv. 7a34000000000000 / fc00000000000000 => fc00000000000000
+ddiv. f800000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv. fc00000000000000 / fc00000000000000 => fc00000000000000
+ddiv. fc00000000000000 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+ddiv. fe000000d0e0a0d0 / fe000000d0e0a0d0 => fc000000d0e0a0d0
+
+
+daddq 2207c00000000000 0000000000000e50 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014ce50
+daddq a207c00000000000 00000000000000e0 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014a44c
+daddq 2206c00000000000 00000000000000cf + a205c00000000000 000000010a395bcf ==> a205c00000000000 000000010a1b9bcf
+daddq 2207c00000000000 0000000000000e50 + 000400000089b000 0a6000d000000049 ==> 2e00650000000000 0000000000000000
+daddq a207c00000000000 00000000000000e0 + a205c00000000000 000000010a395bcf ==> a205c00000000000 000000080a395bcf
+daddq 6209400000fd0000 00253f1f534acdd4 + 2207c00000000000 000000000014c000 ==> 2601130000000000 0000000000000000
+daddq 6209400000fd0000 00253f1f534acdd4 + a207c00000000000 00000000000000e0 ==> a600300000000000 0000000000000000
+daddq 2208000000000000 0000000000000000 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014c000
+daddq 2208000000000000 0000000000000000 + a207c00000000000 00000000000000e0 ==> a207c00000000000 00000000000000e0
+daddq a208000000000000 0000000000000000 + 2207c00000000000 0000000000000e50 ==> 2207c00000000000 0000000000000e50
+daddq a208000000000000 0000000000000000 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014c000
+daddq a208000000000000 0000000000000000 + a207c00000000000 00000000000000e0 ==> a207c00000000000 00000000000000e0
+daddq 2208000000000000 0000000000000000 + a208000000000000 0000000000000000 ==> 2208000000000000 0000000000000000
+daddq 7e00000000000000 fe000000d0e0a0d0 + f800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq 7e00000000000000 fe000000d0e0a0d0 + 2207c00000000000 000000000014c000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq 7e00000000000000 fe000000d0e0a0d0 + 7800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq 7e00000000000000 fe000000d0e0a0d0 + 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq 7e00000000000000 fe000000d0e0a0d0 + fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq fc00000000000000 c00100035b007700 + f800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+daddq fc00000000000000 c00100035b007700 + 2207c00000000000 0000000000000e50 ==> fc00000000000000 c00100035b007700
+daddq fc00000000000000 c00100035b007700 + 7800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+daddq fc00000000000000 c00100035b007700 + fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+daddq f800000000000000 0000000000000000 + f800000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+daddq f800000000000000 0000000000000000 + 2206c00000000000 00000000000000cf ==> f800000000000000 0000000000000000
+daddq f800000000000000 0000000000000000 + f900000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+
+daddq. 2207c00000000000 0000000000000e50 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014ce50
+daddq. a207c00000000000 00000000000000e0 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014a44c
+daddq. 2206c00000000000 00000000000000cf + a205c00000000000 000000010a395bcf ==> a205c00000000000 000000010a1b9bcf
+daddq. 2207c00000000000 0000000000000e50 + 000400000089b000 0a6000d000000049 ==> 2e00650000000000 0000000000000000
+daddq. a207c00000000000 00000000000000e0 + a205c00000000000 000000010a395bcf ==> a205c00000000000 000000080a395bcf
+daddq. 6209400000fd0000 00253f1f534acdd4 + 2207c00000000000 000000000014c000 ==> 2601130000000000 0000000000000000
+daddq. 6209400000fd0000 00253f1f534acdd4 + a207c00000000000 00000000000000e0 ==> a600300000000000 0000000000000000
+daddq. 2208000000000000 0000000000000000 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014c000
+daddq. 2208000000000000 0000000000000000 + a207c00000000000 00000000000000e0 ==> a207c00000000000 00000000000000e0
+daddq. a208000000000000 0000000000000000 + 2207c00000000000 0000000000000e50 ==> 2207c00000000000 0000000000000e50
+daddq. a208000000000000 0000000000000000 + 2207c00000000000 000000000014c000 ==> 2207c00000000000 000000000014c000
+daddq. a208000000000000 0000000000000000 + a207c00000000000 00000000000000e0 ==> a207c00000000000 00000000000000e0
+daddq. 2208000000000000 0000000000000000 + a208000000000000 0000000000000000 ==> 2208000000000000 0000000000000000
+daddq. 7e00000000000000 fe000000d0e0a0d0 + f800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq. 7e00000000000000 fe000000d0e0a0d0 + 2207c00000000000 000000000014c000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq. 7e00000000000000 fe000000d0e0a0d0 + 7800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq. 7e00000000000000 fe000000d0e0a0d0 + 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq. 7e00000000000000 fe000000d0e0a0d0 + fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+daddq. fc00000000000000 c00100035b007700 + f800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+daddq. fc00000000000000 c00100035b007700 + 2207c00000000000 0000000000000e50 ==> fc00000000000000 c00100035b007700
+daddq. fc00000000000000 c00100035b007700 + 7800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+daddq. fc00000000000000 c00100035b007700 + fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+daddq. f800000000000000 0000000000000000 + f800000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+daddq. f800000000000000 0000000000000000 + 2206c00000000000 00000000000000cf ==> f800000000000000 0000000000000000
+daddq. f800000000000000 0000000000000000 + f900000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+
+
+dsubq 2207c00000000000 0000000000000e50 - 2207c00000000000 000000000014c000 ==> a207c00000000000 0000000000149ad0
+dsubq a207c00000000000 00000000000000e0 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c0e0
+dsubq 2206c00000000000 00000000000000cf - a205c00000000000 000000010a395bcf ==> 2205c00000000000 000000010a571bcf
+dsubq 2207c00000000000 0000000000000e50 - 000400000089b000 0a6000d000000049 ==> 2e00650000000000 0000000000000000
+dsubq a207c00000000000 00000000000000e0 - a205c00000000000 000000010a395bcf ==> a205c00000000000 0000000477cb0d11
+dsubq 6209400000fd0000 00253f1f534acdd4 - 2207c00000000000 000000000014c000 ==> a601130000000000 0000000000000000
+dsubq 6209400000fd0000 00253f1f534acdd4 - a207c00000000000 00000000000000e0 ==> 2600300000000000 0000000000000000
+dsubq 2208000000000000 0000000000000000 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c000
+dsubq 2208000000000000 0000000000000000 - a207c00000000000 00000000000000e0 ==> 2207c00000000000 00000000000000e0
+dsubq a208000000000000 0000000000000000 - 2207c00000000000 0000000000000e50 ==> a207c00000000000 0000000000000e50
+dsubq a208000000000000 0000000000000000 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c000
+dsubq a208000000000000 0000000000000000 - a207c00000000000 00000000000000e0 ==> 2207c00000000000 00000000000000e0
+dsubq 2208000000000000 0000000000000000 - a208000000000000 0000000000000000 ==> 2208000000000000 0000000000000000
+dsubq 7e00000000000000 fe000000d0e0a0d0 - f800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq 7e00000000000000 fe000000d0e0a0d0 - 2207c00000000000 000000000014c000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq 7e00000000000000 fe000000d0e0a0d0 - 7800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq 7e00000000000000 fe000000d0e0a0d0 - 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq 7e00000000000000 fe000000d0e0a0d0 - fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq fc00000000000000 c00100035b007700 - f800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+dsubq fc00000000000000 c00100035b007700 - 2207c00000000000 0000000000000e50 ==> fc00000000000000 c00100035b007700
+dsubq fc00000000000000 c00100035b007700 - 7800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+dsubq fc00000000000000 c00100035b007700 - fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dsubq f800000000000000 0000000000000000 - f800000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+dsubq f800000000000000 0000000000000000 - 2206c00000000000 00000000000000cf ==> f800000000000000 0000000000000000
+dsubq f800000000000000 0000000000000000 - f900000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+
+dsubq. 2207c00000000000 0000000000000e50 - 2207c00000000000 000000000014c000 ==> a207c00000000000 0000000000149ad0
+dsubq. a207c00000000000 00000000000000e0 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c0e0
+dsubq. 2206c00000000000 00000000000000cf - a205c00000000000 000000010a395bcf ==> 2205c00000000000 000000010a571bcf
+dsubq. 2207c00000000000 0000000000000e50 - 000400000089b000 0a6000d000000049 ==> 2e00650000000000 0000000000000000
+dsubq. a207c00000000000 00000000000000e0 - a205c00000000000 000000010a395bcf ==> a205c00000000000 0000000477cb0d11
+dsubq. 6209400000fd0000 00253f1f534acdd4 - 2207c00000000000 000000000014c000 ==> a601130000000000 0000000000000000
+dsubq. 6209400000fd0000 00253f1f534acdd4 - a207c00000000000 00000000000000e0 ==> 2600300000000000 0000000000000000
+dsubq. 2208000000000000 0000000000000000 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c000
+dsubq. 2208000000000000 0000000000000000 - a207c00000000000 00000000000000e0 ==> 2207c00000000000 00000000000000e0
+dsubq. a208000000000000 0000000000000000 - 2207c00000000000 0000000000000e50 ==> a207c00000000000 0000000000000e50
+dsubq. a208000000000000 0000000000000000 - 2207c00000000000 000000000014c000 ==> a207c00000000000 000000000014c000
+dsubq. a208000000000000 0000000000000000 - a207c00000000000 00000000000000e0 ==> 2207c00000000000 00000000000000e0
+dsubq. 2208000000000000 0000000000000000 - a208000000000000 0000000000000000 ==> 2208000000000000 0000000000000000
+dsubq. 7e00000000000000 fe000000d0e0a0d0 - f800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq. 7e00000000000000 fe000000d0e0a0d0 - 2207c00000000000 000000000014c000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq. 7e00000000000000 fe000000d0e0a0d0 - 7800000000000000 0000000000000000 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq. 7e00000000000000 fe000000d0e0a0d0 - 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq. 7e00000000000000 fe000000d0e0a0d0 - fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+dsubq. fc00000000000000 c00100035b007700 - f800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+dsubq. fc00000000000000 c00100035b007700 - 2207c00000000000 0000000000000e50 ==> fc00000000000000 c00100035b007700
+dsubq. fc00000000000000 c00100035b007700 - 7800000000000000 0000000000000000 ==> fc00000000000000 c00100035b007700
+dsubq. fc00000000000000 c00100035b007700 - fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dsubq. f800000000000000 0000000000000000 - f800000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+dsubq. f800000000000000 0000000000000000 - 2206c00000000000 00000000000000cf ==> f800000000000000 0000000000000000
+dsubq. f800000000000000 0000000000000000 - f900000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+
+
+dmulq 2207c00000000000 0000000000000e50 * 2207c00000000000 000000000014c000 ==> 2207800000000000 00000001143a0000
+dmulq a207c00000000000 00000000000000e0 * 2207c00000000000 000000000014c000 ==> a207800000000000 000000000fa03000
+dmulq 2206c00000000000 00000000000000cf * a205c00000000000 000000010a395bcf ==> a204800000000000 000000fe5b36cca1
+dmulq 2207c00000000000 0000000000000e50 * 000400000089b000 0a6000d000000049 ==> 0003c007dd9d007e b20908000003a450
+dmulq a207c00000000000 00000000000000e0 * a205c00000000000 000000010a395bcf ==> 2205800000000000 000000d67d31a940
+dmulq 6209400000fd0000 00253f1f534acdd4 * 2207c00000000000 000000000014c000 ==> 660a84c004da6c00 004883107189d825
+dmulq 6209400000fd0000 00253f1f534acdd4 * a207c00000000000 00000000000000e0 ==> 8609d0a000d57800 0006f47e5fba95b7
+dmulq 2208000000000000 0000000000000000 * a208000000000000 0000000000000000 ==> a208000000000000 0000000000000000
+dmulq 2208000000000000 0000000000000000 * 2207c00000000000 000000000014c000 ==> 2207c00000000000 0000000000000000
+dmulq a248000000000000 0000000000000000 * f900000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+dmulq a208000000000000 0000000000000000 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq 2208000000000000 0000000000000000 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dmulq 7800000000000000 0000000000000000 * a207c00000000000 00000000000000e0 ==> f800000000000000 0000000000000000
+dmulq 7800000000000000 0000000000000000 * f800000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+dmulq f900000000000000 0000000000000000 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq f800000000000000 0000000000000000 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dmulq 7e00000000000000 fe000000d0e0a0d0 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq 7e00000000000000 fe000000d0e0a0d0 * fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq fc00000000000000 c00100035b007700 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+
+dmulq. 2207c00000000000 0000000000000e50 * 2207c00000000000 000000000014c000 ==> 2207800000000000 00000001143a0000
+dmulq. a207c00000000000 00000000000000e0 * 2207c00000000000 000000000014c000 ==> a207800000000000 000000000fa03000
+dmulq. 2206c00000000000 00000000000000cf * a205c00000000000 000000010a395bcf ==> a204800000000000 000000fe5b36cca1
+dmulq. 2207c00000000000 0000000000000e50 * 000400000089b000 0a6000d000000049 ==> 0003c007dd9d007e b20908000003a450
+dmulq. a207c00000000000 00000000000000e0 * a205c00000000000 000000010a395bcf ==> 2205800000000000 000000d67d31a940
+dmulq. 6209400000fd0000 00253f1f534acdd4 * 2207c00000000000 000000000014c000 ==> 660a84c004da6c00 004883107189d825
+dmulq. 6209400000fd0000 00253f1f534acdd4 * a207c00000000000 00000000000000e0 ==> 8609d0a000d57800 0006f47e5fba95b7
+dmulq. 2208000000000000 0000000000000000 * a208000000000000 0000000000000000 ==> a208000000000000 0000000000000000
+dmulq. 2208000000000000 0000000000000000 * 2207c00000000000 000000000014c000 ==> 2207c00000000000 0000000000000000
+dmulq. a248000000000000 0000000000000000 * f900000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+dmulq. a208000000000000 0000000000000000 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq. 2208000000000000 0000000000000000 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dmulq. 7800000000000000 0000000000000000 * a207c00000000000 00000000000000e0 ==> f800000000000000 0000000000000000
+dmulq. 7800000000000000 0000000000000000 * f800000000000000 0000000000000000 ==> f800000000000000 0000000000000000
+dmulq. f900000000000000 0000000000000000 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq. f800000000000000 0000000000000000 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+dmulq. 7e00000000000000 fe000000d0e0a0d0 * 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq. 7e00000000000000 fe000000d0e0a0d0 * fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+dmulq. fc00000000000000 c00100035b007700 * fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+
+
+ddivq 2207c00000000000 0000000000000e50 / 2207c00000000000 000000000014c000 ==> 29ff20ccf848e2a6 b8333e1238a9ae0d
+ddivq a207c00000000000 00000000000000e0 / 2207c00000000000 000000000014c000 ==> a5fed80474082c00 b6011d020b002d81
+ddivq 2206c00000000000 00000000000000cf / a205c00000000000 000000010a395bcf ==> b1feeabacabd62ac 3812c9f3bf11f97a
+ddivq 2207c00000000000 0000000000000e50 / 000400000089b000 0a6000d000000049 ==> 4ffdcc9ad201f5f8 691a4dc710e32c5a
+ddivq a207c00000000000 00000000000000e0 / a205c00000000000 000000010a395bcf ==> 2dffc0e4e6a20557 44fc3ca241351d34
+ddivq 6209400000fd0000 00253f1f534acdd4 / 2207c00000000000 000000000014c000 ==> 1a082841943c02d8 00b408095bb6bed6
+ddivq 6209400000fd0000 00253f1f534acdd4 / a207c00000000000 00000000000000e0 ==> 9609000003069f40 0018c92fea1aadc6
+ddivq 2208000000000000 0000000000000000 / a208000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+ddivq 2208000000000000 0000000000000000 / 2207c00000000000 000000000014c000 ==> 2208400000000000 0000000000000000
+ddivq a248000000000000 0000000000000000 / f900000000000000 0000000000000000 ==> 0000000000000000 0000000000000000
+ddivq a208000000000000 0000000000000000 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq 2208000000000000 0000000000000000 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+ddivq 7800000000000000 0000000000000000 / a207c00000000000 00000000000000e0 ==> f800000000000000 0000000000000000
+ddivq 7800000000000000 0000000000000000 / f800000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+ddivq f900000000000000 0000000000000000 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq f800000000000000 0000000000000000 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+ddivq 7e00000000000000 fe000000d0e0a0d0 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq 7e00000000000000 fe000000d0e0a0d0 / fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq fc00000000000000 c00100035b007700 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+
+ddivq. 2207c00000000000 0000000000000e50 / 2207c00000000000 000000000014c000 ==> 29ff20ccf848e2a6 b8333e1238a9ae0d
+ddivq. a207c00000000000 00000000000000e0 / 2207c00000000000 000000000014c000 ==> a5fed80474082c00 b6011d020b002d81
+ddivq. 2206c00000000000 00000000000000cf / a205c00000000000 000000010a395bcf ==> b1feeabacabd62ac 3812c9f3bf11f97a
+ddivq. 2207c00000000000 0000000000000e50 / 000400000089b000 0a6000d000000049 ==> 4ffdcc9ad201f5f8 691a4dc710e32c5a
+ddivq. a207c00000000000 00000000000000e0 / a205c00000000000 000000010a395bcf ==> 2dffc0e4e6a20557 44fc3ca241351d34
+ddivq. 6209400000fd0000 00253f1f534acdd4 / 2207c00000000000 000000000014c000 ==> 1a082841943c02d8 00b408095bb6bed6
+ddivq. 6209400000fd0000 00253f1f534acdd4 / a207c00000000000 00000000000000e0 ==> 9609000003069f40 0018c92fea1aadc6
+ddivq. 2208000000000000 0000000000000000 / a208000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+ddivq. 2208000000000000 0000000000000000 / 2207c00000000000 000000000014c000 ==> 2208400000000000 0000000000000000
+ddivq. a248000000000000 0000000000000000 / f900000000000000 0000000000000000 ==> 0000000000000000 0000000000000000
+ddivq. a208000000000000 0000000000000000 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq. 2208000000000000 0000000000000000 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+ddivq. 7800000000000000 0000000000000000 / a207c00000000000 00000000000000e0 ==> f800000000000000 0000000000000000
+ddivq. 7800000000000000 0000000000000000 / f800000000000000 0000000000000000 ==> 7c00000000000000 0000000000000000
+ddivq. f900000000000000 0000000000000000 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq. f800000000000000 0000000000000000 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+ddivq. 7e00000000000000 fe000000d0e0a0d0 / 7e00000000000000 fe000000d0e0a0d0 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq. 7e00000000000000 fe000000d0e0a0d0 / fc00000000000000 c00100035b007700 ==> 7c00000000000000 fe000000d0e0a0d0
+ddivq. fc00000000000000 c00100035b007700 / fc00000000000000 c00100035b007700 ==> fc00000000000000 c00100035b007700
+
+
+Test DFP rounding modes
+test #0: dmul with rounding mode 0: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f5
+
+test #0: dmul with rounding mode 1: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f5
+
+test #0: dmul with rounding mode 2: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f6
+
+test #0: dmul with rounding mode 3: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f5
+
+test #0: dmul with rounding mode 4: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f5
+
+test #0: dmul with rounding mode 5: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f5
+
+test #0: dmul with rounding mode 6: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f6
+
+test #0: dmul with rounding mode 7: 26cc3f1f534acdd4 * 27feff197a42ba06 => 4ccf3810908e09f6
+
+test #1: dmul with rounding mode 0: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #1: dmul with rounding mode 1: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #1: dmul with rounding mode 2: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f8
+
+test #1: dmul with rounding mode 3: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #1: dmul with rounding mode 4: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #1: dmul with rounding mode 5: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #1: dmul with rounding mode 6: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f8
+
+test #1: dmul with rounding mode 7: 26cc3f1f534acdd5 * 27feff197a42ba06 => 4ccf3810908e09f7
+
+test #2: dmul with rounding mode 0: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #2: dmul with rounding mode 1: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #2: dmul with rounding mode 2: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e098a
+
+test #2: dmul with rounding mode 3: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #2: dmul with rounding mode 4: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #2: dmul with rounding mode 5: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #2: dmul with rounding mode 6: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e098a
+
+test #2: dmul with rounding mode 7: 26cc3f1f534acdd6 * 27feff197a42ba06 => 4ccf3810908e09f9
+
+test #3: dmul with rounding mode 0: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #3: dmul with rounding mode 1: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #3: dmul with rounding mode 2: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e09aa
+
+test #3: dmul with rounding mode 3: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #3: dmul with rounding mode 4: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #3: dmul with rounding mode 5: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #3: dmul with rounding mode 6: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e09aa
+
+test #3: dmul with rounding mode 7: 26cc3f1f534acdd7 * 27feff197a42ba06 => 4ccf3810908e098b
+
+test #4: dmul with rounding mode 0: 26cc3f1f534acdd8 * 27feff197a42ba06 => 4ccf3810908e09ab
+
+test #4: dmul with rounding mode 1: 26cc3f1f534acdd8 * 27feff197a42ba06 => 4ccf3810908e09ab
+
+test #4: dmul with rou...
[truncated message content] |
|
From: <sv...@va...> - 2012-04-02 10:21:01
|
sewardj 2012-04-02 11:20:48 +0100 (Mon, 02 Apr 2012)
New Revision: 2270
Log:
Initial support for POWER Processor decimal floating point instruction
support -- VEX side changes. See #295221.
This patch adds the DFP 64-bit and 128-bit support, support for the
new IEEE rounding modes and the Add, Subtract, Multiply and Divide
instructions for both 64-bit and 128-bit instructions to Valgrind.
Carl Love (ca...@us...) and Maynard Johnson (may...@us...)
Modified files:
trunk/priv/guest_ppc_helpers.c
trunk/priv/guest_ppc_toIR.c
trunk/priv/host_ppc_defs.c
trunk/priv/host_ppc_defs.h
trunk/priv/host_ppc_isel.c
trunk/priv/ir_defs.c
trunk/priv/ir_opt.c
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_ir.h
Modified: trunk/priv/guest_ppc_toIR.c (+328 -51)
===================================================================
--- trunk/priv/guest_ppc_toIR.c 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/guest_ppc_toIR.c 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -222,6 +222,7 @@
#define OFFB_XER_CA offsetofPPCGuestState(guest_XER_CA)
#define OFFB_XER_BC offsetofPPCGuestState(guest_XER_BC)
#define OFFB_FPROUND offsetofPPCGuestState(guest_FPROUND)
+#define OFFB_DFPROUND offsetofPPCGuestState(guest_DFPROUND)
#define OFFB_VRSAVE offsetofPPCGuestState(guest_VRSAVE)
#define OFFB_VSCR offsetofPPCGuestState(guest_VSCR)
#define OFFB_EMWARN offsetofPPCGuestState(guest_EMWARN)
@@ -373,8 +374,8 @@
PPC_GST_MAX
} PPC_GST;
-#define MASK_FPSCR_RN 0x3
-#define MASK_FPSCR_FPRF 0x1F000
+#define MASK_FPSCR_RN 0x3ULL // Binary floating point rounding mode
+#define MASK_FPSCR_DRN 0x700000000ULL // Decimal floating point rounding mode
#define MASK_VSCR_VALID 0x00010001
@@ -415,7 +416,6 @@
return mask;
}
-/* ditto for 64bit mask */
static ULong MASK64( UInt begin, UInt end )
{
ULong m1, m2, mask;
@@ -1114,6 +1114,45 @@
stmt( IRStmt_Put(floatGuestRegOffset(archreg), e) );
}
+/* get Decimal float value. Note, they share floating point register file. */
+static IRExpr* getDReg(UInt archreg) {
+ IRExpr *e;
+ vassert( archreg < 32 );
+ e = IRExpr_Get( floatGuestRegOffset( archreg ), Ity_D64 );
+ return e;
+}
+
+/* Read a floating point register pair and combine their contents into a
+ 128-bit value */
+static IRExpr *getDReg_pair(UInt archreg) {
+ IRExpr *high = getDReg( archreg );
+ IRExpr *low = getDReg( archreg + 1 );
+
+ return binop( Iop_D64HLtoD128, high, low );
+}
+
+/* Ditto, but write to a reg instead. */
+static void putDReg(UInt archreg, IRExpr* e) {
+ vassert( archreg < 32 );
+ vassert( typeOfIRExpr(irsb->tyenv, e) == Ity_D64 );
+ stmt( IRStmt_Put( floatGuestRegOffset( archreg ), e ) );
+}
+
+/* Write a 128-bit floating point value into a register pair. */
+static void putDReg_pair(UInt archreg, IRExpr *e) {
+ IRTemp low = newTemp( Ity_D64 );
+ IRTemp high = newTemp( Ity_D64 );
+
+ vassert( archreg < 32 );
+ vassert( typeOfIRExpr(irsb->tyenv, e) == Ity_D128 );
+
+ assign( low, unop( Iop_D128LOtoD64, e ) );
+ assign( high, unop( Iop_D128HItoD64, e ) );
+
+ stmt( IRStmt_Put( floatGuestRegOffset( archreg ), mkexpr( high ) ) );
+ stmt( IRStmt_Put( floatGuestRegOffset( archreg + 1 ), mkexpr( low ) ) );
+}
+
static Int vsxGuestRegOffset ( UInt archreg )
{
vassert(archreg < 64);
@@ -2464,10 +2503,12 @@
all exceptions masked, round-to-nearest.
This corresponds to a FPSCR value of 0x0. */
- /* We're only keeping track of the rounding mode,
- so if the mask isn't asking for this, just return 0x0 */
- if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) {
- assign( val, IRExpr_Get( OFFB_FPROUND, Ity_I32 ) );
+ /* In the lower 32 bits of FPSCR, we're only keeping track of
+ * the binary floating point rounding mode, so if the mask isn't
+ * asking for this, just return 0x0.
+ */
+ if (mask & MASK_FPSCR_RN) {
+ assign( val, unop( Iop_8Uto32, IRExpr_Get( OFFB_FPROUND, Ity_I8 ) ) );
} else {
assign( val, mkU32(0x0) );
}
@@ -2486,6 +2527,36 @@
}
}
+/* Get a masked word from the given reg */
+static IRExpr* /* ::Ity_I32 */getGST_masked_upper(PPC_GST reg, ULong mask) {
+ IRExpr * val;
+ vassert( reg < PPC_GST_MAX );
+
+ switch (reg) {
+
+ case PPC_GST_FPSCR: {
+ /* In the upper 32 bits of FPSCR, we're only keeping track
+ * of the decimal floating point rounding mode, so if the mask
+ * isn't asking for this, just return 0x0.
+ */
+ if (mask & MASK_FPSCR_DRN) {
+ val = binop( Iop_And32,
+ unop( Iop_8Uto32, IRExpr_Get( OFFB_DFPROUND, Ity_I8 ) ),
+ unop( Iop_64HIto32, mkU64( mask ) ) );
+ } else {
+ val = mkU32( 0x0ULL );
+ }
+ break;
+ }
+
+ default:
+ vex_printf( "getGST_masked_upper(ppc): reg = %u", reg );
+ vpanic( "getGST_masked_upper(ppc)" );
+ }
+ return val;
+}
+
+
/* Fetch the specified REG[FLD] nibble (as per IBM/hardware notation)
and return it at the bottom of an I32; the top 27 bits are
guaranteed to be zero. */
@@ -2581,32 +2652,30 @@
}
/* Write masked src to the given reg */
-static void putGST_masked ( PPC_GST reg, IRExpr* src, UInt mask )
+static void putGST_masked ( PPC_GST reg, IRExpr* src, ULong mask )
{
IRType ty = mode64 ? Ity_I64 : Ity_I32;
vassert( reg < PPC_GST_MAX );
- vassert( typeOfIRExpr(irsb->tyenv,src ) == Ity_I32 );
-
+ vassert( typeOfIRExpr( irsb->tyenv,src ) == Ity_I64 );
+
switch (reg) {
case PPC_GST_FPSCR: {
- /* Allow writes to Rounding Mode */
- if (mask & (MASK_FPSCR_RN|MASK_FPSCR_FPRF)) {
- /* construct new fpround from new and old values as per mask:
- new fpround = (src & (3 & mask)) | (fpround & (3 & ~mask)) */
- stmt(
- IRStmt_Put(
- OFFB_FPROUND,
- binop(
- Iop_Or32,
- binop(Iop_And32, src, mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & mask)),
- binop(
- Iop_And32,
- IRExpr_Get(OFFB_FPROUND,Ity_I32),
- mkU32((MASK_FPSCR_RN|MASK_FPSCR_FPRF) & ~mask)
- )
- )
- )
- );
+ /* Allow writes to either binary or decimal floating point
+ * Rounding Mode
+ */
+ if (mask & MASK_FPSCR_RN) {
+ stmt( IRStmt_Put( OFFB_FPROUND,
+ unop( Iop_32to8,
+ binop( Iop_And32,
+ unop( Iop_64to32, src ),
+ mkU32( MASK_FPSCR_RN & mask ) ) ) ) );
+ } else if (mask & MASK_FPSCR_DRN) {
+ stmt( IRStmt_Put( OFFB_DFPROUND,
+ unop( Iop_32to8,
+ binop( Iop_And32,
+ unop( Iop_64HIto32, src ),
+ mkU32( ( MASK_FPSCR_DRN & mask )
+ >> 32 ) ) ) ) );
}
/* Give EmWarn for attempted writes to:
@@ -2641,13 +2710,17 @@
REG[FLD] (as per IBM/hardware notation). */
static void putGST_field ( PPC_GST reg, IRExpr* src, UInt fld )
{
- UInt shft, mask;
+ UInt shft;
+ ULong mask;
vassert( typeOfIRExpr(irsb->tyenv,src ) == Ity_I32 );
- vassert( fld < 8 );
+ vassert( fld < 16 );
vassert( reg < PPC_GST_MAX );
- shft = 4*(7-fld);
+ if (fld < 8)
+ shft = 4*(7-fld);
+ else
+ shft = 4*(15-fld);
mask = 0xF<<shft;
switch (reg) {
@@ -2657,12 +2730,16 @@
break;
default:
- if (shft == 0) {
- putGST_masked( reg, src, mask );
- } else {
- putGST_masked( reg,
- binop(Iop_Shl32, src, mkU8(toUChar(shft))),
- mask );
+ {
+ IRExpr * src64 = unop( Iop_32Uto64, src );
+
+ if (shft == 0) {
+ putGST_masked( reg, src64, mask );
+ } else {
+ putGST_masked( reg,
+ binop( Iop_Shl64, src64, mkU8( toUChar( shft ) ) ),
+ mask );
+ }
}
}
}
@@ -6689,7 +6766,34 @@
mkU32(2) ));
}
+/* The DFP IR rounding modes were chosen such that the existing PPC to IR
+ * mapping would still work with the extended three bit DFP rounding
+ * mode designator.
+ * rounding mode | PPC | IR
+ * -----------------------------------------------
+ * to nearest, ties to even | 000 | 000
+ * to zero | 001 | 011
+ * to +infinity | 010 | 010
+ * to -infinity | 011 | 001
+ * to nearest, ties away from 0 | 100 | 100
+ * to nearest, ties toward 0 | 101 | 111
+ * to away from 0 | 110 | 110
+ * to prepare for shorter precision | 111 | 101
+ */
+static IRExpr* /* :: Ity_I32 */ get_IR_roundingmode_DFP( void )
+{
+ IRTemp rm_PPC32 = newTemp( Ity_I32 );
+ assign( rm_PPC32, getGST_masked_upper( PPC_GST_FPSCR, MASK_FPSCR_DRN ) );
+
+ // rm_IR = XOR( rm_PPC32, (rm_PPC32 << 1) & 2)
+ return binop( Iop_Xor32,
+ mkexpr( rm_PPC32 ),
+ binop( Iop_And32,
+ binop( Iop_Shl32, mkexpr( rm_PPC32 ), mkU8( 1 ) ),
+ mkU32( 2 ) ) );
+}
+
/*------------------------------------------------------------*/
/*--- Floating Point Instruction Translation ---*/
/*------------------------------------------------------------*/
@@ -8224,7 +8328,7 @@
/*
Floating Point Status/Control Register Instructions
*/
-static Bool dis_fp_scr ( UInt theInstr )
+static Bool dis_fp_scr ( UInt theInstr, Bool GX_level )
{
/* Many forms - see each switch case */
UChar opc1 = ifieldOPC(theInstr);
@@ -8247,7 +8351,8 @@
return False;
}
DIP("mtfsb1%s crb%d \n", flag_rC ? ".":"", crbD);
- putGST_masked( PPC_GST_FPSCR, mkU32(1<<(31-crbD)), 1<<(31-crbD) );
+ putGST_masked( PPC_GST_FPSCR, mkU64( 1 <<( 31 - crbD ) ),
+ 1ULL << ( 31 - crbD ) );
break;
}
@@ -8283,29 +8388,41 @@
return False;
}
DIP("mtfsb0%s crb%d\n", flag_rC ? ".":"", crbD);
- putGST_masked( PPC_GST_FPSCR, mkU32(0), 1<<(31-crbD) );
+ putGST_masked( PPC_GST_FPSCR, mkU64( 0 ), 1ULL << ( 31 - crbD ) );
break;
}
case 0x086: { // mtfsfi (Move to FPSCR Field Immediate, PPC32 p481)
- UChar crfD = toUChar( IFIELD( theInstr, 23, 3 ) );
+ UInt crfD = IFIELD( theInstr, 23, 3 );
UChar b16to22 = toUChar( IFIELD( theInstr, 16, 7 ) );
UChar IMM = toUChar( IFIELD( theInstr, 12, 4 ) );
UChar b11 = toUChar( IFIELD( theInstr, 11, 1 ) );
+ UChar Wbit;
if (b16to22 != 0 || b11 != 0) {
vex_printf("dis_fp_scr(ppc)(instr,mtfsfi)\n");
return False;
}
DIP("mtfsfi%s crf%d,%d\n", flag_rC ? ".":"", crfD, IMM);
- putGST_field( PPC_GST_FPSCR, mkU32(IMM), crfD );
+ if (GX_level) {
+ /* This implies that Decimal Floating Point is supported, and the
+ * FPSCR must be managed as a 64-bit register.
+ */
+ Wbit = toUChar( IFIELD(theInstr, 16, 1) );
+ } else {
+ Wbit = 0;
+ }
+ crfD = crfD + (8 * (1 - Wbit) );
+ putGST_field( PPC_GST_FPSCR, mkU32( IMM ), crfD );
break;
}
case 0x247: { // mffs (Move from FPSCR, PPC32 p468)
UChar frD_addr = ifieldRegDS(theInstr);
UInt b11to20 = IFIELD(theInstr, 11, 10);
- IRExpr* fpscr_all = getGST_masked( PPC_GST_FPSCR, MASK_FPSCR_RN );
+ IRExpr* fpscr_lower = getGST_masked( PPC_GST_FPSCR, MASK_FPSCR_RN );
+ IRExpr* fpscr_upper = getGST_masked_upper( PPC_GST_FPSCR,
+ MASK_FPSCR_DRN );
if (b11to20 != 0) {
vex_printf("dis_fp_scr(ppc)(instr,mffs)\n");
@@ -8314,7 +8431,7 @@
DIP("mffs%s fr%u\n", flag_rC ? ".":"", frD_addr);
putFReg( frD_addr,
unop( Iop_ReinterpI64asF64,
- unop( Iop_32Uto64, fpscr_all )));
+ binop( Iop_32HLto64, fpscr_upper, fpscr_lower ) ) );
break;
}
@@ -8323,9 +8440,22 @@
UChar FM = toUChar( IFIELD(theInstr, 17, 8) );
UChar frB_addr = ifieldRegB(theInstr);
IRTemp frB = newTemp(Ity_F64);
- IRTemp rB_32 = newTemp(Ity_I32);
- Int i, mask;
+ IRTemp rB_64 = newTemp( Ity_I64 );
+ Int i;
+ ULong mask;
+ UChar Wbit;
+#define BFP_MASK_SEED 0x3000000000000000ULL
+#define DFP_MASK_SEED 0x7000000000000000ULL
+ if (GX_level) {
+ /* This implies that Decimal Floating Point is supported, and the
+ * FPSCR must be managed as a 64-bit register.
+ */
+ Wbit = toUChar( IFIELD(theInstr, 16, 1) );
+ } else {
+ Wbit = 0;
+ }
+
if (b25 == 1) {
/* new 64 bit move variant for power 6. If L field (bit 25) is
* a one do a full 64 bit move. Note, the FPSCR is not really
@@ -8342,14 +8472,24 @@
mask = 0;
for (i=0; i<8; i++) {
if ((FM & (1<<(7-i))) == 1) {
- mask |= 0xF << (7-i);
+ /* FPSCR field k is set to the contents of the corresponding
+ * field of register FRB, where k = i+8x(1-W). In the Power
+ * ISA, register field numbering is from left to right, so field
+ * 15 is the least significant field in a 64-bit register. To
+ * generate the mask, we set all the appropriate rounding mode
+ * bits in the highest order nibble (field 0) and shift right
+ * 'k x nibble length'.
+ */
+ if (Wbit)
+ mask |= DFP_MASK_SEED >> ( 4 * ( i + 8 * ( 1 - Wbit ) ) );
+ else
+ mask |= BFP_MASK_SEED >> ( 4 * ( i + 8 * ( 1 - Wbit ) ) );
}
}
}
assign( frB, getFReg(frB_addr));
- assign( rB_32, unop( Iop_64to32,
- unop( Iop_ReinterpF64asI64, mkexpr(frB) )));
- putGST_masked( PPC_GST_FPSCR, mkexpr(rB_32), mask );
+ assign( rB_64, unop( Iop_ReinterpF64asI64, mkexpr( frB ) ) );
+ putGST_masked( PPC_GST_FPSCR, mkexpr( rB_64 ), mask );
break;
}
@@ -8360,8 +8500,125 @@
return True;
}
+/*------------------------------------------------------------*/
+/*--- Decimal Floating Point (DFP) instruction translation ---*/
+/*------------------------------------------------------------*/
+/* DFP Arithmetic instructions */
+static Bool dis_dfp_arith(UInt theInstr)
+{
+ UInt opc2 = ifieldOPClo10( theInstr );
+ UChar frS_addr = ifieldRegDS( theInstr );
+ UChar frA_addr = ifieldRegA( theInstr );
+ UChar frB_addr = ifieldRegB( theInstr );
+ UChar flag_rC = ifieldBIT0( theInstr );
+ IRTemp frA = newTemp( Ity_D64 );
+ IRTemp frB = newTemp( Ity_D64 );
+ IRTemp frS = newTemp( Ity_D64 );
+ IRExpr* round = get_IR_roundingmode_DFP();
+ /* By default, if flag_RC is set, we will clear cr1 after the
+ * operation. In reality we should set cr1 to indicate the
+ * exception status of the operation, but since we're not
+ * simulating exceptions, the exception status will appear to be
+ * zero. Hence cr1 should be cleared if this is a . form insn.
+ */
+ Bool clear_CR1 = True;
+
+ assign( frA, getDReg( frA_addr ) );
+ assign( frB, getDReg( frB_addr ) );
+
+ switch (opc2) {
+ case 0x2: // dadd
+ DIP( "dadd%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_AddD64, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x202: // dsub
+ DIP( "dsub%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_SubD64, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x22: // dmul
+ DIP( "dmul%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_MulD64, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x222: // ddiv
+ DIP( "ddiv%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_DivD64, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ }
+
+ putDReg( frS_addr, mkexpr( frS ) );
+
+ if (flag_rC && clear_CR1) {
+ putCR321( 1, mkU8( 0 ) );
+ putCR0( 1, mkU8( 0 ) );
+ }
+
+ return True;
+}
+
+/* Quad DFP Arithmetic instructions */
+static Bool dis_dfp_arithq(UInt theInstr)
+{
+ UInt opc2 = ifieldOPClo10( theInstr );
+ UChar frS_addr = ifieldRegDS( theInstr );
+ UChar frA_addr = ifieldRegA( theInstr );
+ UChar frB_addr = ifieldRegB( theInstr );
+ UChar flag_rC = ifieldBIT0( theInstr );
+
+ IRTemp frA = newTemp( Ity_D128 );
+ IRTemp frB = newTemp( Ity_D128 );
+ IRTemp frS = newTemp( Ity_D128 );
+ IRExpr* round = get_IR_roundingmode_DFP();
+
+ /* By default, if flag_RC is set, we will clear cr1 after the
+ * operation. In reality we should set cr1 to indicate the
+ * exception status of the operation, but since we're not
+ * simulating exceptions, the exception status will appear to be
+ * zero. Hence cr1 should be cleared if this is a . form insn.
+ */
+ Bool clear_CR1 = True;
+
+ assign( frA, getDReg_pair( frA_addr ) );
+ assign( frB, getDReg_pair( frB_addr ) );
+
+ switch (opc2) {
+ case 0x2: // daddq
+ DIP( "daddq%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_AddD128, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x202: // dsubq
+ DIP( "dsubq%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_SubD128, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x22: // dmulq
+ DIP( "dmulq%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_MulD128, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ case 0x222: // ddivq
+ DIP( "ddivq%s fr%u,fr%u,fr%u\n",
+ flag_rC ? ".":"", frS_addr, frA_addr, frB_addr );
+ assign( frS, triop( Iop_DivD128, round, mkexpr( frA ), mkexpr( frB ) ) );
+ break;
+ }
+
+ putDReg_pair( frS_addr, mkexpr( frS ) );
+
+ if (flag_rC && clear_CR1) {
+ putCR321( 1, mkU8( 0 ) );
+ putCR0( 1, mkU8( 0 ) );
+ }
+
+ return True;
+}
+
/*------------------------------------------------------------*/
/*--- AltiVec Instruction Translation ---*/
/*------------------------------------------------------------*/
@@ -13542,7 +13799,15 @@
case 0x3B:
if (!allow_F) goto decode_noF;
opc2 = ifieldOPClo10(theInstr);
+
switch (opc2) {
+ case 0x2: // dadd - DFP Add
+ case 0x202: // dsub - DFP Subtract
+ case 0x22: // dmul - DFP Mult
+ case 0x222: // ddiv - DFP Divide
+ if (!allow_GX) goto decode_failure;
+ if (dis_dfp_arith( theInstr ))
+ goto decode_success;
case 0x3CE: // fcfidus (implemented as native insn)
if (!allow_VX)
goto decode_noVX;
@@ -13759,6 +14024,16 @@
opc2 = IFIELD(theInstr, 1, 10);
switch (opc2) {
+ /* 128-bit DFP instructions */
+ case 0x2: // daddq - DFP Add
+ case 0x202: // dsubq - DFP Subtract
+ case 0x22: // dmulq - DFP Mult
+ case 0x222: // ddivq - DFP Divide
+ if (!allow_GX) goto decode_failure;
+ if (dis_dfp_arithq( theInstr ))
+ goto decode_success;
+ goto decode_failure;
+
/* Floating Point Compare Instructions */
case 0x000: // fcmpu
case 0x020: // fcmpo
@@ -13812,7 +14087,9 @@
case 0x086: // mtfsfi
case 0x247: // mffs
case 0x2C7: // mtfsf
- if (dis_fp_scr( theInstr )) goto decode_success;
+ // Some of the above instructions need to know more about the
+ // ISA level supported by the host.
+ if (dis_fp_scr( theInstr, allow_GX )) goto decode_success;
goto decode_failure;
default:
Modified: trunk/pub/libvex_ir.h (+43 -0)
===================================================================
--- trunk/pub/libvex_ir.h 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/pub/libvex_ir.h 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -227,6 +227,9 @@
Ity_I128, /* 128-bit scalar */
Ity_F32, /* IEEE 754 float */
Ity_F64, /* IEEE 754 double */
+ Ity_D32, /* 32-bit Decimal floating point */
+ Ity_D64, /* 64-bit Decimal floating point */
+ Ity_D128, /* 128-bit Decimal floating point */
Ity_F128, /* 128-bit floating point; implementation defined */
Ity_V128 /* 128-bit SIMD */
}
@@ -983,6 +986,25 @@
See floating-point equiwalents for details. */
Iop_Recip32x2, Iop_Rsqrte32x2,
+ /* ------------------ Decimal Floating Point ------------------ */
+
+ /* ARITHMETIC INSTRUCTIONS 64-bit
+ ----------------------------------
+ IRRoundingModeDFP(I32) X D64 X D64 -> D64
+ Iop_AddD64, Iop_SubD64, Iop_MulD64, Iop_DivD64
+ */
+ Iop_AddD64, Iop_SubD64, Iop_MulD64, Iop_DivD64,
+
+ /* ARITHMETIC INSTRUCTIONS 128-bit
+ ----------------------------------
+ IRRoundingModeDFP(I32) X D128 X D128 -> D128
+ Iop_AddD128, Iop_SubD128, Iop_MulD128, Iop_DivD128
+ */
+ Iop_AddD128, Iop_SubD128, Iop_MulD128, Iop_DivD128,
+
+ /* Support for 128-bit DFP type */
+ Iop_D64HLtoD128, Iop_D128HItoD64, Iop_D128LOtoD64,
+
/* ------------------ 128-bit SIMD FP. ------------------ */
/* --- 32x4 vector FP --- */
@@ -1301,6 +1323,27 @@
}
IRRoundingMode;
+/* DFP encoding of IEEE754 2008 specified rounding modes extends the two bit
+ * binary floating point rounding mode (IRRoundingMode) to three bits. The
+ * DFP rounding modes are a super set of the binary rounding modes. The
+ * encoding was chosen such that the mapping of the least significant two bits
+ * of the IR to POWER encodings is same. The upper IR encoding bit is just
+ * a logical OR of the upper rounding mode bit from the POWER encoding.
+ */
+typedef
+ enum {
+ Irrm_DFP_NEAREST = 0, // Round to nearest, ties to even
+ Irrm_DFP_NegINF = 1, // Round to negative infinity
+ Irrm_DFP_PosINF = 2, // Round to posative infinity
+ Irrm_DFP_ZERO = 3, // Round toward zero
+ Irrm_DFP_NEAREST_TIE_AWAY_0 = 4, // Round to nearest, ties away from 0
+ Irrm_DFP_PREPARE_SHORTER = 5, // Round to prepare for storter
+ // precision
+ Irrm_DFP_AWAY_FROM_ZERO = 6, // Round to away from 0
+ Irrm_DFP_NEAREST_TIE_TOWARD_0 = 7 // Round to nearest, ties towards 0
+ }
+ IRRoundingModeDFP;
+
/* Floating point comparison result values, as created by Iop_CmpF64.
This is also derived from what IA32 does. */
typedef
Modified: trunk/pub/libvex_guest_ppc64.h (+6 -2)
===================================================================
--- trunk/pub/libvex_guest_ppc64.h 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/pub/libvex_guest_ppc64.h 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -227,8 +227,12 @@
/* 1322 */ UChar guest_CR7_321; /* in [3:1] */
/* 1323 */ UChar guest_CR7_0; /* in lsb */
- /* FP Status & Control Register fields */
- /* 1324 */ UInt guest_FPROUND; // FP Rounding Mode
+ /* FP Status and Control Register fields. Only rounding mode fields
+ are supported. */
+ /* 1324 */ UChar guest_FPROUND; // Binary Floating Point Rounding Mode
+ /* 1325 */ UChar guest_DFPROUND; // Decimal Floating Point Rounding Mode
+ /* 1326 */ UChar pad1;
+ /* 1327 */ UChar pad2;
/* Vector Save/Restore Register */
/* 1328 */ UInt guest_VRSAVE;
Modified: trunk/priv/guest_ppc_helpers.c (+4 -2)
===================================================================
--- trunk/priv/guest_ppc_helpers.c 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/guest_ppc_helpers.c 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -482,7 +482,8 @@
vex_state->guest_CR7_321 = 0;
vex_state->guest_CR7_0 = 0;
- vex_state->guest_FPROUND = (UInt)PPCrm_NEAREST;
+ vex_state->guest_FPROUND = PPCrm_NEAREST;
+ vex_state->guest_DFPROUND = PPCrm_NEAREST;
vex_state->guest_VRSAVE = 0;
@@ -638,7 +639,8 @@
vex_state->guest_CR7_321 = 0;
vex_state->guest_CR7_0 = 0;
- vex_state->guest_FPROUND = (UInt)PPCrm_NEAREST;
+ vex_state->guest_FPROUND = PPCrm_NEAREST;
+ vex_state->guest_DFPROUND = PPCrm_NEAREST;
vex_state->guest_VRSAVE = 0;
Modified: trunk/pub/libvex_guest_ppc32.h (+5 -2)
===================================================================
--- trunk/pub/libvex_guest_ppc32.h 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/pub/libvex_guest_ppc32.h 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -189,8 +189,11 @@
/* 1182 */ UChar guest_CR7_321; /* in [3:1] */
/* 1183 */ UChar guest_CR7_0; /* in lsb */
- /* FP Status & Control Register fields */
- /* 1184 */ UInt guest_FPROUND; // FP Rounding Mode
+ /* FP Status & Control Register fields. Only rounding mode fields are supported. */
+ /* 1184 */ UChar guest_FPROUND; // Binary Floating Point Rounding Mode
+ /* 1185 */ UChar guest_DFPROUND; // Decimal Floating Point Rounding Mode
+ /* 1186 */ UChar pad1;
+ /* 1187 */ UChar pad2;
/* Vector Save/Restore Register */
/* 1188 */ UInt guest_VRSAVE;
Modified: trunk/priv/ir_defs.c (+38 -0)
===================================================================
--- trunk/priv/ir_defs.c 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/ir_defs.c 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -58,6 +58,9 @@
case Ity_F64: vex_printf( "F64"); break;
case Ity_F128: vex_printf( "F128"); break;
case Ity_V128: vex_printf( "V128"); break;
+ case Ity_D32: vex_printf( "D32"); break;
+ case Ity_D64: vex_printf( "D64"); break;
+ case Ity_D128: vex_printf( "D128"); break;
default: vex_printf("ty = 0x%x\n", (Int)ty);
vpanic("ppIRType");
}
@@ -934,6 +937,18 @@
case Iop_Fixed32UToF32x2_RN: vex_printf("Fixed32UToF32x2_RN"); return;
case Iop_Fixed32SToF32x2_RN: vex_printf("Fixed32SToF32x2_RN"); return;
+ case Iop_AddD64: vex_printf("AddD64"); return;
+ case Iop_SubD64: vex_printf("SubD64"); return;
+ case Iop_MulD64: vex_printf("MulD64"); return;
+ case Iop_DivD64: vex_printf("DivD64"); return;
+ case Iop_AddD128: vex_printf("AddD128"); return;
+ case Iop_SubD128: vex_printf("SubD128"); return;
+ case Iop_MulD128: vex_printf("MulD128"); return;
+ case Iop_DivD128: vex_printf("DivD128"); return;
+ case Iop_D64HLtoD128: vex_printf("D64HLtoD128"); return;
+ case Iop_D128HItoD64: vex_printf("D128HItoD64"); return;
+ case Iop_D128LOtoD64: vex_printf("D128LOtoD64"); return;
+
default: vpanic("ppIROp(1)");
}
@@ -2591,6 +2606,25 @@
case Iop_F128toF32: BINARY(ity_RMode,Ity_F128, Ity_F32);
case Iop_F128toF64: BINARY(ity_RMode,Ity_F128, Ity_F64);
+ case Iop_D128HItoD64:
+ case Iop_D128LOtoD64:
+ UNARY(Ity_D128, Ity_D64);
+
+ case Iop_D64HLtoD128:
+ BINARY(Ity_D64,Ity_D64, Ity_D128);
+
+ case Iop_AddD64:
+ case Iop_SubD64:
+ case Iop_MulD64:
+ case Iop_DivD64:
+ TERNARY( ity_RMode, Ity_D64, Ity_D64, Ity_D64 );
+
+ case Iop_AddD128:
+ case Iop_SubD128:
+ case Iop_MulD128:
+ case Iop_DivD128:
+ TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128);
+
default:
ppIROp(op);
vpanic("typeOfPrimop");
@@ -2735,6 +2769,7 @@
case Ity_I8: case Ity_I16: case Ity_I32:
case Ity_I64: case Ity_I128:
case Ity_F32: case Ity_F64: case Ity_F128:
+ case Ity_D32: case Ity_D64: case Ity_D128:
case Ity_V128:
return True;
default:
@@ -3602,6 +3637,9 @@
case Ity_F64: return 8;
case Ity_F128: return 16;
case Ity_V128: return 16;
+ case Ity_D32: return 4;
+ case Ity_D64: return 8;
+ case Ity_D128: return 16;
default: vex_printf("\n"); ppIRType(ty); vex_printf("\n");
vpanic("sizeofIRType");
}
Modified: trunk/priv/host_ppc_isel.c (+417 -46)
===================================================================
--- trunk/priv/host_ppc_isel.c 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/host_ppc_isel.c 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -252,14 +252,16 @@
typedef
struct {
- IRTypeEnv* type_env;
-
- HReg* vregmap;
- HReg* vregmapHI;
- Int n_vregmap;
-
- HReg savedLR;
+ IRTypeEnv* type_env;
+ // 64-bit mode 32-bit mode
+ HReg* vregmapLo; // Low 64-bits [63:0] Low 32-bits [31:0]
+ HReg* vregmapMedLo; // high 64-bits[127:64] Next 32-bits [63:32]
+ HReg* vregmapMedHi; // unused Next 32-bits [95:64]
+ HReg* vregmapHi; // unused highest 32-bits [127:96]
+ Int n_vregmap;
+ HReg savedLR;
+
HInstrArray* code;
Int vreg_ctr;
@@ -280,18 +282,31 @@
{
vassert(tmp >= 0);
vassert(tmp < env->n_vregmap);
- return env->vregmap[tmp];
+ return env->vregmapLo[tmp];
}
static void lookupIRTempPair ( HReg* vrHI, HReg* vrLO,
ISelEnv* env, IRTemp tmp )
{
+ vassert(tmp >= 0);
+ vassert(tmp < env->n_vregmap);
+ vassert(env->vregmapMedLo[tmp] != INVALID_HREG);
+ *vrLO = env->vregmapLo[tmp];
+ *vrHI = env->vregmapMedLo[tmp];
+}
+
+/* Only for used in 32-bit mode */
+static void lookupIRTempQuad ( HReg* vrHi, HReg* vrMedHi, HReg* vrMedLo,
+ HReg* vrLo, ISelEnv* env, IRTemp tmp )
+{
vassert(!env->mode64);
vassert(tmp >= 0);
vassert(tmp < env->n_vregmap);
- vassert(env->vregmapHI[tmp] != INVALID_HREG);
- *vrLO = env->vregmap[tmp];
- *vrHI = env->vregmapHI[tmp];
+ vassert(env->vregmapMedLo[tmp] != INVALID_HREG);
+ *vrHi = env->vregmapHi[tmp];
+ *vrMedHi = env->vregmapMedHi[tmp];
+ *vrMedLo = env->vregmapMedLo[tmp];
+ *vrLo = env->vregmapLo[tmp];
}
static void addInstr ( ISelEnv* env, PPCInstr* instr )
@@ -391,6 +406,14 @@
static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, IRExpr* e, IRType xferTy );
static PPCAMode* iselWordExpr_AMode ( ISelEnv* env, IRExpr* e, IRType xferTy );
+static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
+ HReg* rMedLo, HReg* rLo,
+ ISelEnv* env, IRExpr* e );
+static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi,
+ HReg* rMedLo, HReg* rLo,
+ ISelEnv* env, IRExpr* e );
+
+
/* 32-bit mode ONLY: compute an I64 into a GPR pair. */
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
ISelEnv* env, IRExpr* e );
@@ -415,7 +438,16 @@
static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e );
static HReg iselVecExpr ( ISelEnv* env, IRExpr* e );
+/* 64-bit mode ONLY. */
+static HReg iselDfp64Expr_wrk ( ISelEnv* env, IRExpr* e );
+static HReg iselDfp64Expr ( ISelEnv* env, IRExpr* e );
+/* 64-bit mode ONLY: compute an D128 into a GPR64 pair. */
+static void iselDfp128Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ IRExpr* e );
+static void iselDfp128Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ IRExpr* e );
+
/*---------------------------------------------------------*/
/*--- ISEL: Misc helpers ---*/
/*---------------------------------------------------------*/
@@ -888,15 +920,21 @@
static HReg roundModeIRtoPPC ( ISelEnv* env, HReg r_rmIR )
{
/*
- rounding mode | PPC | IR
- ------------------------
- to nearest | 00 | 00
- to zero | 01 | 11
- to +infinity | 10 | 10
- to -infinity | 11 | 01
+ rounding mode | PPC | IR
+ -----------------------------------------------
+ to nearest, ties to even | 000 | 000
+ to zero | 001 | 011
+ to +infinity | 010 | 010
+ to -infinity | 011 | 001
+ +++++ Below are the extended rounding modes for decimal floating point +++++
+ to nearest, ties away from 0 | 100 | 100
+ to nearest, ties toward 0 | 101 | 111
+ to away from 0 | 110 | 110
+ to prepare for shorter precision | 111 | 101
*/
HReg r_rmPPC = newVRegI(env);
HReg r_tmp1 = newVRegI(env);
+ HReg r_tmp2 = newVRegI(env);
vassert(hregClass(r_rmIR) == HRcGPR(env->mode64));
@@ -909,20 +947,22 @@
addInstr(env, PPCInstr_Shft(Pshft_SHL, True/*32bit shift*/,
r_tmp1, r_rmIR, PPCRH_Imm(False,1)));
- addInstr(env, PPCInstr_Alu( Palu_XOR, r_tmp1, r_rmIR,
- PPCRH_Reg(r_tmp1) ));
+ addInstr( env, PPCInstr_Alu( Palu_AND,
+ r_tmp2, r_tmp1, PPCRH_Imm( False, 3 ) ) );
- addInstr(env, PPCInstr_Alu( Palu_AND, r_rmPPC, r_tmp1,
- PPCRH_Imm(False,3) ));
+ addInstr( env, PPCInstr_Alu( Palu_XOR,
+ r_rmPPC, r_rmIR, PPCRH_Reg( r_tmp2 ) ) );
return r_rmPPC;
}
/* Set the FPU's rounding mode: 'mode' is an I32-typed expression
- denoting a value in the range 0 .. 3, indicating a round mode
+ denoting a value in the range 0 .. 7, indicating a round mode
encoded as per type IRRoundingMode. Set the PPC FPSCR to have the
- same rounding.
+ same rounding. When the dfp_rm arg is True, set the decimal
+ floating point rounding mode bits (29:31); otherwise, set the
+ binary floating point rounding mode bits (62:63).
For speed & simplicity, we're setting the *entire* FPSCR here.
@@ -947,7 +987,7 @@
on any block with any sign of floating point activity.
*/
static
-void set_FPU_rounding_mode ( ISelEnv* env, IRExpr* mode )
+void _set_FPU_rounding_mode ( ISelEnv* env, IRExpr* mode, Bool dfp_rm )
{
HReg fr_src = newVRegF(env);
HReg r_src;
@@ -972,18 +1012,43 @@
// Resolve rounding mode and convert to PPC representation
r_src = roundModeIRtoPPC( env, iselWordExpr_R(env, mode) );
+
// gpr -> fpr
if (env->mode64) {
- fr_src = mk_LoadR64toFPR( env, r_src ); // 1*I64 -> F64
+ if (dfp_rm) {
+ HReg r_tmp1 = newVRegI( env );
+ addInstr( env,
+ PPCInstr_Shft( Pshft_SHL, False/*64bit shift*/,
+ r_tmp1, r_src, PPCRH_Imm( False, 32 ) ) );
+ fr_src = mk_LoadR64toFPR( env, r_tmp1 );
+ } else {
+ fr_src = mk_LoadR64toFPR( env, r_src ); // 1*I64 -> F64
+ }
} else {
- fr_src = mk_LoadRR32toFPR( env, r_src, r_src ); // 2*I32 -> F64
+ if (dfp_rm) {
+ HReg r_zero = newVRegI( env );
+ addInstr( env, PPCInstr_LI( r_zero, 0, env->mode64 ) );
+ fr_src = mk_LoadRR32toFPR( env, r_src, r_zero );
+ } else {
+ fr_src = mk_LoadRR32toFPR( env, r_src, r_src ); // 2*I32 -> F64
+ }
}
// Move to FPSCR
- addInstr(env, PPCInstr_FpLdFPSCR( fr_src ));
+ addInstr(env, PPCInstr_FpLdFPSCR( fr_src, dfp_rm ));
}
+static void set_FPU_rounding_mode ( ISelEnv* env, IRExpr* mode )
+{
+ _set_FPU_rounding_mode(env, mode, False);
+}
+static void set_FPU_DFP_rounding_mode ( ISelEnv* env, IRExpr* mode )
+{
+ _set_FPU_rounding_mode(env, mode, True);
+}
+
+
/*---------------------------------------------------------*/
/*--- ISEL: vector helpers ---*/
/*---------------------------------------------------------*/
@@ -2569,7 +2634,6 @@
*rHi = iselWordExpr_R(env, e->Iex.Binop.arg1);
*rLo = iselWordExpr_R(env, e->Iex.Binop.arg2);
return;
-
default:
break;
}
@@ -2594,6 +2658,57 @@
/*--- ISEL: Integer expressions (64 bit) ---*/
/*---------------------------------------------------------*/
+/* 32-bit mode ONLY: compute a 128-bit value into a register quad */
+static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi, HReg* rMedLo,
+ HReg* rLo, ISelEnv* env, IRExpr* e )
+{
+ vassert(!env->mode64);
+ iselInt128Expr_to_32x4_wrk(rHi, rMedHi, rMedLo, rLo, env, e);
+# if 0
+ vex_printf("\n"); ppIRExpr(e); vex_printf("\n");
+# endif
+ vassert(hregClass(*rHi) == HRcInt32);
+ vassert(hregIsVirtual(*rHi));
+ vassert(hregClass(*rMedHi) == HRcInt32);
+ vassert(hregIsVirtual(*rMedHi));
+ vassert(hregClass(*rMedLo) == HRcInt32);
+ vassert(hregIsVirtual(*rMedLo));
+ vassert(hregClass(*rLo) == HRcInt32);
+ vassert(hregIsVirtual(*rLo));
+}
+
+static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
+ HReg* rMedLo, HReg* rLo,
+ ISelEnv* env, IRExpr* e )
+{
+ vassert(e);
+ vassert(typeOfIRExpr(env->type_env,e) == Ity_I128);
+
+ /* read 128-bit IRTemp */
+ if (e->tag == Iex_RdTmp) {
+ lookupIRTempQuad( rHi, rMedHi, rMedLo, rLo, env, e->Iex.RdTmp.tmp);
+ return;
+ }
+
+ if (e->tag == Iex_Binop) {
+
+ IROp op_binop = e->Iex.Binop.op;
+ switch (op_binop) {
+ case Iop_64HLto128:
+ iselInt64Expr(rHi, rMedHi, env, e->Iex.Binop.arg1);
+ iselInt64Expr(rMedLo, rLo, env, e->Iex.Binop.arg2);
+ return;
+ default:
+ vex_printf("iselInt128Expr_to_32x4_wrk: Binop case 0x%x not found\n",
+ op_binop);
+ break;
+ }
+ }
+
+ vex_printf("iselInt128Expr_to_32x4_wrk: e->tag 0x%x not found\n", e->tag);
+ return;
+}
+
/* 32-bit mode ONLY: compute a 64-bit value into a register pair,
which is returned as the first two parameters. As with
iselIntExpr_R, these may be either real or virtual regs; in any
@@ -2864,6 +2979,36 @@
return;
}
+ case Iop_128to64: {
+ /* Narrow, return the low 64-bit half as a 32-bit
+ * register pair */
+ HReg r_Hi = INVALID_HREG;
+ HReg r_MedHi = INVALID_HREG;
+ HReg r_MedLo = INVALID_HREG;
+ HReg r_Lo = INVALID_HREG;
+
+ iselInt128Expr_to_32x4(&r_Hi, &r_MedHi, &r_MedLo, &r_Lo,
+ env, e->Iex.Unop.arg);
+ *rHi = r_MedLo;
+ *rLo = r_Lo;
+ return;
+ }
+
+ case Iop_128HIto64: {
+ /* Narrow, return the high 64-bit half as a 32-bit
+ * register pair */
+ HReg r_Hi = INVALID_HREG;
+ HReg r_MedHi = INVALID_HREG;
+ HReg r_MedLo = INVALID_HREG;
+ HReg r_Lo = INVALID_HREG;
+
+ iselInt128Expr_to_32x4(&r_Hi, &r_MedHi, &r_MedLo, &r_Lo,
+ env, e->Iex.Unop.arg);
+ *rHi = r_Hi;
+ *rLo = r_MedHi;
+ return;
+ }
+
/* V128{HI}to64 */
case Iop_V128HIto64:
case Iop_V128to64: {
@@ -3436,7 +3581,174 @@
vpanic("iselDblExpr_wrk(ppc)");
}
+static HReg iselDfp64Expr(ISelEnv* env, IRExpr* e)
+{
+ HReg r = iselDfp64Expr_wrk( env, e );
+ vassert(hregClass(r) == HRcFlt64);
+ vassert( hregIsVirtual(r) );
+ return r;
+}
+/* DO NOT CALL THIS DIRECTLY */
+static HReg iselDfp64Expr_wrk(ISelEnv* env, IRExpr* e)
+{
+ Bool mode64 = env->mode64;
+ IRType ty = typeOfIRExpr( env->type_env, e );
+ HReg r_dstHi, r_dstLo;
+
+ vassert( e );
+ vassert( ty == Ity_D64 );
+
+ if (e->tag == Iex_RdTmp) {
+ return lookupIRTemp( env, e->Iex.RdTmp.tmp );
+ }
+
+ /* --------- GET --------- */
+ if (e->tag == Iex_Get) {
+ HReg r_dst = newVRegF( env );
+ PPCAMode* am_addr = PPCAMode_IR( e->Iex.Get.offset,
+ GuestStatePtr(mode64) );
+ addInstr( env, PPCInstr_FpLdSt( True/*load*/, 8, r_dst, am_addr ) );
+ return r_dst;
+ }
+
+ /* --------- OPS --------- */
+ if (e->tag == Iex_Qop) {
+ HReg r_dst = newVRegF( env );
+ return r_dst;
+ }
+
+ if (e->tag == Iex_Unop) {
+ switch (e->Iex.Unop.op) {
+ case Iop_D128HItoD64:
+ iselDfp128Expr( &r_dstHi, &r_dstLo, env, e->Iex.Unop.arg );
+ return r_dstHi;
+ case Iop_D128LOtoD64:
+ iselDfp128Expr( &r_dstHi, &r_dstLo, env, e->Iex.Unop.arg );
+ return r_dstLo;
+ default:
+ vex_printf( "ERROR: iselDfp64Expr_wrk, UNKNOWN unop case %d\n",
+ e->Iex.Unop.op );
+ }
+ }
+
+ if (e->tag == Iex_Triop) {
+ PPCFpOp fpop = Pfp_INVALID;
+
+ switch (e->Iex.Triop.op) {
+ case Iop_AddD64:
+ fpop = Pfp_DFPADD;
+ break;
+ case Iop_SubD64:
+ fpop = Pfp_DFPSUB;
+ break;
+ case Iop_MulD64:
+ fpop = Pfp_DFPMUL;
+ break;
+ case Iop_DivD64:
+ fpop = Pfp_DFPDIV;
+ break;
+ default:
+ break;
+ }
+ if (fpop != Pfp_INVALID) {
+ HReg r_dst = newVRegF( env );
+ HReg r_srcL = iselDfp64Expr( env, e->Iex.Triop.arg2 );
+ HReg r_srcR = iselDfp64Expr( env, e->Iex.Triop.arg3 );
+
+ set_FPU_DFP_rounding_mode( env, e->Iex.Triop.arg1 );
+ addInstr( env, PPCInstr_Dfp64Binary( fpop, r_dst, r_srcL, r_srcR ) );
+ return r_dst;
+ }
+ }
+
+ ppIRExpr( e );
+ vpanic( "iselDfp64Expr_wrk(ppc)" );
+}
+
+static void iselDfp128Expr(HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e)
+{
+ iselDfp128Expr_wrk( rHi, rLo, env, e );
+ vassert( hregIsVirtual(*rHi) );
+ vassert( hregIsVirtual(*rLo) );
+}
+
+/* DO NOT CALL THIS DIRECTLY */
+static void iselDfp128Expr_wrk(HReg* rHi, HReg *rLo, ISelEnv* env, IRExpr* e)
+{
+ vassert( e );
+ vassert( typeOfIRExpr(env->type_env,e) == Ity_D128 );
+
+ /* read 128-bit IRTemp */
+ if (e->tag == Iex_RdTmp) {
+ // lookupDfp128IRTempPair( rHi, rLo, env, e->Iex.RdTmp.tmp );
+ lookupIRTempPair( rHi, rLo, env, e->Iex.RdTmp.tmp );
+ return;
+ }
+
+ /* --------- OPS --------- */
+ if (e->tag == Iex_Binop) {
+ HReg r_srcHi;
+ HReg r_srcLo;
+
+ switch (e->Iex.Binop.op) {
+ case Iop_D64HLtoD128:
+ r_srcHi = iselDfp64Expr( env, e->Iex.Binop.arg1 );
+ r_srcLo = iselDfp64Expr( env, e->Iex.Binop.arg2 );
+ *rHi = r_srcHi;
+ *rLo = r_srcLo;
+ return;
+ break;
+ default:
+ vex_printf( "ERROR: iselD128Expr_wrk, UNKNOWN binop case %d\n",
+ e->Iex.Binop.op );
+ break;
+ }
+ }
+
+ if (e->tag == Iex_Triop) {
+ PPCFpOp fpop = Pfp_INVALID;
+ switch (e->Iex.Triop.op) {
+ case Iop_AddD128:
+ fpop = Pfp_DFPADDQ;
+ break;
+ case Iop_SubD128:
+ fpop = Pfp_DFPSUBQ;
+ break;
+ case Iop_MulD128:
+ fpop = Pfp_DFPMULQ;
+ break;
+ case Iop_DivD128:
+ fpop = Pfp_DFPDIVQ;
+ break;
+ default:
+ break;
+ }
+
+ if (fpop != Pfp_INVALID) {
+ HReg r_dstHi = newVRegV( env );
+ HReg r_dstLo = newVRegV( env );
+ HReg r_srcRHi = newVRegV( env );
+ HReg r_srcRLo = newVRegV( env );
+
+ /* dst will be used to pass in the left operand and get the result. */
+ iselDfp128Expr( &r_dstHi, &r_dstLo, env, e->Iex.Triop.arg2 );
+ iselDfp128Expr( &r_srcRHi, &r_srcRLo, env, e->Iex.Triop.arg3 );
+ set_FPU_rounding_mode( env, e->Iex.Triop.arg1 );
+ addInstr( env,
+ PPCInstr_Dfp128Binary( fpop, r_dstHi, r_dstLo,
+ r_srcRHi, r_srcRLo ) );
+ *rHi = r_dstHi;
+ *rLo = r_dstLo;
+ return;
+ }
+ }
+
+ ppIRExpr( e );
+ vpanic( "iselD128Expr(ppc64)" );
+}
+
+
/*---------------------------------------------------------*/
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
@@ -3985,6 +4297,13 @@
fr_src, am_addr ));
return;
}
+ if (ty == Ity_D64) {
+ HReg fr_src = iselDfp64Expr( env, stmt->Ist.Put.data );
+ PPCAMode* am_addr = PPCAMode_IR( stmt->Ist.Put.offset,
+ GuestStatePtr(mode64) );
+ addInstr( env, PPCInstr_FpLdSt( False/*store*/, 8, fr_src, am_addr ) );
+ return;
+ }
break;
}
@@ -4023,6 +4342,7 @@
}
if (!mode64 && ty == Ity_I64) {
HReg r_srcHi, r_srcLo, r_dstHi, r_dstLo;
+
iselInt64Expr(&r_srcHi,&r_srcLo, env, stmt->Ist.WrTmp.data);
lookupIRTempPair( &r_dstHi, &r_dstLo, env, tmp);
addInstr(env, mk_iMOVds_RR(r_dstHi, r_srcHi) );
@@ -4037,6 +4357,23 @@
addInstr(env, mk_iMOVds_RR(r_dstLo, r_srcLo) );
return;
}
+ if (!mode64 && ty == Ity_I128) {
+ HReg r_srcHi, r_srcMedHi, r_srcMedLo, r_srcLo;
+ HReg r_dstHi, r_dstMedHi, r_dstMedLo, r_dstLo;
+
+ iselInt128Expr_to_32x4(&r_srcHi, &r_srcMedHi,
+ &r_srcMedLo, &r_srcLo,
+ env, stmt->Ist.WrTmp.data);
+
+ lookupIRTempQuad( &r_dstHi, &r_dstMedHi, &r_dstMedLo,
+ &r_dstLo, env, tmp);
+
+ addInstr(env, mk_iMOVds_RR(r_dstHi, r_srcHi) );
+ addInstr(env, mk_iMOVds_RR(r_dstMedHi, r_srcMedHi) );
+ addInstr(env, mk_iMOVds_RR(r_dstMedLo, r_srcMedLo) );
+ addInstr(env, mk_iMOVds_RR(r_dstLo, r_srcLo) );
+ return;
+ }
if (ty == Ity_I1) {
PPCCondCode cond = iselCondCode(env, stmt->Ist.WrTmp.data);
HReg r_dst = lookupIRTemp(env, tmp);
@@ -4061,6 +4398,21 @@
addInstr(env, PPCInstr_AvUnary(Pav_MOV, v_dst, v_src));
return;
}
+ if (ty == Ity_D64) {
+ HReg fr_dst = lookupIRTemp( env, tmp );
+ HReg fr_src = iselDfp64Expr( env, stmt->Ist.WrTmp.data );
+ addInstr( env, PPCInstr_Dfp64Unary( Pfp_MOV, fr_dst, fr_src ) );
+ return;
+ }
+ if (ty == Ity_D128) {
+ HReg fr_srcHi, fr_srcLo, fr_dstHi, fr_dstLo;
+ // lookupDfp128IRTempPair( &fr_dstHi, &fr_dstLo, env, tmp );
+ lookupIRTempPair( &fr_dstHi, &fr_dstLo, env, tmp );
+ iselDfp128Expr( &fr_srcHi, &fr_srcLo, env, stmt->Ist.WrTmp.data );
+ addInstr( env, PPCInstr_Dfp64Unary( Pfp_MOV, fr_dstHi, fr_srcHi ) );
+ addInstr( env, PPCInstr_Dfp64Unary( Pfp_MOV, fr_dstLo, fr_srcLo ) );
+ return;
+ }
break;
}
@@ -4242,13 +4594,12 @@
/*---------------------------------------------------------*/
/* Translate an entire BS to ppc code. */
-
HInstrArray* iselSB_PPC ( IRSB* bb, VexArch arch_host,
VexArchInfo* archinfo_host,
VexAbiInfo* vbi )
{
Int i, j;
- HReg hreg, hregHI;
+ HReg hregLo, hregMedLo, hregMedHi, hregHi;
ISelEnv* env;
UInt hwcaps_host = archinfo_host->hwcaps;
Bool mode64 = False;
@@ -4284,10 +4635,18 @@
env->type_env = bb->tyenv;
/* Make up an IRTemp -> virtual HReg mapping. This doesn't
- change as we go along. */
+ * change as we go along.
+ *
+ * vregmap2 and vregmap3 are only used in 32 bit mode
+ * for supporting I128 in 32-bit mode
+ */
env->n_vregmap = bb->tyenv->types_used;
- env->vregmap = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
- env->vregmapHI = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
+ env->vregmapLo = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
+ env->vregmapMedLo = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
+ if (!mode64) {
+ env->vregmapMedHi = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
+ env->vregmapHi = LibVEX_Alloc(env->n_vregmap * sizeof(HReg));
+ }
/* and finally ... */
env->hwcaps = hwcaps_host;
@@ -4298,32 +4657,44 @@
register. */
j = 0;
for (i = 0; i < env->n_vregmap; i++) {
- hregHI = hreg = INVALID_HREG;
+ hregLo = hregMedLo = hregMedHi = hregHi = INVALID_HREG;
switch (bb->tyenv->types[i]) {
case Ity_I1:
case Ity_I8:
case Ity_I16:
case Ity_I32:
- if (mode64) { hreg = mkHReg(j++, HRcInt64, True); break;
- } else { hreg = mkHReg(j++, HRcInt32, True); break;
+ if (mode64) { hregLo = mkHReg(j++, HRcInt64, True); break;
+ } else { hregLo = mkHReg(j++, HRcInt32, True); break;
}
case Ity_I64:
- if (mode64) { hreg = mkHReg(j++, HRcInt64, True); break;
- } else { hreg = mkHReg(j++, HRcInt32, True);
- hregHI = mkHReg(j++, HRcInt32, True); break;
+ if (mode64) { hregLo = mkHReg(j++, HRcInt64, True); break;
+ } else { hregLo = mkHReg(j++, HRcInt32, True);
+ hregMedLo = mkHReg(j++, HRcInt32, True); break;
}
- case Ity_I128: vassert(mode64);
- hreg = mkHReg(j++, HRcInt64, True);
- hregHI = mkHReg(j++, HRcInt64, True); break;
+ case Ity_I128:
+ if (mode64) { hregLo = mkHReg(j++, HRcInt64, True);
+ hregMedLo = mkHReg(j++, HRcInt64, True); break;
+ } else { hregLo = mkHReg(j++, HRcInt32, True);
+ hregMedLo = mkHReg(j++, HRcInt32, True);
+ hregMedHi = mkHReg(j++, HRcInt32, True);
+ hregHi = mkHReg(j++, HRcInt32, True); break;
+ }
case Ity_F32:
- case Ity_F64: hreg = mkHReg(j++, HRcFlt64, True); break;
- case Ity_V128: hreg = mkHReg(j++, HRcVec128, True); break;
+ case Ity_F64: hregLo = mkHReg(j++, HRcFlt64, True); break;
+ case Ity_V128: hregLo = mkHReg(j++, HRcVec128, True); break;
+ case Ity_D64: hregLo = mkHReg(j++, HRcFlt64, True); break;
+ case Ity_D128: hregLo = mkHReg(j++, HRcFlt64, True);
+ hregMedLo = mkHReg(j++, HRcFlt64, True); break;
default:
ppIRType(bb->tyenv->types[i]);
vpanic("iselBB(ppc): IRTemp type");
}
- env->vregmap[i] = hreg;
- env->vregmapHI[i] = hregHI;
+ env->vregmapLo[i] = hregLo;
+ env->vregmapMedLo[i] = hregMedLo;
+ if (!mode64) {
+ env->vregmapMedHi[i] = hregMedHi;
+ env->vregmapHi[i] = hregHi;
+ }
}
env->vreg_ctr = j;
Modified: trunk/priv/host_ppc_defs.h (+51 -6)
===================================================================
--- trunk/priv/host_ppc_defs.h 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/host_ppc_defs.h 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -359,8 +359,13 @@
Pfp_INVALID,
/* Ternary */
- Pfp_MADDD, Pfp_MSUBD,
- Pfp_MADDS, Pfp_MSUBS,
+ Pfp_MADDD, Pfp_MSUBD,
+ Pfp_MADDS, Pfp_MSUBS,
+ Pfp_DFPADD, Pfp_DFPADDQ,
+ Pfp_DFPSUB, Pfp_DFPSUBQ,
+ Pfp_DFPMUL, Pfp_DFPMULQ,
+ Pfp_DFPDIV, Pfp_DFPDIVQ,
+ Pfp_DQUAQ, Pfp_DRRNDQ,
/* Binary */
Pfp_ADDD, Pfp_SUBD, Pfp_MULD, Pfp_DIVD,
@@ -485,7 +490,11 @@
Pin_AvShlDbl, /* AV shift-left double by imm */
Pin_AvSplat, /* One elem repeated throughout dst */
Pin_AvLdVSCR, /* mtvscr */
- Pin_AvCMov /* AV conditional move */
+ Pin_AvCMov, /* AV conditional move */
+ Pin_Dfp64Unary, /* DFP64 unary op */
+ Pin_Dfp128nary, /* DFP128 unary op */
+ Pin_Dfp64Binary, /* DFP64 binary op */
+ Pin_Dfp128Binary /* DFP128 binary op */
}
PPCInstrTag;
@@ -685,6 +694,7 @@
/* Load FP Status & Control Register */
struct {
HReg src;
+ UInt dfp_rm;
} FpLdFPSCR;
/* Do a compare, generating result into an int register. */
struct {
@@ -782,7 +792,35 @@
struct {
HReg src;
} AvLdVSCR;
- } Pin;
+ struct {
+ PPCFpOp op;
+ HReg dst;
+ HReg src;
+ } Dfp64Unary;
+ struct {
+ PPCFpOp op;
+ HReg dst;
+ HReg srcL;
+ HReg srcR;
+ } Dfp64Binary;
+ struct {
+ PPCFpOp op;
+ HReg dst_hi;
+ HReg dst_lo;
+ HReg src_hi;
+ HReg src_lo;
+ } Dfp128Unary;
+ struct {
+ /* The dst is used to pass the left source operand in and return
+ * the result.
+ */
+ PPCFpOp op;
+ HReg dst_hi;
+ HReg dst_lo;
+ HReg srcR_hi;
+ HReg srcR_lo;
+ } Dfp128Binary;
+ } Pin;
}
PPCInstr;
@@ -820,7 +858,7 @@
extern PPCInstr* PPCInstr_FpCftI ( Bool fromI, Bool int32, Bool syned,
Bool dst64, HReg dst, HReg src );
extern PPCInstr* PPCInstr_FpCMov ( PPCCondCode, HReg dst, HReg src );
-extern PPCInstr* PPCInstr_FpLdFPSCR ( HReg src );
+extern PPCInstr* PPCInstr_FpLdFPSCR ( HReg src, Bool dfp_rm );
extern PPCInstr* PPCInstr_FpCmp ( HReg dst, HReg srcL, HReg srcR );
extern PPCInstr* PPCInstr_RdWrLR ( Bool wrLR, HReg gpr );
@@ -840,8 +878,15 @@
extern PPCInstr* PPCInstr_AvCMov ( PPCCondCode, HReg dst, HReg src );
extern PPCInstr* PPCInstr_AvLdVSCR ( HReg src );
-extern void ppPPCInstr ( PPCInstr*, Bool mode64 );
+extern PPCInstr* PPCInstr_Dfp64Unary ( PPCFpOp op, HReg dst, HReg src );
+extern PPCInstr* PPCInstr_Dfp64Binary ( PPCFpOp op, HReg dst, HReg srcL,
+ HReg srcR );
+extern PPCInstr* PPCInstr_Dfp128Binary( PPCFpOp op, HReg dst_hi, HReg dst_lo,
+ HReg srcR_hi, HReg srcR_lo );
+extern void ppPPCInstr(PPCInstr*, Bool mode64);
+
+
/* Some functions that insulate the register allocator from details
of the underlying instruction set. */
extern void getRegUsage_PPCInstr ( HRegUsage*, PPCInstr*, Bool mode64 );
Modified: trunk/priv/host_ppc_defs.c (+183 -4)
===================================================================
--- trunk/priv/host_ppc_defs.c 2012-03-27 04:09:49 +01:00 (rev 2269)
+++ trunk/priv/host_ppc_defs.c 2012-04-02 11:20:48 +01:00 (rev 2270)
@@ -630,6 +630,14 @@
case Pfp_FRIN: return "frin";
case Pfp_FRIP: return "frip";
case Pfp_FRIZ: return "friz";
+ case Pfp_DFPADD: return "dadd";
+ case Pfp_DFPADDQ: return "daddq";
+ case Pfp_DFPSUB: return "dsub";
+ case Pfp_DFPSUBQ: return "dsubq";
+ case Pfp_DFPMUL: return "dmul";
+ case Pfp_DFPMULQ: return "dmulq";
+ case Pfp_DFPDIV: return "ddivd";
+ case Pfp_DFPDIVQ: return "ddivq";
default: vpanic("showPPCFpOp");
}
}
@@ -970,6 +978,35 @@
i->Pin.FpRSP.src = src;
return i;
}
+PPCInstr* PPCInstr_Dfp64Unary(PPCFpOp op, HReg dst, HReg src) {
+ PPCInstr* i = LibVEX_Alloc( sizeof(PPCInstr) );
+ i->tag = Pin_Dfp64Unary;
+ i->Pin.Dfp64Unary.op = op;
+ i->Pin.Dfp64Unary.dst = dst;
+ i->Pin.Dfp64Unary.src = src;
+ return i;
+}
+PPCInstr* PPCInstr_Dfp64Binary(PPCFpOp op, HReg dst, HReg srcL, HReg srcR) {
+ PPCInstr* i = LibVEX_Alloc( sizeof(PPCInstr) );
+ i->tag = Pin_Dfp64Binary;
+ i->Pin.Dfp64Binary.op = op;
+ i->Pin.Dfp64Binary.dst = dst;
+ i->Pin.Dfp64Binary.srcL = srcL;
+ i->Pin.Dfp64Binary.srcR = srcR;
+ return i;
+}
+PPCInstr* PPCInstr_Dfp128Binary(PPCFpOp op, HReg dst_hi, HReg dst_lo,
+ HReg srcR_hi, HReg srcR_lo) {
+ /* dst is used to pass the srcL argument and return the result */
+ PPCInstr* i = LibVEX_Alloc( sizeof(PPCInstr) );
+ i->tag = Pin_Dfp128Binary;
+ i->Pin.Dfp128Binary.op = op;
+ i->Pin.Dfp128Binary.dst_hi = dst_hi;
+ i->Pin.Dfp128Binary.dst_lo = dst_lo;
+ i->Pin.Dfp128Binary.srcR_hi = srcR_hi;
+ i->Pin.Dfp128Binary.srcR_lo = srcR_lo;
+ return i;
+}
/*
Valid combo | fromI | int32 | syned | flt64 |
@@ -1040,10 +1077,11 @@
vassert(cond.test != Pct_ALWAYS);
return i;
}
-PPCInstr* PPCInstr_FpLdFPSCR ( HReg src ) {
+PPCInstr* PPCInstr_FpLdFPSCR ( HReg src, Bool dfp_rm ) {
PPCInstr* i = LibVEX_Alloc(sizeof(PPCInstr));
i->tag = Pin_FpLdFPSCR;
i->Pin.FpLdFPSCR.src = src;
+ i->Pin.FpLdFPSCR.dfp_rm = dfp_rm ? 1 : 0;
return i;
}
PPCInstr* PPCInstr_FpCmp ( HReg dst, HReg srcL, HReg srcR ) {
@@ -1547,6 +1585,7 @@
case Pin_FpLdFPSCR:
vex_printf("mtfsf 0xFF,");
ppHRegPPC(i->Pin.FpLdFPSCR.src);
+ vex_printf(",0, %s", i->Pin.FpLdFPSCR.dfp_rm ? "1" : "0");
return;
case Pin_FpCmp:
vex_printf("fcmpo %%cr1,");
@@ -1711,6 +1750,29 @@
ppHRegPPC(i->Pin.AvLdVSCR.src);
return;
+ case Pin_Dfp64Unary:
+ vex_printf("%s ", showPPCFpOp(i->Pin.Dfp64Unary.op));
+ ppHRegPPC(i->Pin.Dfp64Unary.dst);
+ vex_printf(",");
+ ppHRegPPC(i->Pin.Dfp64Unary.src);
+ return;
+
+ case Pin_Dfp64Binary:
+ vex_printf("%s ", showPPCFpOp(i->Pin.Dfp64Binary.op));
+ ppHRegPPC(i->Pin.Dfp64Binary.dst);
+ vex_printf(",");
+ ppHRegPPC(i->Pin.Dfp64Binary.srcL);
+ vex_printf(",");
+ ppHRegPPC(i->Pin.Dfp64Binary.srcR);
+ return;
+
+ case Pin_Dfp128Binary:
+ vex_printf("%s ", showPPCFpOp(i->Pin.Dfp128Binary.op));
+ ppHRegPPC(i->Pin.Dfp128Binary.dst_hi);
+ vex_printf(",");
+ ppHRegPPC(i->Pin.Dfp128Binary.srcR_hi);
+ return;
+
default:
vex_printf("\nppPPCInstr: No such tag(%d)\n", (Int)i->tag);
vpanic("ppPPCInstr");
@@ -1978,6 +2040,21 @@
case Pin_AvLdVSCR:
addHRegUse(u, HRmRead, i->Pin.AvLdVSCR.src);
return;
+ case Pin_Dfp64Unary:
+ addHRegUse(u, HRmWrite, i->Pin.Dfp64Unary.dst);
+ addHRegUse(u, HRmRead, i->Pin.Dfp64Unary.src);
+ return;
+ case Pin_Dfp64Binary:
+ addHRegUse(u, HRmWrite, i->Pin.Dfp64Binary.dst);
+ addHRegUse(u, HRmRead, i->Pin.Dfp64Binary.srcL);
+ addHRegUse(u, HRmRead, i->Pin.Dfp64Binary.srcR);
+ return;
+ case Pin_Dfp128Binary:
+ addHRegUse(u, HRmWrite, i->Pin.Dfp128Binary.dst_hi);
+ addHRegUse(u, HRmWrite, i->Pin.Dfp128Binary.dst_lo);
+ addHRegUse(u, HRmRead, i->Pin.Dfp128Binary.srcR_hi);
+ addHRegUse(u, HRmRead, i->Pin.Dfp128Binary.srcR_lo);
+ return;
default:
ppPPCInstr(i, mode64);
@@ -2174,6 +2251,21 @@
case Pin_AvLdVSCR:
mapReg(m, &i->Pin.AvLdVSCR.src);
return;
+ case Pin_Dfp64Unary:
+ mapReg(m, &i->Pin.Dfp64Unary.dst);
+ mapReg(m, &i->Pin.Dfp64Unary.src);
+ return;
+ case Pin_Dfp64Binary:
+ mapReg(m, &i->Pin.Dfp64Binary.dst);
+ mapReg(m, &i->Pin.Dfp64Binary.srcL);
+ mapReg(m, &i->Pin.Dfp64Binary.srcR);
+ return;
+ case Pin_Dfp128Binary:
+ mapReg(m, &i->Pin.Dfp128Binary.dst_hi);
+ mapReg(m, &i->Pin.Dfp128Binary.dst_lo);
+ mapReg(m, &i->Pin.Dfp128Binary.srcR_hi);
+ mapReg(m, &i->Pin.Dfp128Binary.srcR_lo);
+ return;
default:
ppPPCInstr(i, mode64);
@@ -2423,12 +2515,12 @@
}
// Only used by mtfsf
-static UChar* mkFormXFL ( UChar* p, UInt FM, UInt freg )
+static UChar* mkFormXFL ( UChar* p, UInt FM, UInt freg, UInt dfp_rm )
{
UInt theInstr;
vassert(FM < 0x100);
vassert(freg < 0x20);
- theInstr = ((63<<26) | (FM<<17) | (freg<<11) | (711<<1));
+ theInstr = ((63<<26) | (FM<<17) | (dfp_rm<<16) | (freg<<11) | (711<<1));
return emit32(p, theInstr);
}
@@ -3533,7 +3625,7 @@
case Pin_FpLdFPSCR: {
UInt fr_src = fregNo(i->Pin.FpLdFPSCR.s...
[truncated message content] |
|
From: Philippe W. <phi...@sk...> - 2012-04-02 03:30:53
|
valgrind revision: 12475 VEX revision: 2269 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-01 20:00:05 PDT Ended at 2012-04-01 20:29:58 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 == 513 tests, 9 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/test-plo-yes (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-02 03:25:33
|
valgrind revision: 12475
VEX revision: 2269
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-01 21:55:01 CDT
Ended at 2012-04-01 22:25:24 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
== 606 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-01 22:10:16.874771508 -0500
+++ mssnapshot.stderrB.out 2012-04-01 22:15:11.888501063 -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-01 22:10:18.076762271 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:16:59.219673672 -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-01 22:10:18.031762617 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:16:59.219673672 -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-01 22:10:18.007762803 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:16:59.219673672 -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-01 22:10:18.094762132 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:16:59.219673672 -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-01 22:10:18.003762831 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:16:59.219673672 -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-01 22:10:18.041762539 -0500
+++ overlap.stderr.out 2012-04-01 22:17:06.425618094 -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-01 21:55:09.302715728 -0500
+++ mssnapshot.stderrB.out 2012-04-01 22:00:09.174428529 -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-01 21:55:10.369707607 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:01:55.020619384 -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-01 21:55:10.325707939 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:01:55.020619384 -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-01 21:55:10.300708129 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:01:55.020619384 -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-01 21:55:10.388707459 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:01:55.020619384 -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-01 21:55:10.296708161 -0500
+++ origin5-bz2.stderr.out 2012-04-01 22:01:55.020619384 -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-01 21:55:10.334707872 -0500
+++ overlap.stderr.out 2012-04-01 22:02:02.134564972 -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-02 03:07:47
|
valgrind revision: 12475 VEX revision: 2269 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-02 03:40:45 BST Ended at 2012-04-02 04:07:23 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 == 596 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 1 stdoutB failure, 0 post failures == gdbserver_tests/mchelp (stdoutB) memcheck/tests/err_disable4 (stderr) none/tests/amd64/sse4-64 (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 596 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 2 stdoutB failures, 0 post failures == gdbserver_tests/mcinvokeRU (stdoutB) gdbserver_tests/mcinvokeWS (stdoutB) memcheck/tests/err_disable4 (stderr) none/tests/amd64/sse4-64 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2012-04-02 03:54:05.327689396 +0100 --- new.short 2012-04-02 04:07:23.730058375 +0100 *************** *** 8,12 **** ! == 596 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 2 stdoutB failures, 0 post failures == ! gdbserver_tests/mcinvokeRU (stdoutB) ! gdbserver_tests/mcinvokeWS (stdoutB) memcheck/tests/err_disable4 (stderr) --- 8,11 ---- ! == 596 tests, 1 stderr failure, 1 stdout failure, 0 stderrB failures, 1 stdoutB failure, 0 post failures == ! gdbserver_tests/mchelp (stdoutB) memcheck/tests/err_disable4 (stderr) |
|
From: <br...@ac...> - 2012-04-02 02:55:22
|
valgrind revision: 12475
VEX revision: 2269
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-01 22:20:08 EDT
Ended at 2012-04-01 22:55:09 EDT
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
== 490 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/test-plo-yes (stderr)
memcheck/tests/varinfo6 (stderr)
helgrind/tests/tc09_bad_unlock (stderr)
helgrind/tests/tc18_semabuse (stderr)
helgrind/tests/tc20_verifywrap (stderr)
drd/tests/tc04_free_lock (stderr)
drd/tests/tc09_bad_unlock (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... done
Running regression tests ... failed
Regression test results follow
== 490 tests, 10 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/test-plo-yes (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)
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Sun Apr 1 22:37:48 2012
--- new.short Sun Apr 1 22:55:09 2012
***************
*** 8,10 ****
! == 490 tests, 10 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
--- 8,10 ----
! == 490 tests, 9 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/manuel3 (stderr)
***************
*** 14,16 ****
helgrind/tests/tc09_bad_unlock (stderr)
- helgrind/tests/tc14_laog_dinphils (stderr)
helgrind/tests/tc18_semabuse (stderr)
--- 14,15 ----
=================================================
./valgrind-new/drd/tests/tc04_free_lock.stderr.diff-ppc
=================================================
--- tc04_free_lock.stderr.exp-ppc 2012-04-01 22:38:34.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-01 22:54:21.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-01 22:38:34.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-01 22:54:21.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-01 22:38:34.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:54:26.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-01 22:38:33.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:54:26.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-01 22:38:34.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:54:26.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-01 22:37:53.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:50:26.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/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-04-01 22:37:53.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-04-01 22:50:35.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-01 22:37:53.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-04-01 22:50:45.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-01 22:38:01.000000000 -0400
+++ manuel3.stderr.out 2012-04-01 22:44:32.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-01 22:38:01.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-01 22:45:14.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-01 22:38:01.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-01 22:45:14.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/test-plo-yes.stderr.diff-le32
=================================================
--- test-plo-yes.stderr.exp-le32 2012-04-01 22:38:01.000000000 -0400
+++ test-plo-yes.stderr.out 2012-04-01 22:46:01.000000000 -0400
@@ -1,9 +1,18 @@
-Conditional jump or move depends on uninitialised value(s)
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ ...
+
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
...
-Invalid read of size 4
+Invalid read of size 1
...
- Address 0x........ is 4 bytes inside a block of size 12 free'd
+ Address 0x........ is 8 bytes inside a block of size 24 free'd
at 0x........: free (vg_replace_malloc.c:...)
...
=================================================
./valgrind-new/memcheck/tests/test-plo-yes.stderr.diff-le64
=================================================
--- test-plo-yes.stderr.exp-le64 2012-04-01 22:38:01.000000000 -0400
+++ test-plo-yes.stderr.out 2012-04-01 22:46:01.000000000 -0400
@@ -1,7 +1,16 @@
-Conditional jump or move depends on uninitialised value(s)
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ ...
+
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
...
-Invalid read of size 8
+Invalid read of size 1
...
Address 0x........ is 8 bytes inside a block of size 24 free'd
at 0x........: free (vg_replace_malloc.c:...)
=================================================
./valgrind-new/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-04-01 22:38:01.000000000 -0400
+++ varinfo6.stderr.out 2012-04-01 22:46:22.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-01 22:38:01.000000000 -0400
+++ varinfo6.stderr.out 2012-04-01 22:46:22.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-01 22:21:13.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-01 22:37:00.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-01 22:21:13.000000000 -0400
+++ tc04_free_lock.stderr.out 2012-04-01 22:37:00.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-01 22:21:13.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:37:05.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-01 22:21:13.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:37:05.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-01 22:21:13.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:37:05.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-01 22:20:32.000000000 -0400
+++ tc09_bad_unlock.stderr.out 2012-04-01 22:33:04.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-01 22:20:32.000000000 -0400
+++ tc14_laog_dinphils.stderr.out 2012-04-01 22:33:10.000000000 -0400
@@ -20,5 +20,68 @@
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:...)
+ ...
+
+---Thread-Announcement------------------------------------------
+
+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:...)
+ ...
+
+---Thread-Announcement------------------------------------------
+
+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: 1154 errors from 4 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc18_semabuse.stderr.diff
=================================================
--- tc18_semabuse.stderr.exp 2012-04-01 22:20:32.000000000 -0400
+++ tc18_semabuse.stderr.out 2012-04-01 22:33:14.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-01 22:20:32.000000000 -0400
+++ tc20_verifywrap.stderr.out 2012-04-01 22:33:24.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-01 22:20:39.000000000 -0400
+++ manuel3.stderr.out 2012-04-01 22:27:10.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-01 22:20:39.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-01 22:27:53.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-01 22:20:39.000000000 -0400
+++ partial_load_ok.stderr.out 2012-04-01 22:27:53.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/test-plo-yes.stderr.diff-le32
=================================================
--- test-plo-yes.stderr.exp-le32 2012-04-01 22:20:39.000000000 -0400
+++ test-plo-yes.stderr.out 2012-04-01 22:28:39.000000000 -0400
@@ -1,9 +1,18 @@
-Conditional jump or move depends on uninitialised value(s)
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ ...
+
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
...
-Invalid read of size 4
+Invalid read of size 1
...
- Address 0x........ is 4 bytes inside a block of size 12 free'd
+ Address 0x........ is 8 bytes inside a block of size 24 free'd
at 0x........: free (vg_replace_malloc.c:...)
...
=================================================
./valgrind-old/memcheck/tests/test-plo-yes.stderr.diff-le64
=================================================
--- test-plo-yes.stderr.exp-le64 2012-04-01 22:20:39.000000000 -0400
+++ test-plo-yes.stderr.out 2012-04-01 22:28:39.000000000 -0400
@@ -1,7 +1,16 @@
-Conditional jump or move depends on uninitialised value(s)
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
+ ...
+
+Invalid read of size 1
+ ...
+ Address 0x........ is 0 bytes after a block of size 5 alloc'd
+ at 0x........: memalign (vg_replace_malloc.c:...)
...
-Invalid read of size 8
+Invalid read of size 1
...
Address 0x........ is 8 bytes inside a block of size 24 free'd
at 0x........: free (vg_replace_malloc.c:...)
=================================================
./valgrind-old/memcheck/tests/varinfo6.stderr.diff
=================================================
--- varinfo6.stderr.exp 2012-04-01 22:20:39.000000000 -0400
+++ varinfo6.stderr.out 2012-04-01 22:29:00.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-01 22:20:39.000000000 -0400
+++ varinfo6.stderr.out 2012-04-01 22:29:00.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-02 02:52:46
|
valgrind revision: 12475
VEX revision: 2269
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-01 21:30:01 CDT
Ended at 2012-04-01 21:52:37 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
== 606 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-01 21:41:25.988317214 -0500
+++ mcbreak.stderrB.out 2012-04-01 21:43:43.486346835 -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-01 21:41:25.988317214 -0500
+++ mcclean_after_fork.stderrB.out 2012-04-01 21:43:45.109111148 -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-01 21:41:25.985317651 -0500
+++ mcleak.stderrB.out 2012-04-01 21:44:04.351316465 -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-01 21:41:25.991316779 -0500
+++ mcmain_pic.stderrB.out 2012-04-01 21:44:05.984079329 -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-01 21:41:25.993316489 -0500
+++ mcvabits.stderrB.out 2012-04-01 21:44:10.822376631 -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-01 21:41:25.992316634 -0500
+++ mssnapshot.stderrB.out 2012-04-01 21:44:13.906928641 -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-01 21:41:26.469247363 -0500
+++ stack_switch.stderr.out 2012-04-01 21:45:14.857076566 -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-01 21:41:26.674217591 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:45:39.195541827 -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-01 21:41:26.641222384 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:45:39.195541827 -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-01 21:41:26.623224998 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:45:39.195541827 -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-01 21:41:26.688215559 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:45:39.195541827 -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-01 21:41:26.621225288 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:45:39.195541827 -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-01 21:30:11.018365531 -0500
+++ mcbreak.stderrB.out 2012-04-01 21:32:33.817619875 -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-01 21:30:11.018365531 -0500
+++ mcclean_after_fork.stderrB.out 2012-04-01 21:32:35.435384856 -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-01 21:30:11.015365966 -0500
+++ mcleak.stderrB.out 2012-04-01 21:32:53.740725574 -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-01 21:30:11.021365094 -0500
+++ mcmain_pic.stderrB.out 2012-04-01 21:32:55.350491718 -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-01 21:30:11.022364948 -0500
+++ mcvabits.stderrB.out 2012-04-01 21:33:00.190788555 -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-01 21:30:11.021365094 -0500
+++ mssnapshot.stderrB.out 2012-04-01 21:33:03.283339291 -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-01 21:30:12.272183373 -0500
+++ stack_switch.stderr.out 2012-04-01 21:34:04.009517558 -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-01 21:30:12.498150544 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:34:28.054024654 -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-01 21:30:12.465155337 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:34:28.054024654 -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-01 21:30:12.447157950 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:34:28.054024654 -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-01 21:30:12.511148652 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:34:28.054024654 -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-01 21:30:12.445158240 -0500
+++ origin5-bz2.stderr.out 2012-04-01 21:34:28.054024654 -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-02 02:37:03
|
valgrind revision: 12475
VEX revision: 2269
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-02 03:11:10 BST
Ended at 2012-04-02 03:36:41 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
== 613 tests, 9 stderr failures, 1 stdout failure, 5 stderrB failures, 8 stdoutB failures, 0 post failures ==
gdbserver_tests/mcclean_after_fork (stdoutB)
gdbserver_tests/mcinfcallRU (stderr)
gdbserver_tests/mcinfcallWSRU (stderr)
gdbserver_tests/mcinfcallWSRU (stderrB)
gdbserver_tests/mcleak (stdoutB)
gdbserver_tests/mcmain_pic (stdout)
gdbserver_tests/mcmain_pic (stdoutB)
gdbserver_tests/mcmain_pic (stderrB)
gdbserver_tests/mcsignopass (stdoutB)
gdbserver_tests/mcvabits (stderrB)
gdbserver_tests/mcwatchpoints (stderr)
gdbserver_tests/mcwatchpoints (stdoutB)
gdbserver_tests/mssnapshot (stdoutB)
gdbserver_tests/nlcontrolc (stdoutB)
gdbserver_tests/nlpasssigalrm (stdoutB)
gdbserver_tests/nlpasssigalrm (stderrB)
gdbserver_tests/nlsigvgdb (stderrB)
memcheck/tests/err_disable4 (stderr)
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/origin5-bz2 (stderr)
drd/tests/annotate_barrier_xml (stderr)
drd/tests/annotate_trace_memory_xml (stderr)
drd/tests/bar_bad_xml (stderr)
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
ln -f -s ../coregrind/$f.dSYM ../.in_place; \
done
mkdir -p ../.in_place; \
for f in m_gdbserver/32bit-core-valgrind-s1.xml m_gdbserver/32bit-core-valgrind-s2.xml m_gdbserver/32bit-core.xml m_gdbserver/32bit-linux-valgrind-s1.xml m_gdbserver/32bit-linux-valgrind-s2.xml m_gdbserver/32bit-linux.xml m_gdbserver/32bit-sse-valgrind-s1.xml m_gdbserver/32bit-sse-valgrind-s2.xml m_gdbserver/32bit-sse.xml m_gdbserver/64bit-core-valgrind-s1.xml m_gdbserver/64bit-core-valgrind-s2.xml m_gdbserver/64bit-core.xml m_gdbserver/64bit-linux-valgrind-s1.xml m_gdbserver/64bit-linux-valgrind-s2.xml m_gdbserver/64bit-linux.xml m_gdbserver/64bit-sse-valgrind-s1.xml m_gdbserver/64bit-sse-valgrind-s2.xml m_gdbserver/64bit-sse.xml m_gdbserver/amd64-coresse-valgrind.xml m_gdbserver/amd64-linux-valgrind.xml m_gdbserver/arm-core-valgrind-s1.xml m_gdbserver/arm-core-valgrind-s2.xml m_gdbserver/arm-core.xml m_gdbserver/arm-vfpv3-valgrind-s1.xml m_gdbserver/arm-vfpv3-valgrind-s2.xml m_gdbserver/arm-vfpv3.xml m_gdbserver/arm-with-vfpv3-valgrind.xml m_gdbserver/arm-with-vfpv3.xml m_gdbserver/i386-coresse-valgrind.xml m_gdbserver/i386-linux-valgrind.xml m_gdbserver/power64-core-valgrind-s1.xml m_gdbserver/power64-core-valgrind-s2.xml m_gdbserver/power64-core.xml m_gdbserver/power64-linux-valgrind-s1.xml m_gdbserver/power64-linux-valgrind-s2.xml m_gdbserver/power64-linux.xml m_gdbserver/power-altivec-valgrind-s1.xml m_gdbserver/power-altivec-valgrind-s2.xml m_gdbserver/power-altivec.xml m_gdbserver/power-core.xml m_gdbserver/power-fpu-valgrind-s1.xml m_gdbserver/power-fpu-valgrind-s2.xml m_gdbserver/power-fpu.xml m_gdbserver/power-linux-valgrind-s1.xml m_gdbserver/power-linux-valgrind-s2.xml m_gdbserver/power-linux.xml m_gdbserver/powerpc-altivec32l-valgrind.xml m_gdbserver/powerpc-altivec32l.xml m_gdbserver/powerpc-altivec64l-valgrind.xml m_gdbserver/powerpc-altivec64l.xml m_gdbserver/s390-acr-valgrind-s1.xml m_gdbserver/s390-acr-valgrind-s2.xml m_gdbserver/s390-acr.xml m_gdbserver/s390-fpr-valgrind-s1.xml m_gdbserver/s390-fpr-valgrind-s2.xml m_gdbserver/s390-fpr.xml m_gdbserver/s390x-core64-valgrind-s1.xml m_gdbserver/s390x-core64-valgrind-s2.xml m_gdbserver/s390x-core64.xml m_gdbserver/s390x-generic-valgrind.xml m_gdbserver/s390x-generic.xml m_gdbserver/s390x-linux64-valgrind-s1.xml m_gdbserver/s390x-linux64-valgrind-s2.xml m_gdbserver/s390x-linux64.xml; do \
rm -f ../.in_place/$f; \
ln -f -s ../coregrind/$f ../.in_place; \
done
make[4]: Entering directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
test -z "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/bin" || /bin/mkdir -p "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/bin"
make[4]: vfork: Resource temporarily unavailable
test -z "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/lib/valgrind" || /bin/mkdir -p "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/lib/valgrind"
make[4]: vfork: Resource temporarily unavailable
make[4]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old'
make: *** [install] Error 2
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short 2012-04-02 03:15:00.641514287 +0100
--- new.short 2012-04-02 03:36:41.834381968 +0100
***************
*** 3,26 ****
Configuring valgrind ... done
! Building valgrind ... failed
- Last 20 lines of verbose log follow echo
- ln -f -s ../coregrind/$f.dSYM ../.in_place; \
- done
- mkdir -p ../.in_place; \
- for f in m_gdbserver/32bit-core-valgrind-s1.xml m_gdbserver/32bit-core-valgrind-s2.xml m_gdbserver/32bit-core.xml m_gdbserver/32bit-linux-valgrind-s1.xml m_gdbserver/32bit-linux-valgrind-s2.xml m_gdbserver/32bit-linux.xml m_gdbserver/32bit-sse-valgrind-s1.xml m_gdbserver/32bit-sse-valgrind-s2.xml m_gdbserver/32bit-sse.xml m_gdbserver/64bit-core-valgrind-s1.xml m_gdbserver/64bit-core-valgrind-s2.xml m_gdbserver/64bit-core.xml m_gdbserver/64bit-linux-valgrind-s1.xml m_gdbserver/64bit-linux-valgrind-s2.xml m_gdbserver/64bit-linux.xml m_gdbserver/64bit-sse-valgrind-s1.xml m_gdbserver/64bit-sse-valgrind-s2.xml m_gdbserver/64bit-sse.xml m_gdbserver/amd64-coresse-valgrind.xml m_gdbserver/amd64-linux-valgrind.xml m_gdbserver/arm-core-valgrind-s1.xml m_gdbserver/arm-core-valgrind-s2.xml m_gdbserver/arm-core.xml m_gdbserver/arm-vfpv3-valgrind-s1.xml m_gdbserver/arm-vfpv3-valgrind-s2.xml m_gdbserver/arm-vfpv3.xml m_gdbserver/arm-with-vfpv3-valgrind.xml m_gdbserver/arm-with-vfpv3.xml m_gdbserver/i386-coresse-valgrind.xml m_gdbserver/i386-linux-valgrind.xml m_gdbserver/power64-core-valgrind-s1.xml m_gdbserver/power64-core-valgrind-s2.xml m_gdbserver/power64-core.xml m_gdbserver/power64-linux-valgrind-s1.xml m_gdbserver/power64-linux-valgrind-s2.xml m_gdbserver/power64-linux.xml m_gdbserver/power-altivec-valgrind-s1.xml m_gdbserver/power-altivec-valgrind-s2.xml m_gdbserver/power-altivec.xml m_gdbserver/power-core.xml m_gdbserver/power-fpu-valgrind-s1.xml m_gdbserver/power-fpu-valgrind-s2.xml m_gdbserver/power-fpu.xml m_gdbserver/power-linux-valgrind-s1.xml m_gdbserver/power-linux-valgrind-s2.xml m_gdbserver/power-linux.xml m_gdbserver/powerpc-altivec32l-valgrind.xml m_gdbserver/powerpc-altivec32l.xml m_gdbserver/powerpc-altivec64l-valgrind.xml m_gdbserver/powerpc-altivec64l.xml m_gdbserver/s390-acr-valgrind-s1.xml m_gdbserver/s390-acr-valgrind-s2.xml m_gdbserver/s390-acr.xml m_gdbserver/s390-fpr-valgrind-s1.xml m_gdbserver/s390-fpr-valgrind-s2.xml m_gdbserver/s390-fpr.xml m_gdbserver/s390x-core64-valgrind-s1.xml m_gdbserver/s390x-core64-valgrind-s2.xml m_gdbserver/s390x-core64.xml m_gdbserver/s390x-generic-valgrind.xml m_gdbserver/s390x-generic.xml m_gdbserver/s390x-linux64-valgrind-s1.xml m_gdbserver/s390x-linux64-valgrind-s2.xml m_gdbserver/s390x-linux64.xml; do \
- rm -f ../.in_place/$f; \
- ln -f -s ../coregrind/$f ../.in_place; \
- done
- make[4]: Entering directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
- test -z "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/bin" || /bin/mkdir -p "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/bin"
- make[4]: vfork: Resource temporarily unavailable
- test -z "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/lib/valgrind" || /bin/mkdir -p "/tmp/vgtest-14062/2012-04-02/valgrind-old/Inst/lib/valgrind"
- make[4]: vfork: Resource temporarily unavailable
- make[4]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
- make[3]: *** [install-am] Error 2
- make[3]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
- make[2]: *** [install] Error 2
- make[2]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old/coregrind'
- make[1]: *** [install-recursive] Error 1
- make[1]: Leaving directory `/tmp/vgtest-14062/2012-04-02/valgrind-old'
- make: *** [install] Error 2
--- 3,33 ----
Configuring valgrind ... done
! Building valgrind ... done
! Running regression tests ... failed
!
! Regression test results follow
!
! == 613 tests, 9 stderr failures, 1 stdout failure, 5 stderrB failures, 8 stdoutB failures, 0 post failures ==
! gdbserver_tests/mcclean_after_fork (stdoutB)
! gdbserver_tests/mcinfcallRU (stderr)
! gdbserver_tests/mcinfcallWSRU (stderr)
! gdbserver_tests/mcinfcallWSRU (stderrB)
! gdbserver_tests/mcleak (stdoutB)
! gdbserver_tests/mcmain_pic (stdout)
! gdbserver_tests/mcmain_pic (stdoutB)
! gdbserver_tests/mcmain_pic (stderrB)
! gdbserver_tests/mcsignopass (stdoutB)
! gdbserver_tests/mcvabits (stderrB)
! gdbserver_tests/mcwatchpoints (stderr)
! gdbserver_tests/mcwatchpoints (stdoutB)
! gdbserver_tests/mssnapshot (stdoutB)
! gdbserver_tests/nlcontrolc (stdoutB)
! gdbserver_tests/nlpasssigalrm (stdoutB)
! gdbserver_tests/nlpasssigalrm (stderrB)
! gdbserver_tests/nlsigvgdb (stderrB)
! memcheck/tests/err_disable4 (stderr)
! memcheck/tests/linux/stack_switch (stderr)
! memcheck/tests/origin5-bz2 (stderr)
! drd/tests/annotate_barrier_xml (stderr)
! drd/tests/annotate_trace_memory_xml (stderr)
! drd/tests/bar_bad_xml (stderr)
|
|
From: Tom H. <to...@co...> - 2012-04-02 02:34:13
|
valgrind revision: 12475
VEX revision: 2269
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-02 03:30:58 BST
Ended at 2012-04-02 03:33:54 BST
Results differ from 24 hours ago
Checking out valgrind source tree ... done
Configuring valgrind ... done
Building valgrind ... failed
Last 20 lines of verbose log follow echo
/usr/bin/ar cru libreplacemalloc_toolpreload-amd64-linux.a libreplacemalloc_toolpreload_amd64_linux_a-vg_replace_malloc.o
ranlib libreplacemalloc_toolpreload-amd64-linux.a
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVGPV_x86_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"x86-linux\"" -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fpic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o -MD -MP -MF .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Tpo -c -o libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o `test -f 'm_replacemalloc/vg_replace_malloc.c' || echo './'`m_replacemalloc/vg_replace_malloc.c
mv -f .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Tpo .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Po
rm -f libreplacemalloc_toolpreload-x86-linux.a
/usr/bin/ar cru libreplacemalloc_toolpreload-x86-linux.a libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o
ranlib libreplacemalloc_toolpreload-x86-linux.a
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"amd64-linux\"" -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT valgrind-launcher-linux.o -MD -MP -MF .deps/valgrind-launcher-linux.Tpo -c -o valgrind-launcher-linux.o `test -f 'launcher-linux.c' || echo './'`launcher-linux.c
mv -f .deps/valgrind-launcher-linux.Tpo .deps/valgrind-launcher-linux.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"amd64-linux\"" -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT valgrind-m_debuglog.o -MD -MP -MF .deps/valgrind-m_debuglog.Tpo -c -o valgrind-m_debuglog.o `test -f 'm_debuglog.c' || echo './'`m_debuglog.c
mv -f .deps/valgrind-m_debuglog.Tpo .deps/valgrind-m_debuglog.Po
gcc -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -o valgrind valgrind-launcher-linux.o valgrind-m_debuglog.o
collect2: vfork: Resource temporarily unavailable
make[3]: *** [valgrind] Error 1
make[3]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new/coregrind'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new/coregrind'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new'
make: *** [all] Error 2
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... failed
Last 20 lines of verbose log follow echo
A valgrind-old/VEX/orig_ppc32/return0.orig
A valgrind-old/VEX/Makefile-gcc
A valgrind-old/VEX/auxprogs
A valgrind-old/VEX/auxprogs/genoffsets.c
A valgrind-old/VEX/Makefile-icc
A valgrind-old/VEX/test_main.h
A valgrind-old/VEX/quote.txt
A valgrind-old/VEX/LICENSE.README
U valgrind-old/VEX
Checked out external at revision 2269.
Checked out revision 12473.
At revision 2269.
Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31904/2012-04-02/valgrind-old/Inst
running: aclocal
./autogen.sh: fork: retry: Resource temporarily unavailable
./autogen.sh: fork: retry: Resource temporarily unavailable
./autogen.sh: fork: retry: Resource temporarily unavailable
./autogen.sh: fork: retry: Resource temporarily unavailable
./autogen.sh: fork: Resource temporarily unavailable
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short 2012-04-02 03:31:27.282979586 +0100
--- new.short 2012-04-02 03:33:54.994881375 +0100
***************
*** 2,25 ****
Checking out valgrind source tree ... done
! Configuring valgrind ... failed
Last 20 lines of verbose log follow echo
! A valgrind-old/VEX/orig_ppc32/return0.orig
! A valgrind-old/VEX/Makefile-gcc
! A valgrind-old/VEX/auxprogs
! A valgrind-old/VEX/auxprogs/genoffsets.c
! A valgrind-old/VEX/Makefile-icc
! A valgrind-old/VEX/test_main.h
! A valgrind-old/VEX/quote.txt
! A valgrind-old/VEX/LICENSE.README
! U valgrind-old/VEX
! Checked out external at revision 2269.
!
! Checked out revision 12473.
! At revision 2269.
! Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31904/2012-04-02/valgrind-old/Inst
! running: aclocal
! ./autogen.sh: fork: retry: Resource temporarily unavailable
! ./autogen.sh: fork: retry: Resource temporarily unavailable
! ./autogen.sh: fork: retry: Resource temporarily unavailable
! ./autogen.sh: fork: retry: Resource temporarily unavailable
! ./autogen.sh: fork: Resource temporarily unavailable
--- 2,26 ----
Checking out valgrind source tree ... done
! Configuring valgrind ... done
! Building valgrind ... failed
Last 20 lines of verbose log follow echo
! /usr/bin/ar cru libreplacemalloc_toolpreload-amd64-linux.a libreplacemalloc_toolpreload_amd64_linux_a-vg_replace_malloc.o
! ranlib libreplacemalloc_toolpreload-amd64-linux.a
! gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -DVGPV_x86_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"x86-linux\"" -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -fpic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o -MD -MP -MF .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Tpo -c -o libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o `test -f 'm_replacemalloc/vg_replace_malloc.c' || echo './'`m_replacemalloc/vg_replace_malloc.c
! mv -f .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Tpo .deps/libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.Po
! rm -f libreplacemalloc_toolpreload-x86-linux.a
! /usr/bin/ar cru libreplacemalloc_toolpreload-x86-linux.a libreplacemalloc_toolpreload_x86_linux_a-vg_replace_malloc.o
! ranlib libreplacemalloc_toolpreload-x86-linux.a
! gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"amd64-linux\"" -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT valgrind-launcher-linux.o -MD -MP -MF .deps/valgrind-launcher-linux.Tpo -c -o valgrind-launcher-linux.o `test -f 'launcher-linux.c' || echo './'`launcher-linux.c
! mv -f .deps/valgrind-launcher-linux.Tpo .deps/valgrind-launcher-linux.Po
! gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_linux=1 -DVGP_amd64_linux=1 -DVGPV_amd64_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/tmp/vgtest-31904/2012-04-02/valgrind-new/Inst/lib/valgrind"\" -DVG_PLATFORM="\"amd64-linux\"" -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT valgrind-m_debuglog.o -MD -MP -MF .deps/valgrind-m_debuglog.Tpo -c -o valgrind-m_debuglog.o `test -f 'm_debuglog.c' || echo './'`m_debuglog.c
! mv -f .deps/valgrind-m_debuglog.Tpo .deps/valgrind-m_debuglog.Po
! gcc -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -Wno-long-long -Wno-pointer-sign -fno-stack-protector -m64 -fomit-frame-pointer -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -o valgrind valgrind-launcher-linux.o valgrind-m_debuglog.o
! collect2: vfork: Resource temporarily unavailable
! make[3]: *** [valgrind] Error 1
! make[3]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new/coregrind'
! make[2]: *** [all] Error 2
! make[2]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new/coregrind'
! make[1]: *** [all-recursive] Error 1
! make[1]: Leaving directory `/tmp/vgtest-31904/2012-04-02/valgrind-new'
! make: *** [all] Error 2
|
|
From: Tom H. <to...@co...> - 2012-04-02 02:23:30
|
valgrind revision: VEX revision: C compiler: Assembler: 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-02 03:21:04 BST Ended at 2012-04-02 03:22:03 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... failed Last 20 lines of verbose log follow echo A valgrind-new/VEX/orig_ppc32/return0.orig A valgrind-new/VEX/Makefile-gcc A valgrind-new/VEX/auxprogs A valgrind-new/VEX/auxprogs/genoffsets.c A valgrind-new/VEX/Makefile-icc A valgrind-new/VEX/test_main.h A valgrind-new/VEX/quote.txt A valgrind-new/VEX/LICENSE.README U valgrind-new/VEX Checked out external at revision 2269. Checked out revision 12475. At revision 2269. Configuring valgrind ... cd valgrind-new && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31185/2012-04-02/valgrind-new/Inst running: aclocal ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: Resource temporarily unavailable ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... failed Last 20 lines of verbose log follow echo A valgrind-old/VEX/LICENSE.README U valgrind-old/VEX Checked out external at revision 2269. Checked out revision 12473. At revision 2269. Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31185/2012-04-02/valgrind-old/Inst running: aclocal ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable ./autogen.sh: fork: retry: Resource temporarily unavailable sh: fork: retry: Resource temporarily unavailable sh: fork: retry: Resource temporarily unavailable sh: fork: retry: Resource temporarily unavailable sh: fork: retry: Resource temporarily unavailable sh: fork: Resource temporarily unavailable autom4te: need GNU m4 1.4 or later: /usr/bin/m4 aclocal: autom4te failed with exit status: 1 error: while running 'aclocal' ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2012-04-02 03:21:42.818151989 +0100 --- new.short 2012-04-02 03:22:03.041727097 +0100 *************** *** 5,13 **** Last 20 lines of verbose log follow echo ! A valgrind-old/VEX/LICENSE.README ! U valgrind-old/VEX Checked out external at revision 2269. ! Checked out revision 12473. At revision 2269. ! Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31185/2012-04-02/valgrind-old/Inst running: aclocal --- 5,20 ---- Last 20 lines of verbose log follow echo ! A valgrind-new/VEX/orig_ppc32/return0.orig ! A valgrind-new/VEX/Makefile-gcc ! A valgrind-new/VEX/auxprogs ! A valgrind-new/VEX/auxprogs/genoffsets.c ! A valgrind-new/VEX/Makefile-icc ! A valgrind-new/VEX/test_main.h ! A valgrind-new/VEX/quote.txt ! A valgrind-new/VEX/LICENSE.README ! U valgrind-new/VEX Checked out external at revision 2269. ! Checked out revision 12475. At revision 2269. ! Configuring valgrind ... cd valgrind-new && ./autogen.sh && ./configure --prefix=/tmp/vgtest-31185/2012-04-02/valgrind-new/Inst running: aclocal *************** *** 17,25 **** ./autogen.sh: fork: retry: Resource temporarily unavailable ! sh: fork: retry: Resource temporarily unavailable ! sh: fork: retry: Resource temporarily unavailable ! sh: fork: retry: Resource temporarily unavailable ! sh: fork: retry: Resource temporarily unavailable ! sh: fork: Resource temporarily unavailable ! autom4te: need GNU m4 1.4 or later: /usr/bin/m4 ! aclocal: autom4te failed with exit status: 1 ! error: while running 'aclocal' --- 24,25 ---- ./autogen.sh: fork: retry: Resource temporarily unavailable ! ./autogen.sh: fork: Resource temporarily unavailable |
|
From: Tom H. <to...@co...> - 2012-04-02 02:15:39
|
valgrind revision: 12475 VEX revision: 2269 C compiler: gcc (GCC) 4.7.0 20120315 (Red Hat 4.7.0-0.20) 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-02 02:40:49 BST Ended at 2012-04-02 03:15:14 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 == 613 tests, 13 stderr failures, 1 stdout failure, 4 stderrB failures, 6 stdoutB failures, 0 post failures == gdbserver_tests/mcclean_after_fork (stdoutB) gdbserver_tests/mchelp (stdoutB) gdbserver_tests/mchelp (stderrB) gdbserver_tests/mcinfcallRU (stderr) gdbserver_tests/mcinfcallWSRU (stderr) gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/mcinvokeRU (stdoutB) gdbserver_tests/mcinvokeRU (stderrB) gdbserver_tests/mcinvokeWS (stdoutB) gdbserver_tests/mcinvokeWS (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_barrier3 (stderr) drd/tests/pth_cancel_locked (stderr) exp-sgcheck/tests/preen_invars (stdout) exp-sgcheck/tests/preen_invars (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 == 613 tests, 14 stderr failures, 1 stdout failure, 4 stderrB failures, 5 stdoutB failures, 0 post failures == gdbserver_tests/mchelp (stdoutB) gdbserver_tests/mchelp (stderrB) gdbserver_tests/mcinfcallRU (stderr) gdbserver_tests/mcinfcallWSRU (stderr) gdbserver_tests/mcinfcallWSRU (stderrB) gdbserver_tests/mcinvokeRU (stdoutB) gdbserver_tests/mcinvokeRU (stderrB) gdbserver_tests/mcinvokeWS (stdoutB) gdbserver_tests/mcinvokeWS (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) helgrind/tests/pth_barrier3 (stderr) drd/tests/bar_bad (stderr) drd/tests/bar_bad_xml (stderr) drd/tests/pth_barrier3 (stderr) drd/tests/pth_cancel_locked (stderr) exp-sgcheck/tests/preen_invars (stdout) exp-sgcheck/tests/preen_invars (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2012-04-02 02:57:35.207366110 +0100 --- new.short 2012-04-02 03:15:14.620220096 +0100 *************** *** 8,10 **** ! == 613 tests, 14 stderr failures, 1 stdout failure, 4 stderrB failures, 5 stdoutB failures, 0 post failures == gdbserver_tests/mchelp (stdoutB) --- 8,11 ---- ! == 613 tests, 13 stderr failures, 1 stdout failure, 4 stderrB failures, 6 stdoutB failures, 0 post failures == ! gdbserver_tests/mcclean_after_fork (stdoutB) gdbserver_tests/mchelp (stdoutB) *************** *** 26,28 **** none/tests/process_vm_readv_writev (stderr) - helgrind/tests/pth_barrier3 (stderr) drd/tests/bar_bad (stderr) --- 27,28 ---- |
|
From: Christian B. <bor...@de...> - 2012-04-02 02:14:28
|
valgrind revision: 12475 VEX revision: 2269 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-02 03:45:01 CEST Ended at 2012-04-02 04:13:53 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 == 526 tests, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/test-plo-yes (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) drd/tests/tc04_free_lock (stderr) drd/tests/tc09_bad_unlock (stderr) |
|
From: Christian B. <bor...@de...> - 2012-04-02 02:05:59
|
valgrind revision: 12475 VEX revision: 2269 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-02 03:45:01 CEST Ended at 2012-04-02 04:05:27 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, 5 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures == memcheck/tests/test-plo-yes (stderr) 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-02 02:03:32
|
valgrind revision: 12475 VEX revision: 2269 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-02 03:02:20 BST Ended at 2012-04-02 03:03:19 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... failed Last 20 lines of verbose log follow echo A valgrind-new/VEX/orig_ppc32/return0.orig A valgrind-new/VEX/Makefile-gcc A valgrind-new/VEX/auxprogs A valgrind-new/VEX/auxprogs/genoffsets.c A valgrind-new/VEX/Makefile-icc A valgrind-new/VEX/test_main.h A valgrind-new/VEX/quote.txt A valgrind-new/VEX/LICENSE.README U valgrind-new/VEX Checked out external at revision 2269. Checked out revision 12475. At revision 2269. Configuring valgrind ... cd valgrind-new && ./autogen.sh && ./configure --prefix=/tmp/vgtest-11098/2012-04-02/valgrind-new/Inst running: aclocal ./autogen.sh: fork: retry: No child processes ./autogen.sh: fork: retry: No child processes ./autogen.sh: fork: retry: No child processes ./autogen.sh: fork: retry: No child processes ./autogen.sh: fork: Resource temporarily unavailable ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... failed Last 20 lines of verbose log follow echo A valgrind-old/VEX/auxprogs/genoffsets.c A valgrind-old/VEX/Makefile-icc A valgrind-old/VEX/test_main.h A valgrind-old/VEX/quote.txt A valgrind-old/VEX/LICENSE.README U valgrind-old/VEX Checked out external at revision 2269. Checked out revision 12473. At revision 2269. Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-11098/2012-04-02/valgrind-old/Inst running: aclocal sh: fork: retry: Resource temporarily unavailable sh: fork: retry: No child processes sh: fork: retry: No child processes sh: fork: retry: No child processes sh: fork: Resource temporarily unavailable autom4te: need GNU m4 1.4 or later: /usr/bin/m4 aclocal: autom4te failed with exit status: 1 error: while running 'aclocal' ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2012-04-02 03:02:59.604485516 +0100 --- new.short 2012-04-02 03:03:19.929308070 +0100 *************** *** 5,25 **** Last 20 lines of verbose log follow echo ! A valgrind-old/VEX/auxprogs/genoffsets.c ! A valgrind-old/VEX/Makefile-icc ! A valgrind-old/VEX/test_main.h ! A valgrind-old/VEX/quote.txt ! A valgrind-old/VEX/LICENSE.README ! U valgrind-old/VEX Checked out external at revision 2269. ! Checked out revision 12473. At revision 2269. ! Configuring valgrind ... cd valgrind-old && ./autogen.sh && ./configure --prefix=/tmp/vgtest-11098/2012-04-02/valgrind-old/Inst running: aclocal ! sh: fork: retry: Resource temporarily unavailable ! sh: fork: retry: No child processes ! sh: fork: retry: No child processes ! sh: fork: retry: No child processes ! sh: fork: Resource temporarily unavailable ! autom4te: need GNU m4 1.4 or later: /usr/bin/m4 ! aclocal: autom4te failed with exit status: 1 ! error: while running 'aclocal' --- 5,25 ---- Last 20 lines of verbose log follow echo ! A valgrind-new/VEX/orig_ppc32/return0.orig ! A valgrind-new/VEX/Makefile-gcc ! A valgrind-new/VEX/auxprogs ! A valgrind-new/VEX/auxprogs/genoffsets.c ! A valgrind-new/VEX/Makefile-icc ! A valgrind-new/VEX/test_main.h ! A valgrind-new/VEX/quote.txt ! A valgrind-new/VEX/LICENSE.README ! U valgrind-new/VEX Checked out external at revision 2269. ! Checked out revision 12475. At revision 2269. ! Configuring valgrind ... cd valgrind-new && ./autogen.sh && ./configure --prefix=/tmp/vgtest-11098/2012-04-02/valgrind-new/Inst running: aclocal ! ./autogen.sh: fork: retry: No child processes ! ./autogen.sh: fork: retry: No child processes ! ./autogen.sh: fork: retry: No child processes ! ./autogen.sh: fork: retry: No child processes ! ./autogen.sh: fork: Resource temporarily unavailable |