ia64-test-nat-asm.S revision 05a9101485fd5a5c42c546cc720bc35fa4e3f06b
105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm/* libunwind - a platform-independent unwind library 205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm Copyright (C) 2004 Hewlett-Packard Co 305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm Contributed by David Mosberger-Tang <davidm@hpl.hp.com> 405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmThis file is part of libunwind. 605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmPermission is hereby granted, free of charge, to any person obtaining 805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidma copy of this software and associated documentation files (the 905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm"Software"), to deal in the Software without restriction, including 1005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmwithout limitation the rights to use, copy, modify, merge, publish, 1105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmdistribute, sublicense, and/or sell copies of the Software, and to 1205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmpermit persons to whom the Software is furnished to do so, subject to 1305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmthe following conditions: 1405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 1505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmThe above copyright notice and this permission notice shall be 1605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmincluded in all copies or substantial portions of the Software. 1705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 1805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 2105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 2205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 2305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 2405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 2505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 2605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .text 2705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 2805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .global save_static_to_stacked 2905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .proc save_static_to_stacked 3005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidmsave_static_to_stacked: 3105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .prologue 3205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .regstk 2, 7, 2, 0 3305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .save ar.pfs, loc0 3405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm alloc loc0 = ar.pfs, 2, 7, 2, 0 3505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .save rp, loc1 3605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc1 = rp 3705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .spillreg r4, loc2 3805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc2 = r4 3905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .spillreg r5, loc3 4005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc3 = r5 4105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .spillreg r6, loc4 4205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc4 = r6 4305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .spillreg r7, loc5 4405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc5 = r7 4505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .body 4605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r4 = [in1], 8;; 4705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r5 = [in1], 8;; 4805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r6 = [in1], 8;; 4905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r7 = [in1], 8;; 5005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm tbit.nz p6, p0 = r4, 0 5105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm tbit.nz p7, p0 = r5, 0 5205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm tbit.nz p8, p0 = r6, 0 5305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm tbit.nz p9, p0 = r7, 0;; 5405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm(p6) ld8.s r4 = [r0] 5505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm(p7) ld8.s r5 = [r0] 5605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm(p8) ld8.s r6 = [r0] 5705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm(p9) ld8.s r7 = [r0] 5805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 5905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r2 = [in0], 8 // read the next function pointer 6005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ;; 6105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r3 = [r2], 8 // read the function's entry-point 6205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ;; 6305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ld8 r2 = [r2] // read the function's gp 6405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm ;; 6505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov b6 = r3 6605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov loc6 = gp 6705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov out0 = in0 6805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov out1 = in1 6905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov gp = r2 7005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm br.call.sptk.many rp = b6;; 7105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov gp = loc6 7205a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 7305a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov r4 = loc2 7405a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov r5 = loc3 7505a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov r6 = loc4 7605a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov r7 = loc5 7705a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm 7805a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov ar.pfs = loc0 7905a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm mov rp = loc1 8005a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm br.ret.sptk.many rp 8105a9101485fd5a5c42c546cc720bc35fa4e3f06bmostang.com!davidm .endp save_static_to_stacked 82