Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/csu/mips Use uintptr_t instead of u_long.
details: https://anonhg.NetBSD.org/src/rev/050ef68feea2
branches: trunk
changeset: 761295:050ef68feea2
user: matt <matt%NetBSD.org@localhost>
date: Sun Jan 23 06:25:57 2011 +0000
description:
Use uintptr_t instead of u_long.
When fetching argc use off the stack, use *(long *) instead of *(int *)
because on mips64 BE system, that int deference will only fetch 0.
diffstat:
lib/csu/mips/crt0.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r ba3a57a0688f -r 050ef68feea2 lib/csu/mips/crt0.c
--- a/lib/csu/mips/crt0.c Sun Jan 23 03:15:06 2011 +0000
+++ b/lib/csu/mips/crt0.c Sun Jan 23 06:25:57 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.20 2009/12/14 01:04:02 matt Exp $ */
+/* $NetBSD: crt0.c,v 1.21 2011/01/23 06:25:57 matt Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou
@@ -52,13 +52,13 @@
* as well as the usual registers (pc, sp, and t9 == pc for ABI).
*/
-void __start(u_long, void (*)(void), const Obj_Entry *,
+void __start(uintptr_t, void (*)(void), const Obj_Entry *,
struct ps_strings *);
__asm(".text; .align 4; .globl _start; _start:");
void
-__start(u_long sp,
+__start(uintptr_t sp,
void (*cleanup)(void), /* from shared loader */
const Obj_Entry *obj, /* from shared loader */
struct ps_strings *ps_strings)
@@ -118,7 +118,7 @@
#endif
- argc = *(int *)ksp;
+ argc = *(long *)ksp;
argv = ksp + 1;
environ = ksp + 2 + argc; /* 2: argc + NULL ending argv */
@@ -149,7 +149,7 @@
#ifdef MCRT0
atexit(_mcleanup);
- monstartup((u_long)&_eprol, (u_long)&_etext);
+ monstartup((uintptr_t)&_eprol, (uintptr_t)&_etext);
#endif
atexit(_fini);
@@ -163,7 +163,7 @@
* is the entrypoint. (Only needed for old toolchains).
*/
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.20 2009/12/14 01:04:02 matt Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.21 2011/01/23 06:25:57 matt Exp $");
#endif /* LIBC_SCCS and not lint */
#include "common.c"
Home |
Main Index |
Thread Index |
Old Index