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
(10) |
2
(22) |
3
(15) |
4
(14) |
5
(8) |
6
(10) |
7
(14) |
|
8
(9) |
9
(10) |
10
(21) |
11
(16) |
12
(17) |
13
(15) |
14
(8) |
|
15
(12) |
16
(8) |
17
(44) |
18
(24) |
19
(29) |
20
(29) |
21
(17) |
|
22
(17) |
23
(16) |
24
(18) |
25
(16) |
26
(15) |
27
(16) |
28
(11) |
|
29
(11) |
30
(10) |
31
(12) |
|
|
|
|
|
From: <sv...@va...> - 2006-01-12 21:15:40
|
Author: sewardj
Date: 2006-01-12 21:15:35 +0000 (Thu, 12 Jan 2006)
New Revision: 5523
Log:
Fix more ppc64-linux function wrapping and symbol-table bits and pieces.
Modified:
trunk/coregrind/m_debuginfo/symtab.c
trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
trunk/coregrind/m_main.c
trunk/coregrind/m_redir.c
trunk/coregrind/m_scheduler/scheduler.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/m_trampoline.S
trunk/coregrind/pub_core_trampoline.h
trunk/include/valgrind.h
Modified: trunk/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtab.c 2006-01-12 14:04:46 UTC (rev 552=
2)
+++ trunk/coregrind/m_debuginfo/symtab.c 2006-01-12 21:15:35 UTC (rev 552=
3)
@@ -1106,20 +1106,38 @@
(ppc64-linux=
only) */
/*OUT*/Addr* sym_addr_really )
{
+ Bool plausible;
+
/* Set default real address for the symbol. */
*sym_addr_really =3D sym_addr;
=20
- /* Figure out if we're interested in the symbol.
- Firstly, is it of the right flavour? */
- if ( ! ( (ELFXX_ST_BIND(sym->st_info) =3D=3D STB_GLOBAL ||
- ELFXX_ST_BIND(sym->st_info) =3D=3D STB_LOCAL ||
- ELFXX_ST_BIND(sym->st_info) =3D=3D STB_WEAK)
- &&
- (ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_FUNC ||
- (VG_(needs).data_syms=20
- && ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_OBJECT))
- )
- )
+ /* Figure out if we're interested in the symbol. Firstly, is it of
+ the right flavour? */
+ plausible=20
+ =3D (ELFXX_ST_BIND(sym->st_info) =3D=3D STB_GLOBAL=20
+ || ELFXX_ST_BIND(sym->st_info) =3D=3D STB_LOCAL=20
+ || ELFXX_ST_BIND(sym->st_info) =3D=3D STB_WEAK
+ )
+ &&
+ (ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_FUNC=20
+ || (VG_(needs).data_syms=20
+ && ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_OBJECT)
+ );
+
+# if defined(VGP_ppc64_linux)
+ /* Allow STT_NOTYPE in the very special case where we're running on
+ ppc64-linux and the symbol is one which the .opd-chasing hack
+ below will chase. */
+ if (!plausible
+ && ELFXX_ST_TYPE(sym->st_info) =3D=3D STT_NOTYPE
+ && sym->st_size > 0
+ && si->opd_start_vma !=3D 0
+ && sym_addr >=3D si->opd_start_vma
+ && sym_addr < si->opd_start_vma + si->opd_size)
+ plausible =3D True;
+# endif
+
+ if (!plausible)
return False;
=20
/* Secondly, if it's apparently in a GOT or PLT, it's really
@@ -1287,7 +1305,8 @@
} =20
=20
// Record interesting symbols in our symtab.
- if ( is_interesting_symbol(si, sym, sym_name, sym_addr, opd_filea,=
&sym_addr_really) ) {
+ if ( is_interesting_symbol(si, sym, sym_name, sym_addr,=20
+ opd_filea, &sym_addr_really) ) {
vg_assert(sym->st_name !=3D 0);
vg_assert(sym_name[0] !=3D 0);
# if defined(VGP_ppc64_linux)
@@ -1299,12 +1318,30 @@
vg_assert(sym_addr_really + sym->st_size <=3D si->opd_start_vma
|| sym_addr_really >=3D si->opd_start_vma + si->opd_s=
ize);
# endif
+# if defined(VGP_ppc64_linux)
+ /* Another ppc64-linux kludge, for the pre-"dotless" ABI
+ (prior to gcc 4.0.0). If the symbol to be added has a
+ leading dot and it wasn't derived via an indirect through
+ .opd, remove the dot before adding it. */
+ if (sym_addr_really =3D=3D sym_addr && sym_name[0] =3D=3D '.')
+ sym_name++;
+# endif
+
name =3D ML_(addStr) ( si, sym_name, -1 );
vg_assert(name !=3D NULL);
+
risym.addr =3D sym_addr_really;
risym.size =3D sym->st_size;
risym.name =3D name;
addSym ( si, &risym );
+
+ if (VG_(clo_trace_symtab))
+ VG_(printf)(" record [%d]: "
+ " value %p, size %d, name %s\n",
+ i, (void*)risym.addr, (Int)risym.size,=20
+ (HChar*)risym.name
+ );
+
}
}
}
Modified: trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2006-01-12 14:04:46=
UTC (rev 5522)
+++ trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2006-01-12 21:15:35=
UTC (rev 5523)
@@ -562,7 +562,6 @@
2: output: next guest PC
3: output: guest state pointer afterwards (=3D=3D thread return co=
de)
*/
-.align 16
.global VG_(run_a_noredir_translation)
VG_(run_a_noredir_translation):
/* save callee-save int regs, & lr */
Modified: trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2006-01-12 14:04:46=
UTC (rev 5522)
+++ trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2006-01-12 21:15:35=
UTC (rev 5523)
@@ -52,7 +52,10 @@
.tc vgPlain_machine_ppc64_has_VMX[TC],vgPlain_machine_ppc64_has_=
VMX
=20
/*------------------------------------------------------------*/
-/*--- The dispatch loop. ---*/
+/*--- ---*/
+/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
+/*--- run all translations except no-redir ones. ---*/
+/*--- ---*/
/*------------------------------------------------------------*/
=20
/*----------------------------------------------------*/
@@ -570,6 +573,95 @@
blr
=20
=20
+/*------------------------------------------------------------*/
+/*--- ---*/
+/*--- A special dispatcher, for running no-redir ---*/
+/*--- translations. Just runs the given translation once. ---*/
+/*--- ---*/
+/*------------------------------------------------------------*/
+
+/* signature:
+void VG_(run_a_noredir_translation) ( UWord* argblock );
+*/
+
+/* Run a no-redir translation. argblock points to 4 UWords, 2 to carry =
args
+ and 2 to carry results:
+ 0: input: ptr to translation
+ 1: input: ptr to guest state
+ 2: output: next guest PC
+ 3: output: guest state pointer afterwards (=3D=3D thread return co=
de)
+*/
+.section ".text"
+.align 2
+.globl VG_(run_a_noredir_translation)
+.section ".opd","aw"
+.align 3
+VG_(run_a_noredir_translation):
+.quad .VG_(run_a_noredir_translation),.TOC.@tocbase,0
+.previous
+.type .VG_(run_a_noredir_translation),@function
+.globl .VG_(run_a_noredir_translation)
+.VG_(run_a_noredir_translation):
+ /* save callee-save int regs, & lr */
+ stdu 1,-512(1)
+ std 14,256(1)
+ std 15,264(1)
+ std 16,272(1)
+ std 17,280(1)
+ std 18,288(1)
+ std 19,296(1)
+ std 20,304(1)
+ std 21,312(1)
+ std 22,320(1)
+ std 23,328(1)
+ std 24,336(1)
+ std 25,344(1)
+ std 26,352(1)
+ std 27,360(1)
+ std 28,368(1)
+ std 29,376(1)
+ std 30,384(1)
+ std 31,392(1)
+ mflr 31
+ std 31,400(1)
+ std 2,408(1) /* also preserve R2, just in case .. */
+
+ stw 3,416(1)
+ lwz 31,8(3)
+ lwz 30,0(3)
+ mtlr 30
+ blrl
+
+ lwz 4,416(1)
+ stw 3, 16(4)
+ stw 31,24(4)
+
+ ld 14,256(1)
+ ld 15,264(1)
+ ld 16,272(1)
+ ld 17,280(1)
+ ld 18,288(1)
+ ld 19,296(1)
+ ld 20,304(1)
+ ld 21,312(1)
+ ld 22,320(1)
+ ld 23,328(1)
+ ld 24,336(1)
+ ld 25,344(1)
+ ld 26,352(1)
+ ld 27,360(1)
+ ld 28,368(1)
+ ld 29,376(1)
+ ld 30,384(1)
+ ld 31,400(1)
+ mtlr 31
+ ld 31,392(1)
+ ld 2,408(1) /* also preserve R2, just in case .. */
+
+ addi 1,1,512
+ blr
+
+
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
=20
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2006-01-12 14:04:46 UTC (rev 5522)
+++ trunk/coregrind/m_main.c 2006-01-12 21:15:35 UTC (rev 5523)
@@ -2399,12 +2399,8 @@
// p: aspacem
//--------------------------------------------------------------
{ Bool change_ownership_v_c_OK;
- Addr co_start =3D VG_PGROUNDDN(=20
- (Addr)VG_(fnptr_to_fnentry)(=20
- &VG_(trampoline_stuff_start) ) );
- Addr co_endPlus =3D VG_PGROUNDUP(=20
- (Addr)VG_(fnptr_to_fnentry)(=20
- &VG_(trampoline_stuff_end) ) );
+ Addr co_start =3D VG_PGROUNDDN( (Addr)&VG_(trampoline_stuff_start=
) );
+ Addr co_endPlus =3D VG_PGROUNDUP( (Addr)&VG_(trampoline_stuff_end) =
);
VG_(debugLog)(1,"redir",
"transfer ownership V -> C of 0x%llx .. 0x%llx\n",
(ULong)co_start, (ULong)co_endPlus-1 );
@@ -2703,8 +2699,11 @@
"Caught __NR_exit; running __libc_freeres()");
=20
/* set thread context to point to libc_freeres_wrapper */
+ /* ppc64-linux note: __libc_freeres_wrapper gives us the real
+ function entry point, not a fn descriptor, so can use it
+ directly. However, we need to set R2 (the toc pointer)
+ appropriately. */
VG_(set_IP)(tid, __libc_freeres_wrapper);
- // XXX should we use a special stack?
=20
/* Block all blockable signals by copying the real block state into
the thread's block state*/
Modified: trunk/coregrind/m_redir.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_redir.c 2006-01-12 14:04:46 UTC (rev 5522)
+++ trunk/coregrind/m_redir.c 2006-01-12 21:15:35 UTC (rev 5523)
@@ -767,11 +767,16 @@
the start, otherwise ld.so makes a lot of noise. */
if (0=3D=3DVG_(strcmp)("Memcheck", VG_(details).name)) {
=20
- add_redirect_sym_to_addr(
- "soname:ld64.so.1", "strlen",
+ add_hardwired_spec(
+ "ld64.so.1", "strlen",
(Addr)VG_(fnptr_to_fnentry)( &VG_(ppc64_linux_REDIR_FOR_strlen)=
)
); =20
=20
+ add_hardwired_spec(
+ "ld64.so.1", "index",
+ (Addr)VG_(fnptr_to_fnentry)( &VG_(ppc64_linux_REDIR_FOR_strchr)=
)
+ ); =20
+
}
=20
# else
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 14:04:46 UTC (rev =
5522)
+++ trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 21:15:35 UTC (rev =
5523)
@@ -522,7 +522,7 @@
static UInt run_thread_for_a_while ( ThreadId tid )
{
volatile Int jumped;
- volatile ThreadState* tst;=20
+ volatile ThreadState* tst =3D NULL; /* stop gcc complaining */
volatile UInt trc;
volatile Int dispatch_ctr_SAVED;
volatile Int done_this_time;
Modified: trunk/coregrind/m_stacktrace.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_stacktrace.c 2006-01-12 14:04:46 UTC (rev 5522)
+++ trunk/coregrind/m_stacktrace.c 2006-01-12 21:15:35 UTC (rev 5523)
@@ -389,8 +389,10 @@
mybuf[MYBUF_LEN-1] =3D 0; // paranoia
if ( VG_STREQ("main", mybuf)
# if defined(VGO_linux)
- || VG_STREQ("__libc_start_main", mybuf) // glibc glibness
- || VG_STREQ("generic_start_main", mybuf) // Yellow Dog dog=
gedness
+ || VG_STREQ("__libc_start_main", mybuf) // glibc glibnes=
s
+ || VG_STREQ("generic_start_main", mybuf) // Yellow Dog do=
ggedness
+ || VG_STREQ(".__libc_start_main", mybuf) // ppc64 dottyne=
ss
+ || VG_STREQ(".generic_start_main", mybuf) // ditto
# endif
)
main_done =3D True;
Modified: trunk/coregrind/m_trampoline.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_trampoline.S 2006-01-12 14:04:46 UTC (rev 5522)
+++ trunk/coregrind/m_trampoline.S 2006-01-12 21:15:35 UTC (rev 5523)
@@ -299,25 +299,21 @@
/* a leading page of unexecutable code */
UD2_PAGE
=20
-.align 2
.global VG_(trampoline_stuff_start)
-.section ".opd","aw"
-.align 3
VG_(trampoline_stuff_start):
-.quad .VG_(trampoline_stuff_start),.TOC.@tocbase,0
-.previous
-.type .VG_(trampoline_stuff_start),@function
-.global .VG_(trampoline_stuff_start)
-.VG_(trampoline_stuff_start):
=20
-.align 2
-.globl VG_(ppc64_linux_REDIR_FOR_strlen)
-.section ".opd","aw"
-.align 3
+ /* this function is written using the "dotless" ABI convention */
+ .align 2
+ .globl VG_(ppc64_linux_REDIR_FOR_strlen)
+ .section ".opd","aw"
+ .align 3
VG_(ppc64_linux_REDIR_FOR_strlen):
-.quad .L.VG_(ppc64_linux_REDIR_FOR_strlen),.TOC.@tocbase
-.previous
-.type VG_(ppc64_linux_REDIR_FOR_strlen), @function
+ .quad .L.VG_(ppc64_linux_REDIR_FOR_strlen),.TOC.@tocbase,0
+ .previous
+ .size VG_(ppc64_linux_REDIR_FOR_strlen), \
+ .L0end-.L.VG_(ppc64_linux_REDIR_FOR_strlen)
+ .type VG_(ppc64_linux_REDIR_FOR_strlen), @function
+
.L.VG_(ppc64_linux_REDIR_FOR_strlen):
mr 9,3
lbz 0,0(3)
@@ -325,27 +321,51 @@
cmpwi 7,0,0
beqlr 7
li 3,0
-.L5:
+.L01:
addi 0,3,1
extsw 3,0
lbzx 0,9,3
cmpwi 7,0,0
- bne 7,.L5
+ bne 7,.L01
blr
.long 0
.byte 0,0,0,0,0,0,0,0
- .size VG_(ppc64_linux_REDIR_FOR_strlen),.-.L.VG_(ppc64_linux_R=
EDIR_FOR_strlen)
+.L0end:
=20
-.align 2
+ /* this function is written using the "dotless" ABI convention *=
/
+ .align 2
+ .globl VG_(ppc64_linux_REDIR_FOR_strchr)
+ .section ".opd","aw"
+ .align 3
+VG_(ppc64_linux_REDIR_FOR_strchr):
+ .quad .L.VG_(ppc64_linux_REDIR_FOR_strchr),.TOC.@tocbase,0
+ .previous
+ .size VG_(ppc64_linux_REDIR_FOR_strchr), \
+ .L1end-.L.VG_(ppc64_linux_REDIR_FOR_strchr)
+ .type VG_(ppc64_linux_REDIR_FOR_strchr),@function
+=09
+.L.VG_(ppc64_linux_REDIR_FOR_strchr):
+ rldicl 4,4,0,56
+ li 9,0
+.L11:
+ lbz 0,0(3)
+ cmpw 7,0,4
+ bne+ 7,.L12
+ mr 9,3
+.L12:
+ lbz 0,0(3)
+ addi 3,3,1
+ cmpwi 7,0,0
+ bne+ 7,.L11
+ mr 3,9
+ blr
+ .long 0
+ .byte 0,0,0,0,0,0,0,0
+.L1end:
+
+=09
.global VG_(trampoline_stuff_end)
-.section ".opd","aw"
-.align 3
VG_(trampoline_stuff_end):
-.quad .VG_(trampoline_stuff_end),.TOC.@tocbase,0
-.previous
-.type .VG_(trampoline_stuff_end),@function
-.global .VG_(trampoline_stuff_end)
-.VG_(trampoline_stuff_end):
=20
/* and a trailing page of unexecutable code */
UD2_PAGE
Modified: trunk/coregrind/pub_core_trampoline.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/pub_core_trampoline.h 2006-01-12 14:04:46 UTC (rev 55=
22)
+++ trunk/coregrind/pub_core_trampoline.h 2006-01-12 21:15:35 UTC (rev 55=
23)
@@ -68,6 +68,7 @@
=20
#if defined(VGP_ppc64_linux)
extern UInt VG_(ppc64_linux_REDIR_FOR_strlen)( void* );
+extern void* VG_(ppc64_linux_REDIR_FOR_strchr)( void*, Int );
#endif
=20
#endif // __PUB_CORE_TRAMPOLINE_H
Modified: trunk/include/valgrind.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/valgrind.h 2006-01-12 14:04:46 UTC (rev 5522)
+++ trunk/include/valgrind.h 2006-01-12 21:15:35 UTC (rev 5523)
@@ -163,7 +163,7 @@
#if defined(ARCH_x86)
#define __SPECIAL_INSTRUCTION_PREAMBLE \
"roll $3, %%edi ; roll $13, %%edi\n\t" \
- "roll $29, %%edi ; roll $19, %%edi\n\t" \
+ "roll $29, %%edi ; roll $19, %%edi\n\t"
=20
#define VALGRIND_DO_CLIENT_REQUEST( \
_zzq_rlval, _zzq_default, _zzq_request, \
@@ -208,7 +208,7 @@
#if defined(ARCH_amd64)
#define __SPECIAL_INSTRUCTION_PREAMBLE \
"rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \
- "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" \
+ "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
=20
#define VALGRIND_DO_CLIENT_REQUEST( \
_zzq_rlval, _zzq_default, _zzq_request, \
@@ -253,15 +253,15 @@
#if defined(ARCH_ppc32)
#define __SPECIAL_INSTRUCTION_PREAMBLE \
"rlwinm 0,0,3,0,0 ; rlwinm 0,0,13,0,0\n\t" \
- "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t" \
+ "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t"
=20
#define VALGRIND_DO_CLIENT_REQUEST( \
_zzq_rlval, _zzq_default, _zzq_request, \
_zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4) \
\
- { volatile unsigned int _zzq_args[5]; \
- register unsigned int _zzq_result __asm__("r3"); \
- register volatile unsigned int *_zzq_ptr __asm__("r4"); \
+ { unsigned int _zzq_args[5]; \
+ register unsigned int _zzq_result __asm__("r3"); \
+ register unsigned int* _zzq_ptr __asm__("r4"); \
_zzq_args[0] =3D (unsigned int)(_zzq_request); \
_zzq_args[1] =3D (unsigned int)(_zzq_arg1); \
_zzq_args[2] =3D (unsigned int)(_zzq_arg2); \
@@ -298,30 +298,49 @@
/* --------------------------- ppc64 --------------------------- */
=20
#if defined(ARCH_ppc64)
+#define __SPECIAL_INSTRUCTION_PREAMBLE \
+ "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \
+ "rotldi 0,0,61 ; rotldi 0,0,51\n\t"
+
#define VALGRIND_DO_CLIENT_REQUEST( \
_zzq_rlval, _zzq_default, _zzq_request, \
_zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4) \
\
- { volatile unsigned long long int _zzq_args[5]; \
- register unsigned long long int _zzq_tmp __asm__("r3"); \
- register volatile unsigned long long int *_zzq_ptr __asm__("r4"); \
- _zzq_args[0] =3D (volatile unsigned long long int)(_zzq_request); =
\
- _zzq_args[1] =3D (volatile unsigned long long int)(_zzq_arg1); \
- _zzq_args[2] =3D (volatile unsigned long long int)(_zzq_arg2); \
- _zzq_args[3] =3D (volatile unsigned long long int)(_zzq_arg3); \
- _zzq_args[4] =3D (volatile unsigned long long int)(_zzq_arg4); \
+ { unsigned long long int _zzq_args[5]; \
+ register unsigned long long int _zzq_result __asm__("r3"); \
+ register unsigned long long int* _zzq_ptr __asm__("r4"); \
+ _zzq_args[0] =3D (unsigned long long int)(_zzq_request); \
+ _zzq_args[1] =3D (unsigned long long int)(_zzq_arg1); \
+ _zzq_args[2] =3D (unsigned long long int)(_zzq_arg2); \
+ _zzq_args[3] =3D (unsigned long long int)(_zzq_arg3); \
+ _zzq_args[4] =3D (unsigned long long int)(_zzq_arg4); \
_zzq_ptr =3D _zzq_args; \
- __asm__ volatile("tw 0,3,27\n\t" \
- "rotldi 0,0,61\n\t" \
- "rotldi 0,0,3\n\t" \
- "rotldi 0,0,13\n\t" \
- "rotldi 0,0,51\n\t" \
- "nop\n\t" \
- : "=3Dr" (_zzq_tmp) \
+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \
+ /* %R3 =3D client_request ( %R4 ) */ \
+ "or 1,1,1" \
+ : "=3Dr" (_zzq_result) \
: "0" (_zzq_default), "r" (_zzq_ptr) \
- : "memory"); \
- _zzq_rlval =3D (__typeof__(_zzq_rlval)) _zzq_tmp; \
+ : "cc", "memory"); \
+ _zzq_rlval =3D _zzq_result; \
}
+
+#define VALGRIND_GET_NRADDR(_zzq_rlval) \
+ { register unsigned long long int __addr __asm__("r3"); \
+ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \
+ /* %R3 =3D guest_NRADDR */ \
+ "or 2,2,2" \
+ : "=3Dr" (__addr) \
+ : \
+ : "cc", "memory" \
+ ); \
+ _zzq_rlval =3D (void*)__addr; \
+ }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \
+ __SPECIAL_INSTRUCTION_PREAMBLE \
+ /* branch-and-link-to-noredir *%R11 */ \
+ "or 3,3,3\n\t"
+
#endif /* ARCH_ppc64 */
=20
/* Insert assembly code for other architectures here... */
|
|
From: <sv...@va...> - 2006-01-12 21:13:21
|
Author: sewardj
Date: 2006-01-12 21:13:14 +0000 (Thu, 12 Jan 2006)
New Revision: 1537
Log:
Update fn redirect/wrap hooks for ppc64.
Modified:
trunk/priv/guest-ppc/toIR.c
Modified: trunk/priv/guest-ppc/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc/toIR.c 2006-01-12 12:27:58 UTC (rev 1536)
+++ trunk/priv/guest-ppc/toIR.c 2006-01-12 21:13:14 UTC (rev 1537)
@@ -88,10 +88,17 @@
This instruction decoder can decode three special instructions
which mean nothing natively (are no-ops as far as regs/mem are
concerned) but have meaning for supporting Valgrind. A special
- instruction is flagged by the 16-byte preamble 54001800 54006800
- 5400E800 54009800 (in the standard interpretation, that means:
- rlwinm 0,0,3,0,0; rlwinm 0,0,13,0,0; rlwinm 0,0,29,0,0; rlwinm
- 0,0,19,0,0). Following that, one of the following 3 are allowed
+ instruction is flagged by a 16-byte preamble:
+
+ 32-bit mode: 54001800 54006800 5400E800 54009800
+ (rlwinm 0,0,3,0,0; rlwinm 0,0,13,0,0;=20
+ rlwinm 0,0,29,0,0; rlwinm 0,0,19,0,0)
+
+ 64-bit mode: 78001800 78006800 7800E802 78009802
+ (rotldi 0,0,3; rotldi 0,0,13;
+ rotldi 0,0,61; rotldi 0,0,51)
+
+ Following that, one of the following 3 are allowed
(standard interpretation in parentheses):
=20
7C210B78 (or 1,1,1) %R3 =3D client_request ( %R4 )
@@ -8369,56 +8376,35 @@
=20
// vex_printf("insn: 0x%x\n", theInstr);
=20
- if (mode64) {
- DIP("\t0x%llx: ", guest_CIA_curr_instr);
- } else {
- DIP("\t0x%x: ", (Addr32)guest_CIA_curr_instr);
- }
+ DIP("\t0x%llx: ", (ULong)guest_CIA_curr_instr);
=20
/* We may be asked to update the guest CIA before going further. */
if (put_IP)
putGST( PPC_GST_CIA, mkSzImm(ty, guest_CIA_curr_instr) );
=20
/* Spot "Special" instructions (see comment at top of file). */
- if (mode64) {
- /* Spot the magic sequence, 64-bit mode */
- UChar* code =3D (UChar*)(&guest_code[delta]);
-
- /* Spot this: =20
- 0x7C03D808 tw 0,3,27 =3D> trap word if (0) =3D> no=
p
- 0x7800E802 rotldi 0,0,61 =3D> ro =3D rotl(r0,61)
- 0x78001800 rotldi 0,0,3 =3D> ro =3D rotl(r0,3)
- 0x78006800 rotldi 0,0,13 =3D> ro =3D rotl(r0,13)
- 0x78009802 rotldi 0,0,51 =3D> ro =3D rotl(r0,51)
- 0x60000000 nop
- */
- if (getUIntBigendianly(code+ 0) =3D=3D 0x7C03D808 &&
- getUIntBigendianly(code+ 4) =3D=3D 0x7800E802 &&
- getUIntBigendianly(code+ 8) =3D=3D 0x78001800 &&
- getUIntBigendianly(code+12) =3D=3D 0x78006800 &&
- getUIntBigendianly(code+16) =3D=3D 0x78009802 &&
- getUIntBigendianly(code+20) =3D=3D 0x60000000) {
- DIP("%%r3 =3D client_request ( %%r31 )\n");
- dres.len =3D 24;
- delta +=3D 24;
-
- irbb->next =3D mkSzImm( ty, guest_CIA_bbstart + delta );
- irbb->jumpkind =3D Ijk_ClientReq;
- dres.whatNext =3D Dis_StopHere;
- goto decode_success;
- }
- } else {
+ {
UChar* code =3D (UChar*)(guest_code + delta);
- /* Spot the 16-byte preamble:
- 54001800 rlwinm 0,0,3,0,0
- 54006800 rlwinm 0,0,13,0,0
- 5400E800 rlwinm 0,0,29,0,0
- 54009800 rlwinm 0,0,19,0,0
+ /* Spot the 16-byte preamble:=20
+ 32-bit mode:
+ 54001800 rlwinm 0,0,3,0,0
+ 54006800 rlwinm 0,0,13,0,0
+ 5400E800 rlwinm 0,0,29,0,0
+ 54009800 rlwinm 0,0,19,0,0
+ 64-bit mode:
+ 78001800 rotldi 0,0,3
+ 78006800 rotldi 0,0,13
+ 7800E802 rotldi 0,0,61
+ 78009802 rotldi 0,0,51
*/
- if (getUIntBigendianly(code+ 0) =3D=3D 0x54001800 &&
- getUIntBigendianly(code+ 4) =3D=3D 0x54006800 &&
- getUIntBigendianly(code+ 8) =3D=3D 0x5400E800 &&
- getUIntBigendianly(code+12) =3D=3D 0x54009800) {
+ UInt word1 =3D mode64 ? 0x78001800 : 0x54001800;
+ UInt word2 =3D mode64 ? 0x78006800 : 0x54006800;
+ UInt word3 =3D mode64 ? 0x7800E802 : 0x5400E800;
+ UInt word4 =3D mode64 ? 0x78009802 : 0x54009800;
+ if (getUIntBigendianly(code+ 0) =3D=3D word1 &&
+ getUIntBigendianly(code+ 4) =3D=3D word2 &&
+ getUIntBigendianly(code+ 8) =3D=3D word3 &&
+ getUIntBigendianly(code+12) =3D=3D word4) {
/* Got a "Special" instruction preamble. Which one is it? */
if (getUIntBigendianly(code+16) =3D=3D 0x7C210B78 /* or 1,1,1 *=
/) {
/* %R3 =3D client_request ( %R4 ) */
@@ -8443,7 +8429,7 @@
/* branch-and-link-to-noredir %R11 */
DIP("branch-and-link-to-noredir r11\n");
delta +=3D 20;
- putGST( PPC_GST_LR, mkSzImm(ty, guest_CIA_bbstart + delta) )=
;
+ putGST( PPC_GST_LR, mkSzImm(ty, guest_CIA_bbstart + (Long)de=
lta) );
irbb->next =3D getIReg(11);
irbb->jumpkind =3D Ijk_NoRedir;
dres.whatNext =3D Dis_StopHere;
|
|
From: <sv...@va...> - 2006-01-12 14:04:55
|
Author: sewardj
Date: 2006-01-12 14:04:46 +0000 (Thu, 12 Jan 2006)
New Revision: 5522
Log:
Make function wrapping work on ppc32-linux.
Modified:
trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
trunk/coregrind/m_scheduler/scheduler.c
Modified: trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2006-01-12 13:34:20=
UTC (rev 5521)
+++ trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2006-01-12 14:04:46=
UTC (rev 5522)
@@ -35,7 +35,10 @@
=20
=20
/*------------------------------------------------------------*/
-/*--- The dispatch loop. ---*/
+/*--- ---*/
+/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
+/*--- run all translations except no-redir ones. ---*/
+/*--- ---*/
/*------------------------------------------------------------*/
=20
/*----------------------------------------------------*/
@@ -540,6 +543,85 @@
addi 1,1,496 /* stack_size */
blr
=20
+
+/*------------------------------------------------------------*/
+/*--- ---*/
+/*--- A special dispatcher, for running no-redir ---*/
+/*--- translations. Just runs the given translation once. ---*/
+/*--- ---*/
+/*------------------------------------------------------------*/
+
+/* signature:
+void VG_(run_a_noredir_translation) ( UWord* argblock );
+*/
+
+/* Run a no-redir translation. argblock points to 4 UWords, 2 to carry =
args
+ and 2 to carry results:
+ 0: input: ptr to translation
+ 1: input: ptr to guest state
+ 2: output: next guest PC
+ 3: output: guest state pointer afterwards (=3D=3D thread return co=
de)
+*/
+.align 16
+.global VG_(run_a_noredir_translation)
+VG_(run_a_noredir_translation):
+ /* save callee-save int regs, & lr */
+ stwu 1,-256(1)
+ stw 14,128(1)
+ stw 15,132(1)
+ stw 16,136(1)
+ stw 17,140(1)
+ stw 18,144(1)
+ stw 19,148(1)
+ stw 20,152(1)
+ stw 21,156(1)
+ stw 22,160(1)
+ stw 23,164(1)
+ stw 24,168(1)
+ stw 25,172(1)
+ stw 26,176(1)
+ stw 27,180(1)
+ stw 28,184(1)
+ stw 29,188(1)
+ stw 30,192(1)
+ stw 31,196(1)
+ mflr 31
+ stw 31,200(1)
+
+ stw 3,204(1)
+ lwz 31,4(3)
+ lwz 30,0(3)
+ mtlr 30
+ blrl
+
+ lwz 4,204(1)
+ stw 3, 8(4)
+ stw 31,12(4)
+
+ lwz 14,128(1)
+ lwz 15,132(1)
+ lwz 16,136(1)
+ lwz 17,140(1)
+ lwz 18,144(1)
+ lwz 19,148(1)
+ lwz 20,152(1)
+ lwz 21,156(1)
+ lwz 22,160(1)
+ lwz 23,164(1)
+ lwz 24,168(1)
+ lwz 25,172(1)
+ lwz 26,176(1)
+ lwz 27,180(1)
+ lwz 28,184(1)
+ lwz 29,188(1)
+ lwz 30,192(1)
+ lwz 31,200(1)
+ mtlr 31
+ lwz 31,196(1)
+ addi 1,1,256
+ blr
+
+
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
=20
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 13:34:20 UTC (rev =
5521)
+++ trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 14:04:46 UTC (rev =
5522)
@@ -643,122 +643,7 @@
}
}
=20
-/* ---------------------------------------------------------------------
- Helper stuff for managing no-redirection translations.
- ------------------------------------------------------------------ */
=20
-/* Run a translation. argblock points to 4 UWords, 2 to carry args
- and 2 to carry results:
- 0: input: ptr to translation
- 1: input: ptr to guest state
- 2: output: next guest PC
- 3: output: guest state pointer afterwards (=3D=3D thread return co=
de)
-*/
-extern UWord run_a_translation ( UWord* argblock );
-#if defined(VGP_x86_linux)
-#elif defined(VGP_amd64_linux)
-#elif defined(VGP_ppc32_linux)
-asm("\n"
-".text\n"
-"run_a_translation:\n"
-" stwu 1,-256(1)\n"
-" stw 14,128(1)\n"
-" stw 15,132(1)\n"
-" stw 16,136(1)\n"
-" stw 17,140(1)\n"
-" stw 18,144(1)\n"
-" stw 19,148(1)\n"
-" stw 20,152(1)\n"
-" stw 21,156(1)\n"
-" stw 22,160(1)\n"
-" stw 23,164(1)\n"
-" stw 24,168(1)\n"
-" stw 25,172(1)\n"
-" stw 26,176(1)\n"
-" stw 27,180(1)\n"
-" stw 28,184(1)\n"
-" stw 29,188(1)\n"
-" stw 30,192(1)\n"
-" stw 31,196(1)\n"
-" mflr 31\n"
-" stw 31,200(1)\n"
-
-" stw 3,204(1)\n"
-" lwz 31,4(3)\n"
-" lwz 30,0(3)\n"
-" mtlr 30\n"
-" blrl\n"
-
-" lwz 4,204(1)\n"
-" stw 3, 8(4)\n"
-" stw 31,12(4)\n"
-
-" lwz 14,128(1)\n"
-" lwz 15,132(1)\n"
-" lwz 16,136(1)\n"
-" lwz 17,140(1)\n"
-" lwz 18,144(1)\n"
-" lwz 19,148(1)\n"
-" lwz 20,152(1)\n"
-" lwz 21,156(1)\n"
-" lwz 22,160(1)\n"
-" lwz 23,164(1)\n"
-" lwz 24,168(1)\n"
-" lwz 25,172(1)\n"
-" lwz 26,176(1)\n"
-" lwz 27,180(1)\n"
-" lwz 28,184(1)\n"
-" lwz 29,188(1)\n"
-" lwz 30,192(1)\n"
-" lwz 31,200(1)\n"
-" mtlr 31\n"
-" lwz 31,196(1)\n"
-" addi 1,1,256\n"
-" blr\n"
-
-".previous\n"
-);
-#else
-# error "Not implemented"
-#endif
-
-
-/* tid just requested a jump to the noredir version of its current
- program counter. So make up that translation if needed, run it,
- and return the resulting thread return code. */
-static UInt/*trc*/ handle_noredir_jump ( ThreadId tid )
-{
- AddrH hcode =3D 0;
- Addr ip =3D VG_(get_IP)(tid);
-
- Bool found =3D VG_(search_unredir_transtab)( &hcode, ip );
- if (!found) {
- /* Not found; we need to request a translation. */
- if (VG_(translate)( tid, ip, /*debug*/False, 0/*not verbose*/, bbs=
_done,
- False/*NO REDIRECTION*/ )) {
-
- found =3D VG_(search_unredir_transtab)( &hcode, ip );
- vg_assert2(found, "unredir translation missing after creation?!=
");
- =20
- } else {
- // If VG_(translate)() fails, it's because it had to throw a
- // signal because the client jumped to a bad address. That
- // means that either a signal has been set up for delivery,
- // or the thread has been marked for termination. Either
- // way, we just need to go back into the scheduler loop.
- return VG_TRC_BORING;
- }
-
- }
-
- vg_assert(found);
- vg_assert(hcode !=3D 0);
-
- /* Otherwise run it and return the resulting VG_TRC_* value. */=20
- return run_noredir_translation( hcode, tid );
-}
-
-
/* ---------------------------------------------------------------------
The scheduler proper.
------------------------------------------------------------------ */
@@ -817,6 +702,42 @@
}
}
=20
+/* tid just requested a jump to the noredir version of its current
+ program counter. So make up that translation if needed, run it,
+ and return the resulting thread return code. */
+static UInt/*trc*/ handle_noredir_jump ( ThreadId tid )
+{
+ AddrH hcode =3D 0;
+ Addr ip =3D VG_(get_IP)(tid);
+
+ Bool found =3D VG_(search_unredir_transtab)( &hcode, ip );
+ if (!found) {
+ /* Not found; we need to request a translation. */
+ if (VG_(translate)( tid, ip, /*debug*/False, 0/*not verbose*/, bbs=
_done,
+ False/*NO REDIRECTION*/ )) {
+
+ found =3D VG_(search_unredir_transtab)( &hcode, ip );
+ vg_assert2(found, "unredir translation missing after creation?!=
");
+ =20
+ } else {
+ // If VG_(translate)() fails, it's because it had to throw a
+ // signal because the client jumped to a bad address. That
+ // means that either a signal has been set up for delivery,
+ // or the thread has been marked for termination. Either
+ // way, we just need to go back into the scheduler loop.
+ return VG_TRC_BORING;
+ }
+
+ }
+
+ vg_assert(found);
+ vg_assert(hcode !=3D 0);
+
+ /* Otherwise run it and return the resulting VG_TRC_* value. */=20
+ return run_noredir_translation( hcode, tid );
+}
+
+
/*=20
Run a thread until it wants to exit.
=20
|
|
From: <sv...@va...> - 2006-01-12 13:34:26
|
Author: sewardj
Date: 2006-01-12 13:34:20 +0000 (Thu, 12 Jan 2006)
New Revision: 5521
Log:
Make function wrapping work on amd64-linux.
Modified:
trunk/coregrind/m_dispatch/dispatch-amd64-linux.S
trunk/coregrind/m_scheduler/scheduler.c
Modified: trunk/coregrind/m_dispatch/dispatch-amd64-linux.S
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_dispatch/dispatch-amd64-linux.S 2006-01-12 12:32:32=
UTC (rev 5520)
+++ trunk/coregrind/m_dispatch/dispatch-amd64-linux.S 2006-01-12 13:34:20=
UTC (rev 5521)
@@ -36,7 +36,10 @@
=20
=20
/*------------------------------------------------------------*/
-/*--- The dispatch loop. ---*/
+/*--- ---*/
+/*--- The dispatch loop. VG_(run_innerloop) is used to ---*/
+/*--- run all translations except no-redir ones. ---*/
+/*--- ---*/
/*------------------------------------------------------------*/
=20
/*----------------------------------------------------*/
@@ -272,13 +275,55 @@
ret=09
=20
=09
-=09
-/* Other ways of getting out of the inner loop. Placed out-of-line to
- make it look cleaner.=20
+/*------------------------------------------------------------*/
+/*--- ---*/
+/*--- A special dispatcher, for running no-redir ---*/
+/*--- translations. Just runs the given translation once. ---*/
+/*--- ---*/
+/*------------------------------------------------------------*/
+
+/* signature:
+void VG_(run_a_noredir_translation) ( UWord* argblock );
*/
=20
+/* Run a no-redir translation. argblock points to 4 UWords, 2 to carry =
args
+ and 2 to carry results:
+ 0: input: ptr to translation
+ 1: input: ptr to guest state
+ 2: output: next guest PC
+ 3: output: guest state pointer afterwards (=3D=3D thread return co=
de)
+*/
+.align 16
+.global VG_(run_a_noredir_translation)
+VG_(run_a_noredir_translation):
+ /* Save callee-saves regs */
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
=20
+ pushq %rdi /* we will need it after running the translation */
+ movq 8(%rdi), %rbp
+ jmp *0(%rdi)
+ /*NOTREACHED*/
+ ud2
+ /* If the translation has been correctly constructed, we
+ should resume at the the following label. */
+.global VG_(run_a_noredir_translation__return_point)
+VG_(run_a_noredir_translation__return_point):
+ popq %rdi
+ movq %rax, 16(%rdi)
+ movq %rbp, 24(%rdi)
=20
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbp
+ popq %rbx
+ ret
=20
/* Let the linker know we don't need an executable stack */
.section .note.GNU-stack,"",@progbits
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 12:32:32 UTC (rev =
5520)
+++ trunk/coregrind/m_scheduler/scheduler.c 2006-01-12 13:34:20 UTC (rev =
5521)
@@ -657,33 +657,6 @@
extern UWord run_a_translation ( UWord* argblock );
#if defined(VGP_x86_linux)
#elif defined(VGP_amd64_linux)
-asm("\n"
-".text\n"
-"run_a_translation:\n"
-" pushq %rbx\n"
-" pushq %rbp\n"
-" pushq %r12\n"
-" pushq %r13\n"
-" pushq %r14\n"
-" pushq %r15\n"
-
-" pushq %rdi\n" /* we will need it after running the translation */
-" movq 8(%rdi), %rbp\n"
-" call *0(%rdi)\n"
-
-" popq %rdi\n"
-" movq %rax, 16(%rdi)\n"
-" movq %rbp, 24(%rdi)\n"
-
-" popq %r15\n"
-" popq %r14\n"
-" popq %r13\n"
-" popq %r12\n"
-" popq %rbp\n"
-" popq %rbx\n"
-" ret\n"
-".previous\n"
-);
#elif defined(VGP_ppc32_linux)
asm("\n"
".text\n"
|
Author: sewardj Date: 2006-01-12 12:32:32 +0000 (Thu, 12 Jan 2006) New Revision: 5520 Log: Merge in function wrapping support from the FNWRAP branch. That branch hereby becomes inactive. This currently breaks everything except x86; fixes for amd64/ppc32 to follow. Added: trunk/memcheck/tests/wrap1.c trunk/memcheck/tests/wrap1.stderr.exp trunk/memcheck/tests/wrap1.stdout.exp trunk/memcheck/tests/wrap1.vgtest trunk/memcheck/tests/wrap2.c trunk/memcheck/tests/wrap2.stderr.exp trunk/memcheck/tests/wrap2.stdout.exp trunk/memcheck/tests/wrap2.vgtest trunk/memcheck/tests/wrap3.c trunk/memcheck/tests/wrap3.stderr.exp trunk/memcheck/tests/wrap3.stdout.exp trunk/memcheck/tests/wrap3.vgtest trunk/memcheck/tests/wrap4.c trunk/memcheck/tests/wrap4.stderr.exp trunk/memcheck/tests/wrap4.stdout.exp trunk/memcheck/tests/wrap4.vgtest trunk/memcheck/tests/wrap5.c trunk/memcheck/tests/wrap5.stderr.exp trunk/memcheck/tests/wrap5.stdout.exp trunk/memcheck/tests/wrap5.vgtest trunk/memcheck/tests/wrap6.c trunk/memcheck/tests/wrap6.stderr.exp trunk/memcheck/tests/wrap6.stdout.exp trunk/memcheck/tests/wrap6.vgtest Modified: trunk/coregrind/m_clientstate.c trunk/coregrind/m_debuginfo/priv_symtab.h trunk/coregrind/m_debuginfo/symtab.c trunk/coregrind/m_demangle/demangle.c trunk/coregrind/m_dispatch/dispatch-x86-linux.S trunk/coregrind/m_errormgr.c trunk/coregrind/m_main.c trunk/coregrind/m_redir.c trunk/coregrind/m_replacemalloc/vg_replace_malloc.c trunk/coregrind/m_scheduler/scheduler.c trunk/coregrind/m_signals.c trunk/coregrind/m_translate.c trunk/coregrind/m_transtab.c trunk/coregrind/pub_core_clientstate.h trunk/coregrind/pub_core_clreq.h trunk/coregrind/pub_core_debuginfo.h trunk/coregrind/pub_core_demangle.h trunk/coregrind/pub_core_dispatch.h trunk/coregrind/pub_core_dispatch_asm.h trunk/coregrind/pub_core_redir.h trunk/coregrind/pub_core_scheduler.h trunk/coregrind/pub_core_translate.h trunk/coregrind/pub_core_transtab.h trunk/coregrind/vg_preloaded.c trunk/include/pub_tool_debuginfo.h trunk/include/pub_tool_machine.h trunk/include/pub_tool_redir.h trunk/include/valgrind.h trunk/memcheck/mac_replace_strmem.c trunk/memcheck/memcheck.h trunk/memcheck/tests/Makefile.am trunk/none/tests/cmdline2.stdout.exp [... diff too large to include ...] |
|
From: <sv...@va...> - 2006-01-12 12:29:45
|
Author: sewardj Date: 2006-01-12 12:29:42 +0000 (Thu, 12 Jan 2006) New Revision: 5519 Log: Comment-only change. Modified: trunk/include/pub_tool_oset.h Modified: trunk/include/pub_tool_oset.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/include/pub_tool_oset.h 2006-01-12 12:20:48 UTC (rev 5518) +++ trunk/include/pub_tool_oset.h 2006-01-12 12:29:42 UTC (rev 5519) @@ -47,7 +47,7 @@ // every comparison can be high during lookup. If no comparison functio= n is // provided, we assume that keys are (signed or unsigned) words, and tha= t // the key is the first word in each element. This fast comparison is -// suitable for an OSet of Ints, or an OSet containing structs where the +// suitable for an OSet of Words, or an OSet containing structs where th= e // first element is an Addr, for example. // // Each OSet also has an iterator, which makes it simple to traverse all= the |
Author: sewardj
Date: 2006-01-12 12:27:58 +0000 (Thu, 12 Jan 2006)
New Revision: 1536
Log:
Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive.
Modified:
trunk/priv/guest-amd64/ghelpers.c
trunk/priv/guest-amd64/toIR.c
trunk/priv/guest-generic/bb_to_IR.c
trunk/priv/guest-generic/bb_to_IR.h
trunk/priv/guest-ppc/ghelpers.c
trunk/priv/guest-ppc/toIR.c
trunk/priv/guest-x86/ghelpers.c
trunk/priv/guest-x86/toIR.c
trunk/priv/host-amd64/hdefs.c
trunk/priv/host-ppc/hdefs.c
trunk/priv/host-x86/hdefs.c
trunk/priv/ir/irdefs.c
trunk/priv/main/vex_main.c
trunk/pub/libvex.h
trunk/pub/libvex_guest_amd64.h
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_guest_x86.h
trunk/pub/libvex_ir.h
trunk/pub/libvex_trc_values.h
trunk/test_main.c
Modified: trunk/priv/guest-amd64/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/ghelpers.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-amd64/ghelpers.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -1965,6 +1965,8 @@
initialise them anyway. */
vex_state->guest_TISTART =3D 0;
vex_state->guest_TILEN =3D 0;
+
+ vex_state->guest_NRADDR =3D 0;
}
=20
=20
Modified: trunk/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-amd64/toIR.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-amd64/toIR.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -122,6 +122,28 @@
sto{s,sb,sw,sd,sq}
xlat{,b} */
=20
+/* "Special" instructions.
+
+ This instruction decoder can decode three special instructions
+ which mean nothing natively (are no-ops as far as regs/mem are
+ concerned) but have meaning for supporting Valgrind. A special
+ instruction is flagged by the 16-byte preamble 48C1C703 48C1C70D
+ 48C1C73D 48C1C733 (in the standard interpretation, that means: rolq
+ $3, %rdi; rolq $13, %rdi; rolq $61, %rdi; rolq $51, %rdi).
+ Following that, one of the following 3 are allowed (standard
+ interpretation in parentheses):
+
+ 4887DB (xchgq %rbx,%rbx) %RDX =3D client_request ( %RAX )
+ 4887C9 (xchgq %rcx,%rcx) %RAX =3D guest_NRADDR
+ 4887D2 (xchgq %rdx,%rdx) call-noredir *%RAX
+
+ Any other bytes following the 16-byte preamble are illegal and
+ constitute a failure in instruction decoding. This all assumes
+ that the preamble will never occur except in specific code
+ fragments designed for Valgrind to catch.
+
+ No prefixes may precede a "Special" instruction. */
+
/* Translates AMD64 code to IR. */
=20
#include "libvex_basictypes.h"
@@ -398,7 +420,9 @@
#define OFFB_TISTART offsetof(VexGuestAMD64State,guest_TISTART)
#define OFFB_TILEN offsetof(VexGuestAMD64State,guest_TILEN)
=20
+#define OFFB_NRADDR offsetof(VexGuestAMD64State,guest_NRADDR)
=20
+
/*------------------------------------------------------------*/
/*--- Helper bits and pieces for deconstructing the ---*/
/*--- amd64 insn stream. ---*/
@@ -7949,29 +7973,61 @@
if (put_IP)
stmt( IRStmt_Put( OFFB_RIP, mkU64(guest_RIP_curr_instr)) );
=20
- /* Spot the client-request magic sequence. */
+ /* Spot "Special" instructions (see comment at top of file). */
{
UChar* code =3D (UChar*)(guest_code + delta);
- /* Spot this:
- C1C01D roll $29, %eax
- C1C003 roll $3, %eax
- C1C81B rorl $27, %eax
- C1C805 rorl $5, %eax
- C1C00D roll $13, %eax
- C1C013 roll $19, %eax =20
+ /* Spot the 16-byte preamble:
+ 48C1C703 rolq $3, %rdi
+ 48C1C70D rolq $13, %rdi
+ 48C1C73D rolq $61, %rdi
+ 48C1C733 rolq $51, %rdi
*/
- if (code[ 0] =3D=3D 0xC1 && code[ 1] =3D=3D 0xC0 && code[ 2] =3D=3D=
0x1D &&
- code[ 3] =3D=3D 0xC1 && code[ 4] =3D=3D 0xC0 && code[ 5] =3D=3D=
0x03 &&
- code[ 6] =3D=3D 0xC1 && code[ 7] =3D=3D 0xC8 && code[ 8] =3D=3D=
0x1B &&
- code[ 9] =3D=3D 0xC1 && code[10] =3D=3D 0xC8 && code[11] =3D=3D=
0x05 &&
- code[12] =3D=3D 0xC1 && code[13] =3D=3D 0xC0 && code[14] =3D=3D=
0x0D &&
- code[15] =3D=3D 0xC1 && code[16] =3D=3D 0xC0 && code[17] =3D=3D=
0x13
- ) {
- DIP("%%edx =3D client_request ( %%eax )\n"); =20
- delta +=3D 18;
- jmp_lit(Ijk_ClientReq, guest_RIP_bbstart+delta);
- dres.whatNext =3D Dis_StopHere;
- goto decode_success;
+ if (code[ 0] =3D=3D 0x48 && code[ 1] =3D=3D 0xC1 && code[ 2] =3D=3D=
0xC7=20
+ && code[ 3] =3D=3D 0x03 &=
&
+ code[ 4] =3D=3D 0x48 && code[ 5] =3D=3D 0xC1 && code[ 6] =3D=3D=
0xC7=20
+ && code[ 7] =3D=3D 0x0D &=
&
+ code[ 8] =3D=3D 0x48 && code[ 9] =3D=3D 0xC1 && code[10] =3D=3D=
0xC7=20
+ && code[11] =3D=3D 0x3D &=
&
+ code[12] =3D=3D 0x48 && code[13] =3D=3D 0xC1 && code[14] =3D=3D=
0xC7=20
+ && code[15] =3D=3D 0x33) =
{
+ /* Got a "Special" instruction preamble. Which one is it? */
+ if (code[16] =3D=3D 0x48 && code[17] =3D=3D 0x87=20
+ && code[18] =3D=3D 0xDB /* xchgq %rbx,%rbx=
*/) {
+ /* %RDX =3D client_request ( %RAX ) */
+ DIP("%%rdx =3D client_request ( %%rax )\n");
+ delta +=3D 19;
+ jmp_lit(Ijk_ClientReq, guest_RIP_bbstart+delta);
+ dres.whatNext =3D Dis_StopHere;
+ goto decode_success;
+ }
+ else
+ if (code[16] =3D=3D 0x48 && code[17] =3D=3D 0x87=20
+ && code[18] =3D=3D 0xC9 /* xchgq %rcx,%rcx=
*/) {
+ /* %RAX =3D guest_NRADDR */
+ DIP("%%rax =3D guest_NRADDR\n");
+ delta +=3D 19;
+ putIRegRAX(8, IRExpr_Get( OFFB_NRADDR, Ity_I64 ));
+ goto decode_success;
+ }
+ else
+ if (code[16] =3D=3D 0x48 && code[17] =3D=3D 0x87=20
+ && code[18] =3D=3D 0xD2 /* xchgq %rdx,%rdx=
*/) {
+ /* call-noredir *%RAX */
+ DIP("call-noredir *%%rax\n");
+ delta +=3D 19;
+ t1 =3D newTemp(Ity_I64);
+ assign(t1, getIRegRAX(8));
+ t2 =3D newTemp(Ity_I64);
+ assign(t2, binop(Iop_Sub64, getIReg64(R_RSP), mkU64(8)));
+ putIReg64(R_RSP, mkexpr(t2));
+ storeLE( mkexpr(t2), mkU64(guest_RIP_bbstart+delta));
+ jmp_treg(Ijk_NoRedir,t1);
+ dres.whatNext =3D Dis_StopHere;
+ goto decode_success;
+ }
+ /* We don't know what it is. */
+ goto decode_failure;
+ /*NOTREACHED*/
}
}
=20
Modified: trunk/priv/guest-generic/bb_to_IR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-generic/bb_to_IR.c 2006-01-10 20:39:03 UTC (rev 1535=
)
+++ trunk/priv/guest-generic/bb_to_IR.c 2006-01-12 12:27:58 UTC (rev 1536=
)
@@ -56,8 +56,10 @@
__attribute((regparm(2)))
static UInt genericg_compute_adler32 ( HWord addr, HWord len );
=20
+/* Small helpers */
+static Bool const_False ( Addr64 a ) { return False; }
=20
-/* Disassemble a complete basic block, starting at guest_IP_bbstart,=20
+/* Disassemble a complete basic block, starting at guest_IP_start,=20
returning a new IRBB. The disassembler may chase across basic
block boundaries if it wishes and if chase_into_ok allows it.
The precise guest address ranges from which code has been taken
@@ -71,24 +73,29 @@
do_self_check indicates that the caller needs a self-checking
translation.
=20
- offB_TIADDR and offB_TILEN are the offsets of guest_TIADDR and
- guest_TILEN. Since this routine has to work for any guest state,
- without knowing what it is, those offsets have to passed in.
+ do_set_NRADDR indicates that the unredirected guest address for
+ this BB should be written to the guest's NRADDR pseudo-register.
+
+ offB_TIADDR, offB_TILEN and offB_NRADDR are the offsets of
+ guest_TIADDR, guest_TILEN and guest_NRADDR. Since this routine has
+ to work for any guest state, without knowing what it is, those
+ offsets have to passed in.
*/
=20
-static Bool const_False ( Addr64 a ) { return False; }
-
IRBB* bb_to_IR ( /*OUT*/VexGuestExtents* vge,
/*IN*/ DisOneInstrFn dis_instr_fn,
/*IN*/ UChar* guest_code,
/*IN*/ Addr64 guest_IP_bbstart,
+ /*IN*/ Addr64 guest_IP_bbstart_noredir,
/*IN*/ Bool (*chase_into_ok)(Addr64),
/*IN*/ Bool host_bigendian,
/*IN*/ VexArchInfo* archinfo_guest,
/*IN*/ IRType guest_word_type,
/*IN*/ Bool do_self_check,
+ /*IN*/ Bool do_set_NRADDR,
/*IN*/ Int offB_TISTART,
- /*IN*/ Int offB_TILEN )
+ /*IN*/ Int offB_TILEN,
+ /*IN*/ Int offB_NRADDR )
{
Long delta;
Int i, n_instrs, first_stmt_idx;
@@ -100,6 +107,8 @@
Int selfcheck_idx =3D 0;
IRBB* irbb;
Addr64 guest_IP_curr_instr;
+ IRConst* guest_IP_bbstart_IRConst =3D NULL;
+ IRConst* guest_IP_bbstart_noredir_IRConst =3D NULL;
=20
Bool (*resteerOKfn)(Addr64) =3D NULL;
=20
@@ -131,7 +140,23 @@
delta =3D 0;
n_instrs =3D 0;
=20
- /* If asked to make a self-checking translation, leave a 5 spaces
+ /* Guest addresses as IRConsts. Used in the two self-checks
+ generated. */
+ if (do_self_check) {
+ guest_IP_bbstart_IRConst
+ =3D guest_word_type=3D=3DIty_I32=20
+ ? IRConst_U32(toUInt(guest_IP_bbstart))
+ : IRConst_U64(guest_IP_bbstart);
+ }
+
+ if (do_set_NRADDR) {
+ guest_IP_bbstart_noredir_IRConst
+ =3D guest_word_type=3D=3DIty_I32=20
+ ? IRConst_U32(toUInt(guest_IP_bbstart_noredir))
+ : IRConst_U64(guest_IP_bbstart_noredir);
+ }
+
+ /* If asked to make a self-checking translation, leave 5 spaces
in which to put the check statements. We'll fill them in later
when we know the length and adler32 of the area to check. */
if (do_self_check) {
@@ -143,6 +168,18 @@
addStmtToIRBB( irbb, IRStmt_NoOp() );
}
=20
+ /* Set guest_NRADDR if asked to. This records the unredirected
+ guest address of this bb, so that it can later be read (and so
+ used by a function wrapper to get to the function itself. */
+ if (do_set_NRADDR) {
+ /* set guest_NRADDR to guest_IP_bbstart_noredir */
+ addStmtToIRBB(=20
+ irbb,
+ IRStmt_Put( offB_NRADDR,=20
+ IRExpr_Const(guest_IP_bbstart_noredir_IRConst))
+ );
+ }
+
/* Process instructions. */
while (True) {
vassert(n_instrs < vex_control.guest_max_insns);
@@ -197,7 +234,7 @@
vassert(dres.whatNext =3D=3D Dis_StopHere
|| dres.whatNext =3D=3D Dis_Continue
|| dres.whatNext =3D=3D Dis_Resteer);
- vassert(dres.len >=3D 0 && dres.len <=3D 18);
+ vassert(dres.len >=3D 0 && dres.len <=3D 20);
if (dres.whatNext !=3D Dis_Resteer)
vassert(dres.continueAt =3D=3D 0);
=20
@@ -298,7 +335,6 @@
if (do_self_check) {
=20
UInt len2check, adler32;
- IRConst* guest_IP_bbstart_IRConst;
IRTemp tistart_tmp, tilen_tmp;
=20
vassert(vge->n_used =3D=3D 1);
@@ -308,11 +344,6 @@
=20
adler32 =3D genericg_compute_adler32( (HWord)guest_code, len2check =
);
=20
- guest_IP_bbstart_IRConst
- =3D guest_word_type=3D=3DIty_I32=20
- ? IRConst_U32(toUInt(guest_IP_bbstart))
- : IRConst_U64(guest_IP_bbstart);
-
/* Set TISTART and TILEN. These will describe to the despatcher
the area of guest code to invalidate should we exit with a
self-check failure. */
Modified: trunk/priv/guest-generic/bb_to_IR.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-generic/bb_to_IR.h 2006-01-10 20:39:03 UTC (rev 1535=
)
+++ trunk/priv/guest-generic/bb_to_IR.h 2006-01-12 12:27:58 UTC (rev 1536=
)
@@ -154,13 +154,16 @@
/*IN*/ DisOneInstrFn dis_instr_fn,
/*IN*/ UChar* guest_code,
/*IN*/ Addr64 guest_IP_bbstart,
+ /*IN*/ Addr64 guest_IP_bbstart_noredir,
/*IN*/ Bool (*chase_into_ok)(Addr64),
/*IN*/ Bool host_bigendian,
/*IN*/ VexArchInfo* archinfo_guest,
/*IN*/ IRType guest_word_type,
/*IN*/ Bool do_self_check,
+ /*IN*/ Bool do_set_NRADDR,
/*IN*/ Int offB_TISTART,
- /*IN*/ Int offB_TILEN );
+ /*IN*/ Int offB_TILEN,
+ /*IN*/ Int offB_NRADDR );
=20
=20
#endif /* ndef GENERIC_BB_TO_IR_H */
Modified: trunk/priv/guest-ppc/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc/ghelpers.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-ppc/ghelpers.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -458,10 +458,12 @@
=20
vex_state->guest_EMWARN =3D EmWarn_NONE;
=20
+ vex_state->guest_RESVN =3D 0;
+
vex_state->guest_TISTART =3D 0;
vex_state->guest_TILEN =3D 0;
=20
- vex_state->guest_RESVN =3D 0;
+ vex_state->guest_NRADDR =3D 0;
}
=20
=20
@@ -606,10 +608,12 @@
=20
vex_state->guest_EMWARN =3D EmWarn_NONE;
=20
+ vex_state->guest_RESVN =3D 0;
+
vex_state->guest_TISTART =3D 0;
vex_state->guest_TILEN =3D 0;
=20
- vex_state->guest_RESVN =3D 0;
+ vex_state->guest_NRADDR =3D 0;
}
=20
=20
Modified: trunk/priv/guest-ppc/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-ppc/toIR.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-ppc/toIR.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -83,7 +83,28 @@
results would then be zeroed, too.
*/
=20
+/* "Special" instructions.
=20
+ This instruction decoder can decode three special instructions
+ which mean nothing natively (are no-ops as far as regs/mem are
+ concerned) but have meaning for supporting Valgrind. A special
+ instruction is flagged by the 16-byte preamble 54001800 54006800
+ 5400E800 54009800 (in the standard interpretation, that means:
+ rlwinm 0,0,3,0,0; rlwinm 0,0,13,0,0; rlwinm 0,0,29,0,0; rlwinm
+ 0,0,19,0,0). Following that, one of the following 3 are allowed
+ (standard interpretation in parentheses):
+
+ 7C210B78 (or 1,1,1) %R3 =3D client_request ( %R4 )
+ 7C421378 (or 2,2,2) %R3 =3D guest_NRADDR
+ 7C631B78 (or 3,3,3) branch-and-link-to-noredir %R11
+
+ Any other bytes following the 16-byte preamble are illegal and
+ constitute a failure in instruction decoding. This all assumes
+ that the preamble will never occur except in specific code
+ fragments designed for Valgrind to catch.
+*/
+
+
/* Translates PPC32/64 code to IR. */
=20
/* References
@@ -200,9 +221,9 @@
#define OFFB_TISTART offsetofPPCGuestState(guest_TISTART)
#define OFFB_TILEN offsetofPPCGuestState(guest_TILEN)
#define OFFB_RESVN offsetofPPCGuestState(guest_RESVN)
+#define OFFB_NRADDR offsetofPPCGuestState(guest_NRADDR)
=20
=20
-
/*------------------------------------------------------------*/
/*--- Extract instruction fields --- */
/*------------------------------------------------------------*/
@@ -8358,8 +8379,7 @@
if (put_IP)
putGST( PPC_GST_CIA, mkSzImm(ty, guest_CIA_curr_instr) );
=20
- /* Spot the client-request magic sequence. */
- // Essentially a v. unlikely sequence of noops that we can catch
+ /* Spot "Special" instructions (see comment at top of file). */
if (mode64) {
/* Spot the magic sequence, 64-bit mode */
UChar* code =3D (UChar*)(&guest_code[delta]);
@@ -8388,31 +8408,54 @@
goto decode_success;
}
} else {
- /* Spot the magic sequence, 32-bit mode */
- UChar* code =3D (UChar*)(&guest_code[delta]);
-
- /* Spot this: =20
- 0x7C03D808 tw 0,3,27 =3D> trap word if (0) =3D> no=
p
- 0x5400E800 rlwinm 0,0,29,0,0 =3D> r0 =3D rotl(r0,29)
- 0x54001800 rlwinm 0,0, 3,0,0 =3D> r0 =3D rotl(r0, 3)
- 0x54006800 rlwinm 0,0,13,0,0 =3D> r0 =3D rotl(r0,13)
- 0x54009800 rlwinm 0,0,19,0,0 =3D> r0 =3D rotl(r0,19)
- 0x60000000 nop
+ UChar* code =3D (UChar*)(guest_code + delta);
+ /* Spot the 16-byte preamble:
+ 54001800 rlwinm 0,0,3,0,0
+ 54006800 rlwinm 0,0,13,0,0
+ 5400E800 rlwinm 0,0,29,0,0
+ 54009800 rlwinm 0,0,19,0,0
*/
- if (getUIntBigendianly(code+ 0) =3D=3D 0x7C03D808 &&
- getUIntBigendianly(code+ 4) =3D=3D 0x5400E800 &&
- getUIntBigendianly(code+ 8) =3D=3D 0x54001800 &&
- getUIntBigendianly(code+12) =3D=3D 0x54006800 &&
- getUIntBigendianly(code+16) =3D=3D 0x54009800 &&
- getUIntBigendianly(code+20) =3D=3D 0x60000000) {
- DIP("%%r3 =3D client_request ( %%r31 )\n");
- dres.len =3D 24;
- delta +=3D 24;
-
- irbb->next =3D mkSzImm( ty, guest_CIA_bbstart + delta );
- irbb->jumpkind =3D Ijk_ClientReq;
- dres.whatNext =3D Dis_StopHere;
- goto decode_success;
+ if (getUIntBigendianly(code+ 0) =3D=3D 0x54001800 &&
+ getUIntBigendianly(code+ 4) =3D=3D 0x54006800 &&
+ getUIntBigendianly(code+ 8) =3D=3D 0x5400E800 &&
+ getUIntBigendianly(code+12) =3D=3D 0x54009800) {
+ /* Got a "Special" instruction preamble. Which one is it? */
+ if (getUIntBigendianly(code+16) =3D=3D 0x7C210B78 /* or 1,1,1 *=
/) {
+ /* %R3 =3D client_request ( %R4 ) */
+ DIP("r3 =3D client_request ( %%r4 )\n");
+ delta +=3D 20;
+ irbb->next =3D mkSzImm( ty, guest_CIA_bbstart + delta );
+ irbb->jumpkind =3D Ijk_ClientReq;
+ dres.whatNext =3D Dis_StopHere;
+ goto decode_success;
+ }
+ else
+ if (getUIntBigendianly(code+16) =3D=3D 0x7C421378 /* or 2,2,2 *=
/) {
+ /* %R3 =3D guest_NRADDR */
+ DIP("r3 =3D guest_NRADDR\n");
+ delta +=3D 20;
+ dres.len =3D 20;
+ putIReg(3, IRExpr_Get( OFFB_NRADDR, ty ));
+ goto decode_success;
+ }
+ else
+ if (getUIntBigendianly(code+16) =3D=3D 0x7C631B78 /* or 3,3,3 *=
/) {
+ /* branch-and-link-to-noredir %R11 */
+ DIP("branch-and-link-to-noredir r11\n");
+ delta +=3D 20;
+ putGST( PPC_GST_LR, mkSzImm(ty, guest_CIA_bbstart + delta) )=
;
+ irbb->next =3D getIReg(11);
+ irbb->jumpkind =3D Ijk_NoRedir;
+ dres.whatNext =3D Dis_StopHere;
+ goto decode_success;
+ }
+ /* We don't know what it is. Set opc1/opc2 so decode_failure
+ can print the insn following the Special-insn preamble. */
+ theInstr =3D getUIntBigendianly(code+16);
+ opc1 =3D ifieldOPC(theInstr);
+ opc2 =3D ifieldOPClo10(theInstr);
+ goto decode_failure;
+ /*NOTREACHED*/
}
}
=20
@@ -9007,7 +9050,11 @@
/* All decode successes end up here. */
DIP("\n");
=20
- dres.len =3D 4;
+ if (dres.len =3D=3D 0) {
+ dres.len =3D 4;
+ } else {
+ vassert(dres.len =3D=3D 20);
+ }
return dres;
}
=20
Modified: trunk/priv/guest-x86/ghelpers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/ghelpers.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-x86/ghelpers.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -2225,6 +2225,8 @@
/* SSE2 has a 'clflush' cache-line-invalidator which uses these. */
vex_state->guest_TISTART =3D 0;
vex_state->guest_TILEN =3D 0;
+
+ vex_state->guest_NRADDR =3D 0;
}
=20
=20
Modified: trunk/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/guest-x86/toIR.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/guest-x86/toIR.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -122,6 +122,30 @@
way through bbs as usual.
*/
=20
+/* "Special" instructions.
+
+ This instruction decoder can decode three special instructions
+ which mean nothing natively (are no-ops as far as regs/mem are
+ concerned) but have meaning for supporting Valgrind. A special
+ instruction is flagged by the 12-byte preamble C1C703 C1C70D C1C71D
+ C1C713 (in the standard interpretation, that means: roll $3, %edi;
+ roll $13, %edi; roll $29, %edi; roll $19, %edi). Following that,
+ one of the following 3 are allowed (standard interpretation in
+ parentheses):
+
+ 87DB (xchgl %ebx,%ebx) %EDX =3D client_request ( %EAX )
+ 87C9 (xchgl %ecx,%ecx) %EAX =3D guest_NRADDR
+ 87D2 (xchgl %edx,%edx) call-noredir *%EAX
+
+ Any other bytes following the 12-byte preamble are illegal and
+ constitute a failure in instruction decoding. This all assumes
+ that the preamble will never occur except in specific code
+ fragments designed for Valgrind to catch.
+
+ No prefixes may precede a "Special" instruction.
+*/
+
+
/* Translates x86 code to IR. */
=20
#include "libvex_basictypes.h"
@@ -227,7 +251,9 @@
=20
#define OFFB_TISTART offsetof(VexGuestX86State,guest_TISTART)
#define OFFB_TILEN offsetof(VexGuestX86State,guest_TILEN)
+#define OFFB_NRADDR offsetof(VexGuestX86State,guest_NRADDR)
=20
+
/*------------------------------------------------------------*/
/*--- Helper bits and pieces for deconstructing the ---*/
/*--- x86 insn stream. ---*/
@@ -7012,32 +7038,58 @@
if (put_IP)
stmt( IRStmt_Put( OFFB_EIP, mkU32(guest_EIP_curr_instr)) );
=20
- /* Spot the client-request magic sequence. */
+ /* Spot "Special" instructions (see comment at top of file). */
{
UChar* code =3D (UChar*)(guest_code + delta);
- /* Spot this:
- C1C01D roll $29, %eax
- C1C003 roll $3, %eax
- C1C81B rorl $27, %eax
- C1C805 rorl $5, %eax
- C1C00D roll $13, %eax
- C1C013 roll $19, %eax =20
+ /* Spot the 12-byte preamble:
+ C1C703 roll $3, %edi
+ C1C70D roll $13, %edi
+ C1C71D roll $29, %edi
+ C1C713 roll $19, %edi
*/
- if (code[ 0] =3D=3D 0xC1 && code[ 1] =3D=3D 0xC0 && code[ 2] =3D=3D=
0x1D &&
- code[ 3] =3D=3D 0xC1 && code[ 4] =3D=3D 0xC0 && code[ 5] =3D=3D=
0x03 &&
- code[ 6] =3D=3D 0xC1 && code[ 7] =3D=3D 0xC8 && code[ 8] =3D=3D=
0x1B &&
- code[ 9] =3D=3D 0xC1 && code[10] =3D=3D 0xC8 && code[11] =3D=3D=
0x05 &&
- code[12] =3D=3D 0xC1 && code[13] =3D=3D 0xC0 && code[14] =3D=3D=
0x0D &&
- code[15] =3D=3D 0xC1 && code[16] =3D=3D 0xC0 && code[17] =3D=3D=
0x13
- ) {
- DIP("%%edx =3D client_request ( %%eax )\n"); =20
- delta +=3D 18;
- jmp_lit(Ijk_ClientReq, guest_EIP_bbstart+delta);
- dres.whatNext =3D Dis_StopHere;
- goto decode_success;
+ if (code[ 0] =3D=3D 0xC1 && code[ 1] =3D=3D 0xC7 && code[ 2] =3D=3D=
0x03 &&
+ code[ 3] =3D=3D 0xC1 && code[ 4] =3D=3D 0xC7 && code[ 5] =3D=3D=
0x0D &&
+ code[ 6] =3D=3D 0xC1 && code[ 7] =3D=3D 0xC7 && code[ 8] =3D=3D=
0x1D &&
+ code[ 9] =3D=3D 0xC1 && code[10] =3D=3D 0xC7 && code[11] =3D=3D=
0x13) {
+ /* Got a "Special" instruction preamble. Which one is it? */
+ if (code[12] =3D=3D 0x87 && code[13] =3D=3D 0xDB /* xchgl %ebx,=
%ebx */) {
+ /* %EDX =3D client_request ( %EAX ) */
+ DIP("%%edx =3D client_request ( %%eax )\n");
+ delta +=3D 14;
+ jmp_lit(Ijk_ClientReq, guest_EIP_bbstart+delta);
+ dres.whatNext =3D Dis_StopHere;
+ goto decode_success;
+ }
+ else
+ if (code[12] =3D=3D 0x87 && code[13] =3D=3D 0xC9 /* xchgl %ecx,=
%ecx */) {
+ /* %EAX =3D guest_NRADDR */
+ DIP("%%eax =3D guest_NRADDR\n");
+ delta +=3D 14;
+ putIReg(4, R_EAX, IRExpr_Get( OFFB_NRADDR, Ity_I32 ));
+ goto decode_success;
+ }
+ else
+ if (code[12] =3D=3D 0x87 && code[13] =3D=3D 0xD2 /* xchgl %edx,=
%edx */) {
+ /* call-noredir *%EAX */
+ DIP("call-noredir *%%eax\n");
+ delta +=3D 14;
+ t1 =3D newTemp(Ity_I32);
+ assign(t1, getIReg(4,R_EAX));
+ t2 =3D newTemp(Ity_I32);
+ 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 =3D Dis_StopHere;
+ goto decode_success;
+ }
+ /* We don't know what it is. */
+ goto decode_failure;
+ /*NOTREACHED*/
}
}
=20
+ /* Deal with prefixes. */
/* Skip a LOCK prefix. */
/* 2005 Jan 06: the following insns are observed to sometimes
have a LOCK prefix:
Modified: trunk/priv/host-amd64/hdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-amd64/hdefs.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/host-amd64/hdefs.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -2620,6 +2620,9 @@
case Ijk_TInval:
*p++ =3D 0xBD;
p =3D emit32(p, VEX_TRC_JMP_TINVAL); break;
+ case Ijk_NoRedir:
+ *p++ =3D 0xBD;
+ p =3D emit32(p, VEX_TRC_JMP_NOREDIR); break;
case Ijk_Ret:
case Ijk_Call:
case Ijk_Boring:
Modified: trunk/priv/host-ppc/hdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-ppc/hdefs.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/host-ppc/hdefs.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -2942,6 +2942,7 @@
case Ijk_MapFail: trc =3D VEX_TRC_JMP_MAPFAIL; break;
case Ijk_NoDecode: trc =3D VEX_TRC_JMP_NODECODE; break;
case Ijk_TInval: trc =3D VEX_TRC_JMP_TINVAL; break;
+ case Ijk_NoRedir: trc =3D VEX_TRC_JMP_NOREDIR; break;
case Ijk_Ret:
case Ijk_Call:
case Ijk_Boring:
Modified: trunk/priv/host-x86/hdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/host-x86/hdefs.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/host-x86/hdefs.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -2179,6 +2179,9 @@
case Ijk_TInval:
*p++ =3D 0xBD;
p =3D emit32(p, VEX_TRC_JMP_TINVAL); break;
+ case Ijk_NoRedir:
+ *p++ =3D 0xBD;
+ p =3D emit32(p, VEX_TRC_JMP_NOREDIR); break;
case Ijk_Sys_sysenter:
*p++ =3D 0xBD;
p =3D emit32(p, VEX_TRC_JMP_SYS_SYSENTER); break;
Modified: trunk/priv/ir/irdefs.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/ir/irdefs.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/ir/irdefs.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -684,6 +684,7 @@
case Ijk_NoDecode: vex_printf("NoDecode"); break;
case Ijk_MapFail: vex_printf("MapFail"); break;
case Ijk_TInval: vex_printf("Invalidate"); break;
+ case Ijk_NoRedir: vex_printf("NoRedir"); break;
case Ijk_Sys_syscall: vex_printf("Sys_syscall"); break;
case Ijk_Sys_int32: vex_printf("Sys_int32"); break;
case Ijk_Sys_int128: vex_printf("Sys_int128"); break;
Modified: trunk/priv/main/vex_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/priv/main/vex_main.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/priv/main/vex_main.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -200,7 +200,7 @@
HInstrArray* vcode;
HInstrArray* rcode;
Int i, j, k, out_used, guest_sizeB;
- Int offB_TISTART, offB_TILEN;
+ Int offB_TISTART, offB_TILEN, offB_NRADDR;
UChar insn_bytes[32];
IRType guest_word_type;
IRType host_word_type;
@@ -226,6 +226,7 @@
offB_TISTART =3D 0;
offB_TILEN =3D 0;
mode64 =3D False;
+ offB_NRADDR =3D 0;
=20
vex_traceflags =3D vta->traceflags;
=20
@@ -335,12 +336,14 @@
guest_layout =3D &x86guest_layout;
offB_TISTART =3D offsetof(VexGuestX86State,guest_TISTART);
offB_TILEN =3D offsetof(VexGuestX86State,guest_TILEN);
+ offB_NRADDR =3D offsetof(VexGuestX86State,guest_NRADDR);
vassert(vta->archinfo_guest.subarch =3D=3D VexSubArchX86_sse0
|| vta->archinfo_guest.subarch =3D=3D VexSubArchX86_sse=
1
|| vta->archinfo_guest.subarch =3D=3D VexSubArchX86_sse=
2);
vassert(0 =3D=3D sizeof(VexGuestX86State) % 8);
- vassert(sizeof( ((VexGuestX86State*)0)->guest_TISTART ) =3D=3D =
4);
- vassert(sizeof( ((VexGuestX86State*)0)->guest_TILEN ) =3D=3D 4)=
;
+ vassert(sizeof( ((VexGuestX86State*)0)->guest_TISTART) =3D=3D 4=
);
+ vassert(sizeof( ((VexGuestX86State*)0)->guest_TILEN ) =3D=3D 4=
);
+ vassert(sizeof( ((VexGuestX86State*)0)->guest_NRADDR ) =3D=3D 4=
);
break;
=20
case VexArchAMD64:
@@ -352,10 +355,12 @@
guest_layout =3D &amd64guest_layout;
offB_TISTART =3D offsetof(VexGuestAMD64State,guest_TISTART)=
;
offB_TILEN =3D offsetof(VexGuestAMD64State,guest_TILEN);
+ offB_NRADDR =3D offsetof(VexGuestAMD64State,guest_NRADDR);
vassert(vta->archinfo_guest.subarch =3D=3D VexSubArch_NONE);
vassert(0 =3D=3D sizeof(VexGuestAMD64State) % 8);
vassert(sizeof( ((VexGuestAMD64State*)0)->guest_TISTART ) =3D=3D=
8);
- vassert(sizeof( ((VexGuestAMD64State*)0)->guest_TILEN ) =3D=3D =
8);
+ vassert(sizeof( ((VexGuestAMD64State*)0)->guest_TILEN ) =3D=3D=
8);
+ vassert(sizeof( ((VexGuestAMD64State*)0)->guest_NRADDR ) =3D=3D=
8);
break;
=20
case VexArchARM:
@@ -367,6 +372,7 @@
guest_layout =3D &armGuest_layout;
offB_TISTART =3D 0; /* hack ... arm has bitrot */
offB_TILEN =3D 0; /* hack ... arm has bitrot */
+ offB_NRADDR =3D 0; /* hack ... arm has bitrot */
vassert(vta->archinfo_guest.subarch =3D=3D VexSubArchARM_v4);
break;
=20
@@ -379,12 +385,14 @@
guest_layout =3D &ppc32Guest_layout;
offB_TISTART =3D offsetof(VexGuestPPC32State,guest_TISTART)=
;
offB_TILEN =3D offsetof(VexGuestPPC32State,guest_TILEN);
+ offB_NRADDR =3D offsetof(VexGuestPPC32State,guest_NRADDR);
vassert(vta->archinfo_guest.subarch =3D=3D VexSubArchPPC32_I
|| vta->archinfo_guest.subarch =3D=3D VexSubArchPPC32_F=
I
|| vta->archinfo_guest.subarch =3D=3D VexSubArchPPC32_V=
FI);
vassert(0 =3D=3D sizeof(VexGuestPPC32State) % 8);
vassert(sizeof( ((VexGuestPPC32State*)0)->guest_TISTART ) =3D=3D=
4);
- vassert(sizeof( ((VexGuestPPC32State*)0)->guest_TILEN ) =3D=3D =
4);
+ vassert(sizeof( ((VexGuestPPC32State*)0)->guest_TILEN ) =3D=3D=
4);
+ vassert(sizeof( ((VexGuestPPC32State*)0)->guest_NRADDR ) =3D=3D=
4);
break;
=20
case VexArchPPC64:
@@ -426,13 +434,16 @@
disInstrFn,
vta->guest_bytes,=20
vta->guest_bytes_addr,
+ vta->guest_bytes_addr_noredir,
vta->chase_into_ok,
host_is_bigendian,
&vta->archinfo_guest,
guest_word_type,
vta->do_self_check,
+ vta->do_set_NRADDR,
offB_TISTART,
- offB_TILEN );
+ offB_TILEN,
+ offB_NRADDR );
=20
vexAllocSanityCheck();
=20
Modified: trunk/pub/libvex.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -345,6 +345,9 @@
=20
/* IN: should this translation be self-checking? default: False *=
/
Bool do_self_check;
+ /* IN: should this translation set guest_NRADDR? */
+ Bool do_set_NRADDR;
+
/* IN: debug: trace vex activity at various points */
Int traceflags;
=20
@@ -383,7 +386,6 @@
extern=20
VexTranslateResult LibVEX_Translate ( VexTranslateArgs* );
=20
-
/* A subtlety re interaction between self-checking translations and
bb-chasing. The supplied chase_into_ok function should say NO
(False) when presented with any address for which you might want to
@@ -456,11 +458,19 @@
=20
ALL GUEST ARCHITECTURES
~~~~~~~~~~~~~~~~~~~~~~~
- The architecture must contain two pseudo-registers, guest_TISTART
+ The guest state must contain two pseudo-registers, guest_TISTART
and guest_TILEN. These are used to pass the address of areas of
guest code, translations of which are to be invalidated, back to
the despatcher. Both pseudo-regs must have size equal to the guest
word size.
+
+ The architecture must a third pseudo-register, guest_NRADDR, also
+ guest-word-sized. This is used to record the unredirected guest
+ address at the start of a translation whose start has been
+ redirected. By reading this pseudo-register shortly afterwards,
+ the translation can find out what the corresponding no-redirection
+ address was. Note, this is only set for wrap-style redirects, not
+ for replace-style ones.
*/
#endif /* ndef __LIBVEX_H */
=20
Modified: trunk/pub/libvex_guest_amd64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_guest_amd64.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_guest_amd64.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -145,6 +145,14 @@
ULong guest_TISTART;
ULong guest_TILEN;
=20
+ /* Used to record the unredirected guest address at the start of
+ a translation whose start has been redirected. By reading
+ this pseudo-register shortly afterwards, the translation can
+ find out what the corresponding no-redirection address was.
+ Note, this is only set for wrap-style redirects, not for
+ replace-style ones. */
+ ULong guest_NRADDR;
+
/* Padding to make it have an 8-aligned size */
/* UInt padding; */
}
Modified: trunk/pub/libvex_guest_ppc32.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_guest_ppc32.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_guest_ppc32.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -199,14 +199,22 @@
/* Emulation warnings */
/* 940 */ UInt guest_EMWARN;
=20
- /* For icbi: record start and length of area to invalidate */
- /* 944 */ UInt guest_TISTART;
- /* 948 */ UInt guest_TILEN;
-
/* For lwarx/stwcx.: 0 =3D=3D no reservation exists, non-0 =3D=3D =
a
reservation exists. */
- /* 952 */ UInt guest_RESVN;
+ /* 944 */ UInt guest_RESVN;
=20
+ /* For icbi: record start and length of area to invalidate */
+ /* 948 */ UInt guest_TISTART;
+ /* 952 */ UInt guest_TILEN;
+
+ /* Used to record the unredirected guest address at the start of
+ a translation whose start has been redirected. By reading
+ this pseudo-register shortly afterwards, the translation can
+ find out what the corresponding no-redirection address was.
+ Note, this is only set for wrap-style redirects, not for
+ replace-style ones. */
+ /* 956 */ UInt guest_NRADDR;
+
/* Padding to make it have an 8-aligned size */
/* 956 */ UInt padding;
/* 960 */
Modified: trunk/pub/libvex_guest_ppc64.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_guest_ppc64.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_guest_ppc64.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -248,9 +248,16 @@
reservation exists. */
/* 1104 */ ULong guest_RESVN;
=20
- /* Padding to make it have an 16-aligned size */
- /* 1112 */ ULong padding2;
- /* 1120 */
+ /* Used to record the unredirected guest address at the start of
+ a translation whose start has been redirected. By reading
+ this pseudo-register shortly afterwards, the translation can
+ find out what the corresponding no-redirection address was.
+ Note, this is only set for wrap-style redirects, not for
+ replace-style ones. */
+ /* 1112 */ ULong guest_NRADDR;
+
+ /* Padding to make it have an 8-aligned size */
+ /* UInt padding; */
}
VexGuestPPC64State;
=20
Modified: trunk/pub/libvex_guest_x86.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_guest_x86.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_guest_x86.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -208,18 +208,20 @@
/* Emulation warnings */
UInt guest_EMWARN;
=20
- /* Translation-invalidation area description. Not used on x86
- (there is no invalidate-icache insn), but needed so as to
- allow users of the library to uniformly assume that the guest
- state contains these two fields -- otherwise there is
- compilation breakage. On x86, these two fields are set to
- zero by LibVEX_GuestX86_initialise and then should be ignored
- forever thereafter. */
+ /* For clflush: record start and length of area to invalidate */
UInt guest_TISTART;
UInt guest_TILEN;
=20
+ /* Used to record the unredirected guest address at the start of
+ a translation whose start has been redirected. By reading
+ this pseudo-register shortly afterwards, the translation can
+ find out what the corresponding no-redirection address was.
+ Note, this is only set for wrap-style redirects, not for
+ replace-style ones. */
+ UInt guest_NRADDR;
+
/* Padding to make it have an 8-aligned size */
- /* UInt padding; */
+ UInt padding;
}
VexGuestX86State;
=20
Modified: trunk/pub/libvex_ir.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_ir.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_ir.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -855,6 +855,7 @@
Ijk_NoDecode, /* next instruction cannot be decoded */
Ijk_MapFail, /* Vex-provided address translation failed */
Ijk_TInval, /* Invalidate translations before continuing. =
*/
+ Ijk_NoRedir, /* Jump to un-redirected guest addr */
/* Unfortunately, various guest-dependent syscall kinds. They
all mean: do a syscall before continuing. */
Ijk_Sys_syscall, /* amd64 'syscall', ppc 'sc' */
Modified: trunk/pub/libvex_trc_values.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/pub/libvex_trc_values.h 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/pub/libvex_trc_values.h 2006-01-12 12:27:58 UTC (rev 1536)
@@ -58,6 +58,7 @@
=20
#define VEX_TRC_JMP_TINVAL 61 /* invalidate translations before
continuing */
+#define VEX_TRC_JMP_NOREDIR 81 /* jump to undirected guest addr */
#define VEX_TRC_JMP_EMWARN 63 /* deliver emulation warning before
continuing */
#define VEX_TRC_JMP_CLIENTREQ 65 /* do a client req before continuing =
*/
Modified: trunk/test_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/test_main.c 2006-01-10 20:39:03 UTC (rev 1535)
+++ trunk/test_main.c 2006-01-12 12:27:58 UTC (rev 1536)
@@ -174,6 +174,7 @@
vta.instrument2 =3D NULL;
#endif
vta.do_self_check =3D False;
+ vta.do_set_NRADDR =3D False;
vta.traceflags =3D TEST_FLAGS;
#if 1 /* x86, amd64 hosts */
vta.dispatch =3D (void*)0x12345678;
|
|
From: <sv...@va...> - 2006-01-12 12:20:52
|
Author: sewardj Date: 2006-01-12 12:20:48 +0000 (Thu, 12 Jan 2006) New Revision: 5518 Log: Add register-use summary. Added: trunk/docs/internals/register-uses.txt Modified: trunk/docs/internals/Makefile.am Modified: trunk/docs/internals/Makefile.am =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/Makefile.am 2006-01-11 21:58:39 UTC (rev 5517) +++ trunk/docs/internals/Makefile.am 2006-01-12 12:20:48 UTC (rev 5518) @@ -5,6 +5,7 @@ m_replacemalloc.txt \ m_syswrap.txt module-structure.txt notes.txt porting-HOWTO.txt \ porting-to-ARM.txt \ + register-uses.txt \ release-HOWTO.txt roadmap.txt \ segments-seginfos.txt threads-syscalls-signals.txt \ tm-mutexstates.dot tm-threadstates.dot tracking-fn-entry-exit.txt \ Added: trunk/docs/internals/register-uses.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/register-uses.txt (rev 0= ) +++ trunk/docs/internals/register-uses.txt 2006-01-12 12:20:48 UTC (rev 5= 518) @@ -0,0 +1,53 @@ + +This file records register use conventions and info for the 4 +supported platforms (since it is ABI dependent). This is so as to +avoid having to endlessly re-look up this info in ABI documents. + + ----------------------- + +x86-linux +~~~~~~~~~ + +Reg Callee Arg =20 +Name Saves? Reg? Comment Vex-uses? +-------------------------------------------------------------- +eax n n int[31:0] retreg y +ebx y n y +ecx n n y +edx n n int[63:32] retreg y +esi y n y +edi y n y +ebp y n & guest state +esp reserved n/a n/a +eflags n n/a y +st0 n ? n fp retreg y +st1-7 n ? n y +xmm0-7 n ? n y + + +amd64-linux +~~~~~~~~~~~ + +Reg Callee Arg =20 +Name Saves? Reg? Comment Vex-uses? +------------------------------------------------------------------- +rax n n int[63:0] retreg y +rbx y n y +rcx n int#4 y +rdx n int#3 int[127:64] retreg y +rsi n int#2 y +rdi n int#1 y +rbp y n & guest state +rsp reserved n/a n/a +r8 n int#5 +r9 n int#6 +r10 n ? +r11 n +r12-15 y +eflags n n/a y +st0-7 n n long double retreg y +xmm0 n fp#1 fp retreg y +xmm1 n fp#2 fp-high retreg y +xmm2-7 n fp#3-8 +xmm8-15 n + |
|
From: <js...@ac...> - 2006-01-12 09:31:43
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2006-01-12 05:00:01 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 176 tests, 16 stderr failures, 2 stdout failures ================= memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/stack_changes (stdout) memcheck/tests/stack_changes (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) |
|
From: Cerion Armour-B. <ce...@op...> - 2006-01-12 09:30:48
|
On Wednesday 11 January 2006 23:29, Stephen McCamant wrote: > >>>>> "CA-B" == Cerion Armour-Brown <ce...@op...> writes: > > CA-B> On Wednesday 11 January 2006 19:24, Uttam Pawar wrote: > UP> This is little off-topic question but, how did you decode > UP> 0x7c0048ce into lvx v0,r0,r9? Is there any general receipe for > UP> doing this for ppc platform? > > CA-B> I don't know how others do it, but i did this: > CA-B> create xyz.s: > CA-B> gcc -c xyz.s > CA-B> hexedit xyz.o > CA-B> objdump -d zzz.o > > CA-B> Anyone else out there got an easier way? > > Along the same lines, but more automated: > > % ./dump-insn-ppc.zsh 7c0048ce > 0: 7c 00 48 ce lvx v0,r0,r9 > % cat dump-insn-ppc.zsh > #!/bin/zsh > objdump -b binary -m powerpc -EB -D \ > =(perl -e 'print pack "N", hex $ARGV[0]' $1) | tail +7 Nice, thanks Stephen! Cerion |
|
From: <js...@ac...> - 2006-01-12 03:56:17
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2006-01-12 04:40:00 CET Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 179 tests, 93 stderr failures, 7 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/badaddrvalue (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/badfree (stderr) memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/badloop (stderr) memcheck/tests/badpoll (stderr) memcheck/tests/badrw (stderr) memcheck/tests/brk (stderr) memcheck/tests/brk2 (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/clientperm (stderr) memcheck/tests/custom_alloc (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/doublefree (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/error_counts (stdout) memcheck/tests/errs1 (stderr) memcheck/tests/execve (stderr) memcheck/tests/execve2 (stderr) memcheck/tests/exitprog (stderr) memcheck/tests/fprw (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/inits (stderr) memcheck/tests/inline (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/malloc1 (stderr) memcheck/tests/malloc2 (stderr) memcheck/tests/malloc3 (stdout) memcheck/tests/malloc3 (stderr) memcheck/tests/malloc_usable (stderr) memcheck/tests/manuel1 (stderr) memcheck/tests/manuel2 (stderr) memcheck/tests/manuel3 (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/memalign2 (stderr) memcheck/tests/memalign_test (stderr) memcheck/tests/memcmptest (stderr) memcheck/tests/mempool (stderr) memcheck/tests/mismatches (stderr) memcheck/tests/mmaptest (stderr) memcheck/tests/nanoleak (stderr) memcheck/tests/nanoleak_supp (stderr) memcheck/tests/new_nothrow (stderr) memcheck/tests/new_override (stderr) memcheck/tests/null_socket (stderr) memcheck/tests/oset_test (stderr) memcheck/tests/overlap (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pipe (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/post-syscall (stdout) memcheck/tests/post-syscall (stderr) memcheck/tests/realloc1 (stderr) memcheck/tests/realloc2 (stderr) memcheck/tests/realloc3 (stderr) memcheck/tests/sigaltstack (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/signal2 (stderr) memcheck/tests/sigprocmask (stderr) memcheck/tests/stack_changes (stdout) memcheck/tests/stack_changes (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/str_tester (stderr) memcheck/tests/strchr (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp2 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/suppfree (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/trivialleak (stderr) memcheck/tests/with-space (stderr) memcheck/tests/writev (stderr) memcheck/tests/xml1 (stdout) memcheck/tests/xml1 (stderr) memcheck/tests/zeropage (stderr) massif/tests/toobig-allocs (stderr) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/fdleak_creat (stderr) none/tests/fdleak_dup (stderr) none/tests/fdleak_dup2 (stderr) none/tests/fdleak_fcntl (stderr) none/tests/fdleak_ipv4 (stderr) none/tests/fdleak_open (stderr) none/tests/fdleak_pipe (stderr) none/tests/fdleak_socketpair (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/sem (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) |
|
From: <js...@ac...> - 2006-01-12 03:55:25
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2006-01-12 03:30:01 GMT Checking out vex source tree ... done Building vex ... done Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 209 tests, 5 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) none/tests/mremap2 (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <to...@co...> - 2006-01-12 03:42:58
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2006-01-12 03:30:05 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 211 tests, 7 stderr failures, 2 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/mremap2 (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2006-01-12 03:30:21
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2006-01-12 03:00:03 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 230 tests, 4 stderr failures, 1 stdout failure ================= memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/x86/faultstatus (stderr) none/tests/x86/int (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 == 230 tests, 4 stderr failures, 2 stdout failures ================= memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/tls (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Jan 12 03:18:02 2006 --- new.short Thu Jan 12 03:30:14 2006 *************** *** 8,10 **** ! == 230 tests, 4 stderr failures, 2 stdout failures ================= memcheck/tests/x86/sse1_memory (stdout) --- 8,10 ---- ! == 230 tests, 4 stderr failures, 1 stdout failure ================= memcheck/tests/x86/sse1_memory (stdout) *************** *** 12,14 **** none/tests/fdleak_fcntl (stderr) - none/tests/tls (stdout) none/tests/x86/faultstatus (stderr) --- 12,13 ---- |
|
From: Tom H. <th...@cy...> - 2006-01-12 03:22:58
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2006-01-12 03:10:06 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 230 tests, 5 stderr failures, 3 stdout failures ================= memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/mremap2 (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (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 == 230 tests, 6 stderr failures, 3 stdout failures ================= memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/mremap2 (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Jan 12 03:17:10 2006 --- new.short Thu Jan 12 03:22:51 2006 *************** *** 8,12 **** ! == 230 tests, 6 stderr failures, 3 stdout failures ================= memcheck/tests/leakotron (stdout) - memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (stderr) --- 8,11 ---- ! == 230 tests, 5 stderr failures, 3 stdout failures ================= memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) |
|
From: Tom H. <th...@cy...> - 2006-01-12 03:18:42
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2006-01-12 03:05:12 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 230 tests, 5 stderr failures, 2 stdout failures ================= memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/sse1_memory (stdout) none/tests/amd64/faultstatus (stderr) none/tests/mremap2 (stdout) none/tests/x86/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2006-01-12 03:18:22
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2006-01-12 03:15:03 GMT
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/VEX/Makefile-icc
A valgrind/VEX/Makefile
A valgrind/VEX/LICENSE.README
U valgrind/VEX
Checked out external at revision 1535.
Checked out revision 5517.
Configuring valgrind ... cd valgrind && ./autogen.sh && ./configure --prefix=/tmp/valgrind.8145/Inst
running: aclocal
running: autoheader
running: automake -a
configure.in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
configure.in:112: installing `./config.guess'
configure.in:112: installing `./config.sub'
addrcheck/Makefile.am: installing `./depcomp'
auxprogs/Makefile.am: installing `./compile'
DIST_SUBDIRS: variable `VG_ARCH_ALL' is used but `VG_ARCH_ALL' is undefined
error: while running 'automake -a'
=================================================
== Results from 24 hours ago ==
=================================================
Checking out valgrind source tree ... done
Configuring valgrind ... failed
Last 20 lines of verbose log follow echo
A valgrind/VEX/Makefile-icc
A valgrind/VEX/Makefile
A valgrind/VEX/LICENSE.README
U valgrind/VEX
Checked out external at revision 1535.
Checked out revision 5513.
Configuring valgrind ... cd valgrind && ./autogen.sh && ./configure --prefix=/tmp/valgrind.8145/Inst
running: aclocal
running: autoheader
running: automake -a
configure.in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
configure.in:112: installing `./config.guess'
configure.in:112: installing `./config.sub'
addrcheck/Makefile.am: installing `./depcomp'
auxprogs/Makefile.am: installing `./compile'
DIST_SUBDIRS: variable `VG_ARCH_ALL' is used but `VG_ARCH_ALL' is undefined
error: while running 'automake -a'
=================================================
== Difference between 24 hours ago and now ==
=================================================
*** old.short Thu Jan 12 03:16:46 2006
--- new.short Thu Jan 12 03:18:16 2006
***************
*** 11,13 ****
! Checked out revision 5513.
Configuring valgrind ... cd valgrind && ./autogen.sh && ./configure --prefix=/tmp/valgrind.8145/Inst
--- 11,13 ----
! Checked out revision 5517.
Configuring valgrind ... cd valgrind && ./autogen.sh && ./configure --prefix=/tmp/valgrind.8145/Inst
|