From owner-p4-projects@FreeBSD.ORG Fri Apr 6 10:05:06 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 850A316A409; Fri, 6 Apr 2007 10:05:06 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F3CA16A405 for ; Fri, 6 Apr 2007 10:05:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 145CE13C469 for ; Fri, 6 Apr 2007 10:05:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l36A55oU085786 for ; Fri, 6 Apr 2007 10:05:05 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l36A55v1085780 for perforce@freebsd.org; Fri, 6 Apr 2007 10:05:05 GMT (envelope-from gonzo@FreeBSD.org) Date: Fri, 6 Apr 2007 10:05:05 GMT Message-Id: <200704061005.l36A55v1085780@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 117491 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 10:05:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=117491 Change 117491 by gonzo@gonzo_jeeves on 2007/04/06 10:04:04 o Convert commets to C style. as stopped to recognize comments with # Affected files ... .. //depot/projects/mips2/src/libexec/rtld-elf/mips/rtld_start.S#3 edit Differences ... ==== //depot/projects/mips2/src/libexec/rtld-elf/mips/rtld_start.S#3 (text+ko) ==== @@ -38,39 +38,39 @@ .set noreorder .cpload t9 - addu sp, sp, -12 # adjust stack pointer - .cprestore 0 # -> 0(sp) for gp - # -> 4(sp) for atexit - # -> 8(sp) for obj_main - move s0,a0 # save stack pointer from a0 - move s1,a3 # save ps_strings pointer + addu sp, sp, -12 /* adjust stack pointer */ + .cprestore 0 /* -> 0(sp) for gp */ + /* -> 4(sp) for atexit */ + /* -> 8(sp) for obj_main */ + move s0,a0 /* save stack pointer from a0 */ + move s1,a3 /* save ps_strings pointer */ la a1, 1f bal 1f nop -1: subu a1, ra, a1 # relocbase +1: subu a1, ra, a1 /* relocbase */ la t9,_C_LABEL(_rtld_relocate_nonplt_self) move s2,a1 la a0,_DYNAMIC addu t9, a1, t9 jalr t9 - addu a0, a1, a0 # &_DYNAMIC + addu a0, a1, a0 /* &_DYNAMIC */ - addu a0, sp, 12 # sp - addu a1, sp, 4 # &exit_proc - addu a2, sp, 8 # &objp - addu sp, sp, -16 # arguments slot - jal _C_LABEL(_rtld) # v0 = _rtld(sp, exit_proc, objp) + addu a0, sp, 12 /* sp */ + addu a1, sp, 4 /* &exit_proc */ + addu a2, sp, 8 /* &objp */ + addu sp, sp, -16 /* arguments slot */ + jal _C_LABEL(_rtld) /* v0 = _rtld(sp, exit_proc, objp) */ nop - addu sp, sp, 16 # + addu sp, sp, 16 - lw a0, 4(sp) # our atexit function - lw a1, 8(sp) # obj_main entry - addu sp, sp,12 # readjust stack + lw a0, 4(sp) /* our atexit function */ + lw a1, 8(sp) /* obj_main entry */ + addu sp, sp,12 /* readjust stack */ move t9,v0 - move a2,s1 # restore ps_strings - jr t9 # _start(sp, cleanup, obj); + move a2,s1 /* restore ps_strings */ + jr t9 /* _start(sp, cleanup, obj); */ nop END(rtld_start) @@ -78,15 +78,16 @@ .globl _rtld_bind_start .ent _rtld_bind_start _rtld_bind_start: - # ABI conventions for stubs - # t8 contains symbol index - # t7 contains return address - .frame sp, 0, ra # satisfy compiler + /* ABI conventions for stubs: + * t8 contains symbol index + * t7 contains return address + */ + .frame sp, 0, ra /* satisfy compiler */ - move v1,gp # save old GP - add t9,8 # modify T9 to point at .cpload + move v1,gp /* save old GP */ + add t9,8 /* modify T9 to point at .cpload */ .cpload t9 - subu sp,44 # save arguments and sp value in stack + subu sp,44 /* save arguments and sp value */ .cprestore 36 sw a0,16(sp) sw a1,20(sp) @@ -95,16 +96,16 @@ sw s0,32(sp) sw t7,40(sp) move s0,sp - move a0,v1 # old GP - subu a0,a0,0x7ff0 # The offset of $gp from the - # beginning of the .got section: - # $gp = .got + 0x7ff0, so - # .got = $gp - 0x7ff0 - # Simple math as you can see. + move a0,v1 /* old GP */ + subu a0,a0,0x7ff0 /* The offset of $gp from the */ + /* beginning of the .got section: */ + /* $gp = .got + 0x7ff0, so */ + /* .got = $gp - 0x7ff0 */ + /* Simple math as you can see. */ - lw a0,4(a0) # object = pltgot[1] & 0x7fffffff + lw a0,4(a0) /* object = pltgot[1] & 0x7fffffff */ and a0,a0,0x7fffffff - move a1,t8 # symbol index + move a1,t8 /* symbol index */ jal _C_LABEL(_mips_rtld_bind) nop