URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [linux/] [uClibc/] [ldso/] [ldso/] [sh64/] [resolve.S] - Rev 1765
Compare with Previous | Blame | View Log
/* vi: set sw=8 ts=8: *//** ldso/ldso/sh64/resolve.S** SuperH (sh64) dynamic resolver support** Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>** All rights reserved.** Redistribution and use in source and binary forms, with or without* modification, are permitted provided that the following conditions* are met:* 1. Redistributions of source code must retain the above copyright* notice, this list of conditions and the following disclaimer.* 2. The name of the above contributors may not be* used to endorse or promote products derived from this software* without specific prior written permission.** THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE* ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF* SUCH DAMAGE.*/.section .text..SHmedia32,"ax".globl _dl_linux_resolver.globl _dl_linux_resolve.type _dl_linux_resolve, @function.balign 16_dl_linux_resolve:addi r15, -72, r15 ! make room on the stackpt _dl_linux_resolver, tr0st.q r15, 0, r2 ! save regsst.q r15, 8, r3st.q r15, 16, r4st.q r15, 24, r5st.q r15, 32, r6st.q r15, 40, r7st.q r15, 48, r8st.q r15, 56, r9st.q r15, 64, r18#ifdef HAVE_FPUaddi r15, -48, r15 ! make room for FP regsfst.d r15, 0, dr0 ! save FP regsfst.d r15, 8, dr2fst.d r15, 16, dr4fst.d r15, 24, dr6fst.d r15, 32, dr8fst.d r15, 40, dr10#endif/** Args for _dl_linux_resolver(), set in r17/r21 by PLT code*/add r17, r63, r2 ! link map addressadd r21, r63, r3 ! GOT offsetblink tr0, r18 ! call _dl_linux_resolver()ptabs/l r2, tr0 ! save result = addr of function called#ifdef HAVE_FPUfld.d r15, 0, dr0 ! restore FP regsfld.d r15, 8, dr2fld.d r15, 16, dr4fld.d r15, 24, dr6fld.d r15, 32, dr8fld.d r15, 40, dr10addi r15, 48, r15#endifld.q r15, 0, r2 ! restore regsld.q r15, 8, r3ld.q r15, 16, r4ld.q r15, 24, r5ld.q r15, 32, r6ld.q r15, 40, r7ld.q r15, 48, r8ld.q r15, 56, r9ld.q r15, 64, r18addi r15, 72, r15blink tr0, r63 ! jump to function address.size _dl_linux_resolve, . - _dl_linux_resolve
