You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(16) |
2
(23) |
3
(15) |
|
4
(19) |
5
(21) |
6
(27) |
7
(18) |
8
(17) |
9
(15) |
10
(11) |
|
11
(9) |
12
(18) |
13
(26) |
14
(28) |
15
(26) |
16
(20) |
17
(27) |
|
18
(16) |
19
(40) |
20
(2) |
21
(11) |
22
(27) |
23
(24) |
24
(16) |
|
25
(10) |
26
(12) |
27
(16) |
28
(7) |
29
(6) |
30
(15) |
31
(5) |
|
From: <sv...@va...> - 2005-12-30 22:52:23
|
Author: sewardj
Date: 2005-12-30 22:52:20 +0000 (Fri, 30 Dec 2005)
New Revision: 5465
Log:
Finally fix the bug causing dynamic ppc64-linux executables not to
work: start with with the correct toc pointer (r2), rather than some
nonsense value.
Modified:
trunk/coregrind/m_main.c
trunk/coregrind/m_ume.c
trunk/coregrind/pub_core_ume.h
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 2005-12-30 22:50:01 UTC (rev 5464)
+++ trunk/coregrind/m_main.c 2005-12-30 22:52:20 UTC (rev 5465)
@@ -299,7 +299,7 @@
static=20
Addr setup_client_stack( void* init_sp,
char** orig_envp,=20
- const struct exeinfo *info,
+ const ExeInfo* info,
UInt** client_auxv,
Addr clstack_end,
SizeT clstack_max_size )
@@ -819,8 +819,9 @@
=20
/* Load the client whose name is VG_(argv_the_exename). */
=20
-static void load_client ( /*OUT*/struct exeinfo* info,=20
- /*OUT*/Addr* client_eip)
+static void load_client ( /*OUT*/ExeInfo* info,=20
+ /*OUT*/Addr* client_ip,
+ /*OUT*/Addr* client_toc)
{
HChar* exe_name;
Int ret;
@@ -849,7 +850,8 @@
VG_(cl_exec_fd) =3D res.val;
=20
/* Copy necessary bits of 'info' that were filled in */
- *client_eip =3D info->init_eip;
+ *client_ip =3D info->init_ip;
+ *client_toc =3D info->init_toc;
VG_(brk_base) =3D VG_(brk_limit) =3D VG_PGROUNDUP(info->brkbase);
}
=20
@@ -1698,7 +1700,7 @@
*/
static void init_thread1state ( Addr client_ip,=20
Addr client_sp,
- Addr entry,
+ Addr client_toc,
/*inout*/ ThreadArchState* arch )
{
#if defined(VGA_x86)
@@ -1761,7 +1763,7 @@
=20
/* Put essential stuff into the new state. */
arch->vex.guest_GPR1 =3D client_sp;
- arch->vex.guest_GPR2 =3D ((ULong*)entry)[1]; // TOC ptr
+ arch->vex.guest_GPR2 =3D client_toc;
arch->vex.guest_CIA =3D client_ip;
#else
# error Unknown arch
@@ -1919,18 +1921,19 @@
=20
Int main(Int argc, HChar **argv, HChar **envp)
{
- HChar* toolname =3D "memcheck"; // default to Memcheck
- HChar** env =3D NULL;
- Int need_help =3D 0; // 0 =3D no, 1 =3D --help, 2 =3D --h=
elp-debug
- Addr initial_client_IP =3D 0;
- Addr initial_client_SP =3D 0;
- Addr clstack_top =3D 0;
- SizeT clstack_max_size =3D 0;
+ HChar* toolname =3D "memcheck"; // default to Memcheck
+ HChar** env =3D NULL;
+ Int need_help =3D 0; // 0 =3D no, 1 =3D --help, 2 =3D --=
help-debug
+ Addr initial_client_IP =3D 0;
+ Addr initial_client_SP =3D 0;
+ Addr initial_client_TOC =3D 0;
+ Addr clstack_top =3D 0;
+ SizeT clstack_max_size =3D 0;
UInt* client_auxv;
Int loglevel, i;
Bool logging_to_fd;
struct vki_rlimit zero =3D { 0, 0 };
- struct exeinfo info;
+ ExeInfo info;
=20
//=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
//
@@ -2127,7 +2130,7 @@
if (VG_(args_the_exename) =3D=3D NULL)
missing_prog();
=20
- load_client(&info, &initial_client_IP);
+ load_client(&info, &initial_client_IP, &initial_client_TOC);
}
=20
//--------------------------------------------------------------
@@ -2164,9 +2167,10 @@
=20
VG_(debugLog)(2, "main",
"Client info: "
- "initial_IP=3D%p initial_SP=3D%p brk_base=3D%p\n"=
,
+ "initial_IP=3D%p initial_SP=3D%p initial_TOC=3D%p=
brk_base=3D%p\n",
(void*)initial_client_IP,=20
(void*)initial_client_SP,
+ (void*)initial_client_TOC,
(void*)VG_(brk_base) );
}
=20
@@ -2483,8 +2487,9 @@
// setup_scheduler() [for the rest of state 1 stuff]
//--------------------------------------------------------------
VG_(debugLog)(1, "main", "Initialise thread 1's state\n");
- init_thread1state( initial_client_IP, initial_client_SP,=20
- info.entry,
+ init_thread1state( initial_client_IP,=20
+ initial_client_SP,=20
+ initial_client_TOC,
&VG_(threads)[1].arch);
=20
//--------------------------------------------------------------
Modified: trunk/coregrind/m_ume.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_ume.c 2005-12-30 22:50:01 UTC (rev 5464)
+++ trunk/coregrind/m_ume.c 2005-12-30 22:52:20 UTC (rev 5465)
@@ -93,7 +93,7 @@
sp++;
sp++;
=20
-#if defined(VGA_ppc32)
+#if defined(VGA_ppc32) || defined(VGA_ppc64)
# if defined AT_IGNOREPPC
while (*sp =3D=3D AT_IGNOREPPC) // skip AT_IGNOREPPC entries
sp +=3D 2;
@@ -315,7 +315,7 @@
=20
- The entry point in INFO is set to the interpreter's entry point,
and we're done. */
-static Int load_ELF(Int fd, const char *name, /*MOD*/struct exeinfo *inf=
o)
+static Int load_ELF(Int fd, const HChar* name, /*MOD*/ExeInfo* info)
{
SysRes sres;
struct elfinfo *e;
@@ -498,9 +498,11 @@
TOC entry contains three words; the first word is the function
address, the second word is the TOC ptr (r2), and the third word
is the static chain value. */
- info->init_eip =3D ((ULong*)entry)[0];
+ info->init_ip =3D ((ULong*)entry)[0];
+ info->init_toc =3D ((ULong*)entry)[1];
#else
- info->init_eip =3D (Addr)entry;
+ info->init_ip =3D (Addr)entry;
+ info->init_toc =3D 0; /* meaningless on this platform */
#endif
VG_(free)(e->p);
VG_(free)(e);
@@ -532,10 +534,10 @@
}
=20
// Forward declaration.
-static Int do_exec_inner(const char *exe, struct exeinfo *info);
+static Int do_exec_inner(const HChar* exe, ExeInfo* info);
=20
/* returns: 0 =3D success, non-0 is failure */
-static Int load_script(Int fd, const char *name, struct exeinfo *info)
+static Int load_script(Int fd, const HChar* name, ExeInfo* info)
{
Char hdr[VKI_PAGE_SIZE];
Int len =3D VKI_PAGE_SIZE;
@@ -608,7 +610,7 @@
} ExeFormat;
=20
// Check the file looks executable.
-SysRes VG_(pre_exec_check)(const Char* exe_name, Int* out_fd)
+SysRes VG_(pre_exec_check)(const HChar* exe_name, Int* out_fd)
{
Int fd, ret;
SysRes res;
@@ -663,7 +665,7 @@
// We can execute only ELF binaries or scripts that begin with "#!". (N=
ot,
// for example, scripts that don't begin with "#!"; see the VG_(do_exec=
)()
// invocation from m_main.c for how that's handled.)
-static Int do_exec_inner(const char *exe, struct exeinfo *info)
+static Int do_exec_inner(const HChar *exe, ExeInfo* info)
{
SysRes res;
Int fd;
@@ -728,8 +730,8 @@
// bash as a guide). It's worth noting that the shell can execute some
// things that VG_(do_exec)() (which subsitutes for the kernel's exec())
// will refuse to (eg. scripts lacking a "#!" prefix).
-static Int do_exec_shell_followup(Int ret, Char* exe_name,
- struct exeinfo* info)
+static Int do_exec_shell_followup(Int ret, HChar* exe_name,
+ ExeInfo* info)
{
Char* default_interp_name =3D "/bin/sh";
SysRes res;
@@ -797,7 +799,7 @@
// See ume.h for an indication of which entries of 'info' are inputs, wh=
ich
// are outputs, and which are both.
/* returns: 0 =3D success, non-0 is failure */
-Int VG_(do_exec)(const char *exe_name, struct exeinfo *info)
+Int VG_(do_exec)(const HChar* exe_name, ExeInfo* info)
{
Int ret;
=20
Modified: trunk/coregrind/pub_core_ume.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_ume.h 2005-12-30 22:50:01 UTC (rev 5464)
+++ trunk/coregrind/pub_core_ume.h 2005-12-30 22:52:20 UTC (rev 5465)
@@ -74,36 +74,40 @@
=20
// Info needed to load and run a program. IN/INOUT/OUT refers to the
// inputs/outputs of do_exec().
-struct exeinfo
-{
- char** argv; // IN: the original argv
+typedef
+ struct {
+ HChar** argv; // IN: the original argv
=20
- Addr exe_base; // INOUT: lowest (allowed) address of exe
- Addr exe_end; // INOUT: highest (allowed) address
+ Addr exe_base; // INOUT: lowest (allowed) address of exe
+ Addr exe_end; // INOUT: highest (allowed) address
=20
- Addr phdr; // OUT: address phdr was mapped at
- int phnum; // OUT: number of phdrs
- Addr interp_base; // OUT: where interpreter (ld.so) was mapped
- Addr entry; // OUT: entrypoint in main executable
- Addr init_eip; // OUT: initial eip
- Addr brkbase; // OUT: base address of brk segment
+ Addr phdr; // OUT: address phdr was mapped at
+ Int phnum; // OUT: number of phdrs
+ Addr interp_base; // OUT: where interpreter (ld.so) was mapped
+ Addr entry; // OUT: entrypoint in main executable
+ Addr init_ip; // OUT: address of first instruction to execute
+ Addr brkbase; // OUT: base address of brk segment
+ Addr init_toc; // OUT: address of table-of-contents, on
+ // platforms for which that makes sense
+ // (ppc64-linux only)
=20
- // These are the extra args added by #! scripts
- char* interp_name; // OUT: the interpreter name
- char* interp_args; // OUT: the args for the interpreter
-};
+ // These are the extra args added by #! scripts
+ HChar* interp_name; // OUT: the interpreter name
+ HChar* interp_args; // OUT: the args for the interpreter
+ }
+ ExeInfo;
=20
// Do a number of appropriate checks to see if the file looks executable=
by
// the kernel: ie. it's a file, it's readable and executable, and it's i=
n
// either ELF or "#!" format. On success, 'out_fd' gets the fd of the f=
ile
// if it's non-NULL. Otherwise the fd is closed.
-extern SysRes VG_(pre_exec_check)(const Char* exe_name, Int* out_fd);
+extern SysRes VG_(pre_exec_check)(const HChar* exe_name, Int* out_fd);
=20
// Does everything short of actually running 'exe': finds the file,
// checks execute permissions, sets up interpreter if program is a scrip=
t,=20
// reads headers, maps file into memory, and returns important info abou=
t
// the program.
-extern Int VG_(do_exec)(const char *exe, struct exeinfo *info);
+extern Int VG_(do_exec)(const HChar* exe, ExeInfo* info);
=20
/*------------------------------------------------------------*/
/*--- Finding and dealing with auxv ---*/
|
|
From: <sv...@va...> - 2005-12-30 22:50:06
|
Author: sewardj
Date: 2005-12-30 22:50:01 +0000 (Fri, 30 Dec 2005)
New Revision: 5464
Log:
Fix typo
Modified:
trunk/auxprogs/gsl16test
Modified: trunk/auxprogs/gsl16test
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/auxprogs/gsl16test 2005-12-30 22:49:24 UTC (rev 5463)
+++ trunk/auxprogs/gsl16test 2005-12-30 22:50:01 UTC (rev 5464)
@@ -23,7 +23,7 @@
=20
if [ $# !=3D 5 ]
then=20
- echo "usage: gsl15test /absolute/name/of/gsl-1.6-patched.tar.gz"
+ echo "usage: gsl16test /absolute/name/of/gsl-1.6-patched.tar.gz"
echo " C-compiler-command" =20
echo " flags-for-C-compiler" =20
echo " Valgrind-command"
|
|
From: Nicholas N. <nj...@cs...> - 2005-12-30 22:49:37
|
On Fri, 30 Dec 2005, Nicholas Nethercote wrote: > I assume he meant a memory access trace. I've modified Lackey to do this if > the --trace-mem=yes option is specified, since people ask for this about once > a month. It was very simple. Check out the code from the SVN repository to > use the new option. I just realised the way I implemented makes instructions that modify memory look like a load followed by a separate store. Try Dullard (see http://www.cs.utexas.edu/~njn/software.html) which is based on an old version of Valgrind but should do the job. Nick |
|
From: <sv...@va...> - 2005-12-30 22:49:28
|
Author: sewardj
Date: 2005-12-30 22:49:24 +0000 (Fri, 30 Dec 2005)
New Revision: 5463
Log:
A couple more ppc64-linux syscalls.
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.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_syswrap/syswrap-ppc64-linux.c 2005-12-30 22:39:58 U=
TC (rev 5462)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2005-12-30 22:49:24 U=
TC (rev 5463)
@@ -1364,7 +1364,7 @@
=20
// _____(__NR_sched_get_priority_min, sys_sched_get_priority_min), // 1=
60
// _____(__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 1=
61
-// _____(__NR_nanosleep, sys_nanosleep), // 162
+ GENXY(__NR_nanosleep, sys_nanosleep), // 162
// _____(__NR_mremap, sys_mremap), // 163
// _____(__NR_setresuid, sys_setresuid), // 164
=20
@@ -1378,7 +1378,7 @@
// _____(__NR_prctl, sys_prctl), // 171
// _____(__NR_rt_sigreturn, sys_rt_sigreturn), // 172
LINXY(__NR_rt_sigaction, sys_rt_sigaction), // 173
-// _____(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 174
+ LINXY(__NR_rt_sigprocmask, sys_rt_sigprocmask), // 174
=20
// _____(__NR_rt_sigpending, sys_rt_sigpending), // 175
// _____(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 176
|
|
From: Nicholas N. <nj...@cs...> - 2005-12-30 22:42:55
|
On Fri, 30 Dec 2005, Tom Hughes wrote: >> This is actually quite a noob question. I'm a CS student doing a Final >> Year Project of my Bachelor's on Virtual Memory in Linux. I'll need to >> extract memory reference strings from Linux programs. I could either >> (1) find something written by someone >> or >> (2) modify Valgrind to log every reference. >> Does anyone know of anything readily available? > > I might be being a bit dense here, but what on earth is a memory > reference string? I've never heard of such a thing before... I assume he meant a memory access trace. I've modified Lackey to do this if the --trace-mem=yes option is specified, since people ask for this about once a month. It was very simple. Check out the code from the SVN repository to use the new option. Nick |
|
From: <sv...@va...> - 2005-12-30 22:40:08
|
Author: njn
Date: 2005-12-30 22:39:58 +0000 (Fri, 30 Dec 2005)
New Revision: 5462
Log:
Add a --trace-mem option to Lackey to print out a memory access trace, if
only so people will stop asking how to do it.
Modified:
trunk/lackey/docs/lk-manual.xml
trunk/lackey/lk_main.c
Modified: trunk/lackey/docs/lk-manual.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/lackey/docs/lk-manual.xml 2005-12-30 15:02:49 UTC (rev 5461)
+++ trunk/lackey/docs/lk-manual.xml 2005-12-30 22:39:58 UTC (rev 5462)
@@ -4,7 +4,7 @@
=20
<chapter id=3D"lk-manual" xreflabel=3D"Lackey">
=20
-<title>Lackey: a very simple profiler</title>
+<title>Lackey: a simple profiler and memory tracer</title>
=20
<para>To use this tool, you must specify
<computeroutput>--tool=3Dlackey</computeroutput> on the Valgrind
@@ -71,6 +71,16 @@
"F32", "F64", and "V128").</para>
</listitem>
=20
+ <listitem>
+ <para>When command line option
+ <computeroutput>--trace-mem=3Dyes</computeroutput> is
+ specified, it prints out the size and address of almost every load a=
nd
+ store made by the program. See Section 3.3.7 of Nicholas Nethercote=
's
+ PhD dissertation "Dynamic Binary Analysis and Instrumentation", 2004=
,
+ for details about the few loads and stores that it misses, and other
+ caveats about the accuracy of the address trace.</para>
+ </listitem>
+
</orderedlist>
=20
</listitem>
Modified: trunk/lackey/lk_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/lackey/lk_main.c 2005-12-30 15:02:49 UTC (rev 5461)
+++ trunk/lackey/lk_main.c 2005-12-30 22:39:58 UTC (rev 5462)
@@ -29,6 +29,27 @@
The GNU General Public License is contained in the file COPYING.
*/
=20
+// This tool shows how to do some basic instrumentation.
+//
+// In particular, if you are interested in tracing every load and store =
a
+// program does, use the --trace-mem=3Dyes option. Please note that the
+// address trace is good, but not perfect; see Section 3.3.7 of Nichola=
s
+// Nethercote's PhD dissertation "Dynamic Binary Analysis and
+// Instrumentation", 2004, for details about the few loads and stores th=
at
+// it misses, and other caveats about the accuracy of the address trace.
+//
+// If you want to modify how the memory traces are printed/gathered, loo=
k at
+// the code that is controlled by the variable 'lk_clo_trace_mem' and th=
e
+// functions 'trace_load()' and 'trace_mem'.. With a bit of effort you
+// should be able to see which other bits of code can be removed, if tha=
t's
+// what you want. If you want to do more complex modifications, please =
read
+// VEX/pub/libvex_ir.h to understand the intermediate representation.
+//
+// For further inspiration, you should look at cachegrind/cg_main.c whic=
h
+// handles memory accesses in a more sophisticated way -- it groups them
+// together for processing into twos and threes so that fewer C calls ar=
e
+// made and things run faster.
+
#include "pub_tool_basics.h"
#include "pub_tool_tooliface.h"
#include "pub_tool_libcassert.h"
@@ -47,6 +68,9 @@
* with command line option --detailed-counts. */
static Bool lk_clo_detailed_counts =3D False;
=20
+/* If true, print the trace of loads and stores. Set with --trace-mem. =
*/
+static Bool lk_clo_trace_mem =3D False;
+
/***********************************************************************
* Implement the needs_command_line_options for Valgrind.
**********************************************************************/
@@ -55,6 +79,7 @@
{
VG_STR_CLO(arg, "--fnname", lk_clo_fnname)
else VG_BOOL_CLO(arg, "--detailed-counts", lk_clo_detailed_counts)
+ else VG_BOOL_CLO(arg, "--trace-mem", lk_clo_trace_mem)
else
return False;
=20
@@ -88,7 +113,6 @@
static ULong n_Jccs =3D 0;
static ULong n_Jccs_untaken =3D 0;
=20
-__attribute__((unused))
static void add_one_func_call(void)
{
n_func_calls++;
@@ -104,13 +128,11 @@
n_BBs_completed++;
}
=20
-__attribute__((unused))
static void add_one_IRStmt(void)
{
n_IRStmts++;
}
=20
-__attribute__((unused))
static void add_one_guest_instr(void)
{
n_guest_instrs++;
@@ -224,6 +246,20 @@
=20
=20
/***********************************************************************
+ * Data and helpers related to --trace-mem. =20
+ **********************************************************************/
+
+static VG_REGPARM(2) void trace_load(Addr addr, SizeT size)
+{
+ VG_(printf)("load : %p, %d\n", addr, size);
+}
+
+static VG_REGPARM(2) void trace_store(Addr addr, SizeT size)
+{
+ VG_(printf)("store: %p, %d\n", addr, size);
+}
+
+/***********************************************************************
* Implement the basic_tool_funcs for Valgrind.
**********************************************************************/
=20
@@ -246,6 +282,9 @@
IRBB* bb;
Char fnname[100];
IRType type;
+ IRExpr** argv;
+ IRExpr* addr_expr;
+ IRExpr* size_expr;
=20
if (gWordTy !=3D hWordTy) {
/* We don't currently support this case. */
@@ -345,6 +384,19 @@
* constrains them to being flat SSA-style.
*/
case Ist_Store:
+ // Add a call to trace_store() if --trace-mem=3Dyes.
+ if (lk_clo_trace_mem) {
+ addr_expr =3D st->Ist.Store.addr;
+ size_expr =3D mkIRExpr_HWord(=20
+ sizeofIRType(
+ typeOfIRExpr(bb->tyenv, st->Ist.Store.dat=
a)));
+ argv =3D mkIRExprVec_2( addr_expr, size_expr );
+ di =3D unsafeIRDirty_0_N( /*regparms*/2,=20
+ "trace_store",
+ VG_(fnptr_to_fnentry)( trace_stor=
e ),=20
+ argv );
+ addStmtToIRBB( bb, IRStmt_Dirty(di) );
+ }
if (lk_clo_detailed_counts) {
type =3D typeOfIRExpr(bb->tyenv, st->Ist.Store.data);
tl_assert(type !=3D Ity_INVALID);
@@ -354,6 +406,20 @@
break;
=20
case Ist_Tmp:
+ // Add a call to trace_load() if --trace-mem=3Dyes.
+ if (lk_clo_trace_mem) {
+ IRExpr* data =3D st->Ist.Tmp.data;
+ if (data->tag =3D=3D Iex_Load) {
+ addr_expr =3D data->Iex.Load.addr;
+ size_expr =3D mkIRExpr_HWord( sizeofIRType(data->Iex.L=
oad.ty) );
+ argv =3D mkIRExprVec_2( addr_expr, size_expr );
+ di =3D unsafeIRDirty_0_N( /*regparms*/2,=20
+ "trace_load",
+ VG_(fnptr_to_fnentry)( trace_l=
oad ),=20
+ argv );
+ addStmtToIRBB( bb, IRStmt_Dirty(di) );
+ }
+ }
if (lk_clo_detailed_counts) {
IRExpr* expr =3D st->Ist.Tmp.data;
type =3D typeOfIRExpr(bb->tyenv, expr);
|
|
From: <sv...@va...> - 2005-12-30 15:04:34
|
Author: sewardj
Date: 2005-12-30 15:04:29 +0000 (Fri, 30 Dec 2005)
New Revision: 1520
Log:
Apparently "sync" has an undocumented relative called "lwsync". Sigh.
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 2005-12-30 03:39:14 UTC (rev 1519)
+++ trunk/priv/guest-ppc/toIR.c 2005-12-30 15:04:29 UTC (rev 1520)
@@ -4511,18 +4511,38 @@
break;
}
=20
- case 0x256: // sync (Synchronize, PPC32 p543)
- if (b11to25 !=3D 0 || b0 !=3D 0) {
- vex_printf("dis_memsync(ppc)(sync,b11to25|b0)\n");
+ case 0x256: // sync (Synchronize, PPC32 p543),=20
+ // also lwsync, which appears to be undocumented
+ /* http://sources.redhat.com/ml/binutils/2000-12/msg00311.html
+
+ The PowerPC architecture used in IBM chips has expanded
+ the sync instruction into two variants: lightweight sync
+ and heavyweight sync. The original sync instruction is
+ the new heavyweight sync and lightweight sync is a strict
+ subset of the heavyweight sync functionality. This allows
+ the programmer to specify a less expensive operation on
+ high-end systems when the full sync functionality is not
+ necessary.
+
+ The basic "sync" mnemonic now utilizes an operand. "sync"
+ without an operand now becomes a extended mnemonic for
+ heavyweight sync. Processors without the lwsync
+ instruction will not decode the L field and will perform a
+ heavyweight sync. Everything is backward compatible.
+
+ sync =3D sync 0
+ lwsync =3D sync 1
+ */
+ if ((b11to25 !=3D 0/*sync*/ && b11to25 !=3D 1024/*lwsync*/) || =
b0 !=3D 0) {
+ vex_printf("dis_memsync(ppc)(sync/lwsync,b11to25|b0)\n");
return False;
}
- DIP("sync\n");
+ DIP("%ssync\n", b11to25 =3D=3D 1024 ? "lw" : "");
/* Insert a memory fence. It's sometimes important that these
are carried through to the generated code. */
stmt( IRStmt_MFence() );
break;
=20
-
/* 64bit Memsync */
case 0x054: // ldarx (Load DWord and Reserve Indexed, PPC64 p473)
if (b0 !=3D 0) {
|
|
From: <sv...@va...> - 2005-12-30 15:02:54
|
Author: sewardj
Date: 2005-12-30 15:02:49 +0000 (Fri, 30 Dec 2005)
New Revision: 5461
Log:
More ppc64-linux syscalls.
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.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_syswrap/syswrap-ppc64-linux.c 2005-12-30 04:16:37 U=
TC (rev 5460)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2005-12-30 15:02:49 U=
TC (rev 5461)
@@ -1320,7 +1320,7 @@
// _____(__NR_modify_ldt, sys_modify_ldt), // 123
// _____(__NR_adjtimex, sys_adjtimex), // 124
=20
-// _____(__NR_mprotect, sys_mprotect), // 125
+ GENXY(__NR_mprotect, sys_mprotect), // 125
// _____(__NR_sigprocmask, sys_sigprocmask), // 126
// _____(__NR_create_module, sys_create_module), // 127
// _____(__NR_init_module, sys_init_module), // 128
@@ -1345,7 +1345,7 @@
// _____(__NR_msync, sys_msync), // 144
=20
// _____(__NR_readv, sys_readv), // 145
-// _____(__NR_writev, sys_writev), // 146
+ GENX_(__NR_writev, sys_writev), // 146
// _____(__NR_getsid, sys_getsid), // 147
// _____(__NR_fdatasync, sys_fdatasync), // 148
// _____(__NR__sysctl, sys__sysctl), // 149
@@ -1388,7 +1388,7 @@
=20
// _____(__NR_pwrite64, sys_pwrite64), // 180
GENX_(__NR_chown, sys_chown), // 181
-// _____(__NR_getcwd, sys_getcwd), // 182
+ GENXY(__NR_getcwd, sys_getcwd), // 182
// _____(__NR_capget, sys_capget), // 183
// _____(__NR_capset, sys_capset), // 184
=20
|
|
From: Tom H. <to...@co...> - 2005-12-30 13:11:09
|
In message <Pin...@sf...>
Leung Ngai-Hang Zachary <leu...@co...> wrote:
> This is actually quite a noob question. I'm a CS student doing a Final
> Year Project of my Bachelor's on Virtual Memory in Linux. I'll need to
> extract memory reference strings from Linux programs. I could either
> (1) find something written by someone
> or
> (2) modify Valgrind to log every reference.
> Does anyone know of anything readily available?
I might be being a bit dense here, but what on earth is a memory
reference string? I've never heard of such a thing before...
> If there isn't something readily available, could someone tell me which
> files I should look at and if there is any documentation for the
> data structures used by Valgrind? I'm quite experienced at doing small
> C++ academic programs, do you think in a month or so of working hard at
> it I could finish the necessary modifications?
Hard to say until we understand what it is you're trying to do.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Leung Ngai-H. Z. <leu...@co...> - 2005-12-30 12:49:17
|
Hi This is actually quite a noob question. I'm a CS student doing a Final Year Project of my Bachelor's on Virtual Memory in Linux. I'll need to extract memory reference strings from Linux programs. I could either (1) find something written by someone or (2) modify Valgrind to log every reference. Does anyone know of anything readily available? If there isn't something readily available, could someone tell me which files I should look at and if there is any documentation for the data structures used by Valgrind? I'm quite experienced at doing small C++ academic programs, do you think in a month or so of working hard at it I could finish the necessary modifications? Thanks Zac |
|
From: <sv...@va...> - 2005-12-30 04:16:56
|
Author: sewardj
Date: 2005-12-30 04:16:37 +0000 (Fri, 30 Dec 2005)
New Revision: 5460
Log:
Fix up ppc64 dispatcher following the changes made by r5441.
Modified:
trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S
trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S
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 2005-12-29 17:46:04=
UTC (rev 5459)
+++ trunk/coregrind/m_dispatch/dispatch-ppc32-linux.S 2005-12-30 04:16:37=
UTC (rev 5460)
@@ -259,7 +259,7 @@
beq counter_is_zero
=20
/* try a fast lookup in the translation cache */
- /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong)
+ /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong*)
=3D ((r3 >>u 2) & VG_TT_FAST_MASK) << 2 */
rlwinm 4,3, 0, 32-2-VG_TT_FAST_BITS, 31-2 =20
addis 5,4,VG_(tt_fast)@ha
@@ -315,7 +315,7 @@
beq counter_is_zero
=20
/* try a fast lookup in the translation cache */
- /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong)
+ /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong*)
=3D ((r3 >>u 2) & VG_TT_FAST_MASK) << 2 */
rlwinm 4,3, 0, 32-2-VG_TT_FAST_BITS, 31-2=20
addis 5,4,VG_(tt_fast)@ha
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 2005-12-29 17:46:04=
UTC (rev 5459)
+++ trunk/coregrind/m_dispatch/dispatch-ppc64-linux.S 2005-12-30 04:16:37=
UTC (rev 5460)
@@ -276,14 +276,16 @@
std 3,OFFSET_ppc64_CIA(31)
=20
/* Are we out of timeslice? If yes, defer to scheduler. */
-// subic. 29,29,1
subi 29,29,1
cmpldi 29,0
beq .counter_is_zero
=20
/* try a fast lookup in the translation cache */
- /* r4=3D((r3<<3) & (VG_TT_FAST_MASK<<3)) */
- rldic 4,3, 3, 64-3-VG_TT_FAST_BITS
+ /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong*)
+ =3D ((r3 >>u 2) & VG_TT_FAST_MASK) << 3 */
+ rldicl 4,3, 62, 64-VG_TT_FAST_BITS
+ sldi 4,4,3
+
ld 5, .tocent__vgPlain_tt_fast@toc(2)
ldx 5, 5,4 /* r5 =3D VG_(tt_fast)[r3 & VG_TT_FAST_MASK] */
ld 6, 0(5) /* r6 =3D (r5)->orig_addr */
@@ -344,14 +346,16 @@
std 3,OFFSET_ppc64_CIA(31)
=20
/* Are we out of timeslice? If yes, defer to scheduler. */
-// subic. 29,29,1
subi 29,29,1
cmpldi 29,0
beq .counter_is_zero
=20
/* try a fast lookup in the translation cache */
- /* r4=3D((r3<<3) & (VG_TT_FAST_MASK<<3)) */
- rldic 4,3, 3, 64-3-VG_TT_FAST_BITS
+ /* r4 =3D VG_TT_FAST_HASH(addr) * sizeof(ULong*)
+ =3D ((r3 >>u 2) & VG_TT_FAST_MASK) << 3 */
+ rldicl 4,3, 62, 64-VG_TT_FAST_BITS
+ sldi 4,4,3
+
ld 5, .tocent__vgPlain_tt_fast@toc(2)
ldx 5, 5,4 /* r5 =3D VG_(tt_fast)[r3 & VG_TT_FAST_MASK] */
ld 6, 0(5) /* r6 =3D (r5)->orig_addr */
|
|
From: <js...@ac...> - 2005-12-30 04:09:51
|
Nightly build on phoenix ( SuSE 10.0 ) started at 2005-12-30 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 == 208 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: <js...@ac...> - 2005-12-30 03:54:56
|
Nightly build on g5 ( YDL 4.0, ppc970 ) started at 2005-12-30 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 == 176 tests, 15 stderr failures, 1 stdout failure ================= memcheck/tests/badjump (stderr) memcheck/tests/badjump2 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/mempool (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/supp1 (stderr) memcheck/tests/supp_unknown (stderr) memcheck/tests/toobig-allocs (stderr) memcheck/tests/xml1 (stderr) massif/tests/toobig-allocs (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) |
|
From: Tom H. <to...@co...> - 2005-12-30 03:43:09
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-12-30 03:30:06 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 == 210 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/leak-tree (stderr) memcheck/tests/mempool (stderr) memcheck/tests/pointer-trace (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: <sv...@va...> - 2005-12-30 03:39:24
|
Author: sewardj
Date: 2005-12-30 03:39:14 +0000 (Fri, 30 Dec 2005)
New Revision: 1519
Log:
Handle dcbz in 64-bit mode.
Modified:
trunk/priv/guest-ppc/toIR.c
trunk/priv/host-ppc/hdefs.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 2005-12-28 00:54:57 UTC (rev 1518)
+++ trunk/priv/guest-ppc/toIR.c 2005-12-30 03:39:14 UTC (rev 1519)
@@ -5157,10 +5157,7 @@
IRExpr* irx_addr;
UInt i;
DIP("dcbz r%u,r%u\n", rA_addr, rB_addr);
- if (mode64) {
- DIP(" =3D> mode64 not implemented\n");
- return False;
- }
+
assign( EA, ea_rAor0_idxd(rA_addr, rB_addr) );
=20
if (mode64) {
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 2005-12-28 00:54:57 UTC (rev 1518)
+++ trunk/priv/host-ppc/hdefs.c 2005-12-30 03:39:14 UTC (rev 1519)
@@ -254,25 +254,29 @@
/* Don't waste the reg-allocs's time trawling through zillions of
FP registers - they mostly will never be used. We'll tolerate
the occasional extra spill instead. */
- (*arr)[i++] =3D hregPPC_FPR0();
- (*arr)[i++] =3D hregPPC_FPR1();
- (*arr)[i++] =3D hregPPC_FPR2();
- (*arr)[i++] =3D hregPPC_FPR3();
- (*arr)[i++] =3D hregPPC_FPR4();
- (*arr)[i++] =3D hregPPC_FPR5();
- (*arr)[i++] =3D hregPPC_FPR6();
- (*arr)[i++] =3D hregPPC_FPR7();
+ /* For both ppc32-linux and ppc64-linux, f14-f31 are callee save.
+ So use them. */
+ (*arr)[i++] =3D hregPPC_FPR14();
+ (*arr)[i++] =3D hregPPC_FPR15();
+ (*arr)[i++] =3D hregPPC_FPR16();
+ (*arr)[i++] =3D hregPPC_FPR17();
+ (*arr)[i++] =3D hregPPC_FPR18();
+ (*arr)[i++] =3D hregPPC_FPR19();
+ (*arr)[i++] =3D hregPPC_FPR20();
+ (*arr)[i++] =3D hregPPC_FPR21();
=20
/* Same deal re Altivec */
+ /* For both ppc32-linux and ppc64-linux, v20-v31 are callee save.
+ So use them. */
/* NB, vr29 is used as a scratch temporary -- do not allocate */
- (*arr)[i++] =3D hregPPC_VR0();
- (*arr)[i++] =3D hregPPC_VR1();
- (*arr)[i++] =3D hregPPC_VR2();
- (*arr)[i++] =3D hregPPC_VR3();
- (*arr)[i++] =3D hregPPC_VR4();
- (*arr)[i++] =3D hregPPC_VR5();
- (*arr)[i++] =3D hregPPC_VR6();
- (*arr)[i++] =3D hregPPC_VR7();
+ (*arr)[i++] =3D hregPPC_VR20();
+ (*arr)[i++] =3D hregPPC_VR21();
+ (*arr)[i++] =3D hregPPC_VR22();
+ (*arr)[i++] =3D hregPPC_VR23();
+ (*arr)[i++] =3D hregPPC_VR24();
+ (*arr)[i++] =3D hregPPC_VR25();
+ (*arr)[i++] =3D hregPPC_VR26();
+ (*arr)[i++] =3D hregPPC_VR27();
=20
vassert(i =3D=3D *nregs);
}
@@ -1686,6 +1690,10 @@
mode32: r3 to r12
mode64: r3 to r10
*/
+ /* XXXXXXXXXXXXXXXXX BUG! This doesn't say anything about the FP
+ or Altivec registers. We get away with this ONLY because
+ getAllocatableRegs_PPC gives the allocator callee-saved fp
+ and Altivec regs, and no caller-save ones. */
addHRegUse(u, HRmWrite, hregPPC_GPR3(mode64));
addHRegUse(u, HRmWrite, hregPPC_GPR4(mode64));
addHRegUse(u, HRmWrite, hregPPC_GPR5(mode64));
|