start.S revision 135442
16059Samurai/* 26059Samurai * Copyright (c) 2003 Marcel Moolenaar 36059Samurai * All rights reserved. 46059Samurai * 56059Samurai * Redistribution and use in source and binary forms, with or without 66059Samurai * modification, are permitted provided that the following conditions 76059Samurai * are met: 86059Samurai * 96059Samurai * 1. Redistributions of source code must retain the above copyright 106059Samurai * notice, this list of conditions and the following disclaimer. 116059Samurai * 2. Redistributions in binary form must reproduce the above copyright 126059Samurai * notice, this list of conditions and the following disclaimer in the 136059Samurai * documentation and/or other materials provided with the distribution. 146059Samurai * 156059Samurai * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 166059Samurai * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 176059Samurai * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1850479Speter * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 196059Samurai * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 206059Samurai * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 216059Samurai * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 226059Samurai * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2331343Sbrian * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2436285Sbrian * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2536285Sbrian * 2636285Sbrian * $FreeBSD: head/sys/boot/ia64/ski/start.S 135442 2004-09-18 21:18:44Z marcel $ 2731343Sbrian */ 2831343Sbrian 2936285Sbrian#define STACKSIZE 16384 3036285Sbrian#define FPSR_DEFAULT 0x0009804c0270033f 3136285Sbrian 3236285Sbrian .text 3336285Sbrian .global _start 3436285Sbrian .proc _start 3536285Sbrian_start: 3636285Sbrian{ .mlx 3731343Sbrian mov ar.rsc=0 3831343Sbrian movl gp=__gp 396059Samurai ;; 4031343Sbrian} 4131343Sbrian{ .mlx 4231343Sbrian add r2=@gprel(stack),gp 4328679Sbrian movl r14=FPSR_DEFAULT 4431343Sbrian ;; 4531343Sbrian} 4631343Sbrian{ .mib 476059Samurai mov ar.bspstore=r2 4829696Sbrian add r12=STACKSIZE-16,r2 4936285Sbrian bsw.1 5036285Sbrian ;; 5136285Sbrian} 5236285Sbrian{ .mmb 5330715Sbrian mov ar.rsc=3 5436285Sbrian mov ar.fpsr=r14 5530715Sbrian br.sptk ski_main 5643888Sbrian ;; 5747849Sbrian} 5858045Sbrian .endp _start 5937009Sbrian 6036285Sbrian .data 6137008Sbrian .align 16 6254914Sbrianstack: .skip STACKSIZE 6336285Sbrian