1139738Simp/*-
2117677Smarcel * Copyright (c) 2003 Marcel Moolenaar
3117677Smarcel * All rights reserved.
4117677Smarcel *
5117677Smarcel * Redistribution and use in source and binary forms, with or without
6117677Smarcel * modification, are permitted provided that the following conditions
7117677Smarcel * are met:
8117677Smarcel *
9117677Smarcel * 1. Redistributions of source code must retain the above copyright
10117677Smarcel *    notice, this list of conditions and the following disclaimer.
11117677Smarcel * 2. Redistributions in binary form must reproduce the above copyright
12117677Smarcel *    notice, this list of conditions and the following disclaimer in the
13117677Smarcel *    documentation and/or other materials provided with the distribution.
14117677Smarcel *
15117677Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16117677Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17117677Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18117677Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19117677Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20117677Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21117677Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22117677Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23117677Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24117677Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25117677Smarcel *
26117677Smarcel * $FreeBSD$
27117677Smarcel */
28117677Smarcel
29117677Smarcel#define	STACKSIZE	16384
30117677Smarcel#define	FPSR_DEFAULT	0x0009804c0270033f
31117677Smarcel
32117677Smarcel	.text
33117677Smarcel	.global		_start
34117677Smarcel	.proc		_start
35117677Smarcel_start:
36117677Smarcel{	.mlx
37117677Smarcel	mov		ar.rsc=0
38117677Smarcel	movl		gp=__gp
39117677Smarcel	;;
40117677Smarcel}
41117677Smarcel{	.mlx
42117677Smarcel	add		r2=@gprel(stack),gp
43117677Smarcel	movl		r14=FPSR_DEFAULT
44117677Smarcel	;;
45117677Smarcel}
46117677Smarcel{	.mib
47117677Smarcel	mov		ar.bspstore=r2
48117677Smarcel	add		r12=STACKSIZE-16,r2
49117677Smarcel	bsw.1
50117677Smarcel	;;
51117677Smarcel}
52117677Smarcel{	.mmb
53117677Smarcel	mov		ar.rsc=3
54117677Smarcel	mov		ar.fpsr=r14
55117677Smarcel	br.sptk		ski_main
56117677Smarcel	;;
57117677Smarcel}
58117677Smarcel	.endp		_start
59117677Smarcel
60117677Smarcel	.data
61117677Smarcel	.align		16
62117677Smarcelstack:	.skip		STACKSIZE
63