|
From: <sv...@va...> - 2006-10-05 12:43:36
|
Author: sewardj
Date: 2006-10-05 13:43:32 +0100 (Thu, 05 Oct 2006)
New Revision: 6194
Log:
Half-hearted attempt at ISO C90 compliance in the new AIX code.
Modified:
branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c
branches/AIX5/coregrind/m_debuginfo/readxcoff.c
branches/AIX5/coregrind/m_initimg/initimg-aix5.c
branches/AIX5/coregrind/m_main.c
branches/AIX5/coregrind/m_scheduler/scheduler.c
Modified: branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.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
--- branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c 2006-10-05 12:42=
:34 UTC (rev 6193)
+++ branches/AIX5/coregrind/m_aspacemgr/aspacemgr-aix5.c 2006-10-05 12:43=
:32 UTC (rev 6194)
@@ -1855,9 +1855,10 @@
SysRes VG_(am_mmap_file_fixed_client)
( Addr start, SizeT length, UInt prot, Int fd, Off64T offset )
{
+ SysRes r =3D {0,0};
ML_(am_barf)("unimplemented: VG_(am_mmap_file_fixed_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
@@ -1866,9 +1867,10 @@
=20
SysRes VG_(am_mmap_anon_fixed_client) ( Addr start, SizeT length, UInt p=
rot )
{
+ SysRes r =3D {0,0};
ML_(am_barf)("unimplemented: VG_(am_mmap_anon_fixed_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
@@ -2081,9 +2083,10 @@
SysRes VG_(am_munmap_client)( /*OUT*/Bool* need_discard,
Addr start, SizeT len )
{
+ SysRes r =3D {0,0};=20
ML_(am_barf)("unimplemented: VG_(am_munmap_client)");
/*NOTREACHED*/
- SysRes r =3D {0,0}; return r;
+ return r;
}
=20
=20
Modified: branches/AIX5/coregrind/m_debuginfo/readxcoff.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
--- branches/AIX5/coregrind/m_debuginfo/readxcoff.c 2006-10-05 12:42:34 U=
TC (rev 6193)
+++ branches/AIX5/coregrind/m_debuginfo/readxcoff.c 2006-10-05 12:43:32 U=
TC (rev 6194)
@@ -877,9 +877,9 @@
but at least it is simple: the CSECT_LEN(aux) field
contains it's length, so we just heave that into the
pot for phase 2. */
+ XCoffSym cand;
if (0) VG_(printf)("SD: len is %d\n", (Int)CSECT_LEN(aux));
if (0) VG_(printf)("SD: proposed %p\n", sym->n_value);
- XCoffSym cand;
init_XCoffSym(&cand);
cand.first =3D sym->n_value;
cand.last =3D cand.first + (UWord)CSECT_LEN(aux) - 1;
Modified: branches/AIX5/coregrind/m_initimg/initimg-aix5.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
--- branches/AIX5/coregrind/m_initimg/initimg-aix5.c 2006-10-05 12:42:34 =
UTC (rev 6193)
+++ branches/AIX5/coregrind/m_initimg/initimg-aix5.c 2006-10-05 12:43:32 =
UTC (rev 6194)
@@ -268,6 +268,7 @@
void VG_(finalise_thread1state)( /*MOD*/ThreadArchState* arch,
ClientInitImgInfo ciii )
{
+ UInt adler32_act;
SysRes sres;
/* On AIX we get a block of 37 words telling us the initial state
for (GPR0 .. GPR31, PC, CR, LR, CTR, XER), and we start with all
@@ -427,7 +428,7 @@
=20
Huffman_Uncompress( (void*)ciii.compressed_page, unz_page,
VKI_PAGE_SIZE, VKI_PAGE_SIZE );
- UInt adler32_act =3D compute_adler32(unz_page, VKI_PAGE_SIZE);
+ adler32_act =3D compute_adler32(unz_page, VKI_PAGE_SIZE);
=20
VG_(debugLog)(1, "initimg",=20
"decompress done, adler32s: act 0x%x, exp 0x%x\n",
@@ -479,9 +480,10 @@
sys_kload() but didn't make usla do the relevant
relocations. */
} else {
+ UChar** p;
Int r =3D loadquery(L_GETMESSAGES, buf, NBUF);
VG_(debugLog)(0, "initimg", "loadquery returned %d (0 =3D success)=
\n", r);
- UChar** p =3D (UChar**)(&buf[0]);
+ p =3D (UChar**)(&buf[0]);
for (; *p; p++)
VG_(debugLog)(0, "initimg", "\"%s\"\n", *p);
VG_(debugLog)(0, "initimg", "Use /usr/sbin/execerror to make "
Modified: branches/AIX5/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
--- branches/AIX5/coregrind/m_main.c 2006-10-05 12:42:34 UTC (rev 6193)
+++ branches/AIX5/coregrind/m_main.c 2006-10-05 12:43:32 UTC (rev 6194)
@@ -2284,22 +2284,24 @@
void _start_in_C_aix5 ( AIX5Bootblock* bootblock );
void _start_in_C_aix5 ( AIX5Bootblock* bootblock )
{
- Int r;
+ Int r;
+ ULong* intregs37;
+ UWord argc, argv, envp;
__NR_getpid =3D bootblock->__NR_getpid;
__NR_write =3D bootblock->__NR_write;
__NR_exit =3D bootblock->__NR_exit;
__NR_open =3D bootblock->__NR_open;
__NR_read =3D bootblock->__NR_read;
__NR_close =3D bootblock->__NR_close;
- ULong* intregs37 =3D &bootblock->iregs_pc_cr_lr_ctr_xer[0];
+ intregs37 =3D &bootblock->iregs_pc_cr_lr_ctr_xer[0];
# if defined(VGP_ppc32_aix5)
- UWord argc =3D (UWord)intregs37[3]; /* client's r3 =3D=3D argc */
- UWord argv =3D (UWord)intregs37[4];
- UWord envp =3D (UWord)intregs37[5];
+ argc =3D (UWord)intregs37[3]; /* client's r3 =3D=3D argc */
+ argv =3D (UWord)intregs37[4];
+ envp =3D (UWord)intregs37[5];
# else /* defined(VGP_ppc64_aix5) */
- UWord argc =3D (UWord)intregs37[14]; /* client's r14 =3D=3D argc */
- UWord argv =3D (UWord)intregs37[15];
- UWord envp =3D (UWord)intregs37[16];
+ argc =3D (UWord)intregs37[14]; /* client's r14 =3D=3D argc */
+ argv =3D (UWord)intregs37[15];
+ envp =3D (UWord)intregs37[16];
# endif
sp_at_startup =3D (Addr)0xDeadBeefDeadBeefULL; /* Not important on AI=
X. */
r =3D valgrind_main( (Int)argc, (HChar**)argv, (HChar**)envp,=20
Modified: branches/AIX5/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
--- branches/AIX5/coregrind/m_scheduler/scheduler.c 2006-10-05 12:42:34 U=
TC (rev 6193)
+++ branches/AIX5/coregrind/m_scheduler/scheduler.c 2006-10-05 12:43:32 U=
TC (rev 6194)
@@ -861,15 +861,16 @@
/* ------------ now we don't have The Lock ------------ */
=20
# if defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
- static Int ctr=3D0;
- vg_assert(__NR_AIX5__nsleep !=3D __NR_AIX5_UNKNOWN);
- vg_assert(__NR_AIX5_yield !=3D __NR_AIX5_UNKNOWN);
- if (1 && rt > 0 && ((++ctr % 3) =3D=3D 0)) {=20
- //struct vki_timespec ts;
- //ts.tv_sec =3D 0;
- //ts.tv_nsec =3D 0*1000*1000;
- //VG_(do_syscall2)(__NR_AIX5__nsleep, (UWord)&ts, (UWord)NUL=
L);
- VG_(do_syscall0)(__NR_AIX5_yield);
+ { static Int ctr=3D0;
+ vg_assert(__NR_AIX5__nsleep !=3D __NR_AIX5_UNKNOWN);
+ vg_assert(__NR_AIX5_yield !=3D __NR_AIX5_UNKNOWN);
+ if (1 && rt > 0 && ((++ctr % 3) =3D=3D 0)) {=20
+ //struct vki_timespec ts;
+ //ts.tv_sec =3D 0;
+ //ts.tv_nsec =3D 0*1000*1000;
+ //VG_(do_syscall2)(__NR_AIX5__nsleep, (UWord)&ts, (UWord)N=
ULL);
+ VG_(do_syscall0)(__NR_AIX5_yield);
+ }
}
# endif
=20
|