fpu_reg.S revision 91174
191174Stmm/*- 291174Stmm * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>. 391174Stmm * All rights reserved. 491174Stmm * 591174Stmm * Redistribution and use in source and binary forms, with or without 691174Stmm * modification, are permitted provided that the following conditions 791174Stmm * are met: 891174Stmm * 1. Redistributions of source code must retain the above copyright 991174Stmm * notice, this list of conditions and the following disclaimer. 1091174Stmm * 2. Redistributions in binary form must reproduce the above copyright 1191174Stmm * notice, this list of conditions and the following disclaimer in the 1291174Stmm * documentation and/or other materials provided with the distribution. 1391174Stmm * 1491174Stmm * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1591174Stmm * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1691174Stmm * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1791174Stmm * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 1891174Stmm * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 1991174Stmm * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 2091174Stmm * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 2191174Stmm * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2291174Stmm * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 2391174Stmm * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2491174Stmm * 2591174Stmm * $FreeBSD: head/lib/libc/sparc64/fpu/fpu_reg.S 91174 2002-02-23 21:37:18Z tmm $ 2691174Stmm */ 2791174Stmm 2891174Stmm/* 2991174Stmm * Define arrays of leaf functions to load/store fp registers to memory. See 3091174Stmm * fpu_reg.h for the definitions to use this from C code. The function sizes 3191174Stmm * defines there must be kept in sync with this file! 3291174Stmm */ 3391174Stmm 3491174Stmm.macro ld32 reg 3591174Stmm retl 3691174Stmm ld [%o0], %f\reg 3791174Stmm.endm 3891174Stmm 3991174Stmm.macro st32 reg 4091174Stmm retl 4191174Stmm st %f\reg, [%o0] 4291174Stmm.endm 4391174Stmm 4491174Stmm.macro ld64 reg 4591174Stmm retl 4691174Stmm ldd [%o0], %f\reg 4791174Stmm.endm 4891174Stmm 4991174Stmm.macro st64 reg 5091174Stmm retl 5191174Stmm std %f\reg, [%o0] 5291174Stmm.endm 5391174Stmm 5491174Stmm/* The actual function arrays. */ 5591174Stmm .globl __fpu_ld32 5691174Stmm__fpu_ld32: 5791174Stmm ld32 0 5891174Stmm ld32 1 5991174Stmm ld32 2 6091174Stmm ld32 3 6191174Stmm ld32 4 6291174Stmm ld32 5 6391174Stmm ld32 6 6491174Stmm ld32 7 6591174Stmm ld32 8 6691174Stmm ld32 9 6791174Stmm ld32 10 6891174Stmm ld32 11 6991174Stmm ld32 12 7091174Stmm ld32 13 7191174Stmm ld32 14 7291174Stmm ld32 15 7391174Stmm ld32 16 7491174Stmm ld32 17 7591174Stmm ld32 18 7691174Stmm ld32 19 7791174Stmm ld32 20 7891174Stmm ld32 21 7991174Stmm ld32 22 8091174Stmm ld32 23 8191174Stmm ld32 24 8291174Stmm ld32 25 8391174Stmm ld32 26 8491174Stmm ld32 27 8591174Stmm ld32 28 8691174Stmm ld32 29 8791174Stmm ld32 30 8891174Stmm ld32 31 8991174Stmm 9091174Stmm .globl __fpu_st32 9191174Stmm__fpu_st32: 9291174Stmm st32 0 9391174Stmm st32 1 9491174Stmm st32 2 9591174Stmm st32 3 9691174Stmm st32 4 9791174Stmm st32 5 9891174Stmm st32 6 9991174Stmm st32 7 10091174Stmm st32 8 10191174Stmm st32 9 10291174Stmm st32 10 10391174Stmm st32 11 10491174Stmm st32 12 10591174Stmm st32 13 10691174Stmm st32 14 10791174Stmm st32 15 10891174Stmm st32 16 10991174Stmm st32 17 11091174Stmm st32 18 11191174Stmm st32 19 11291174Stmm st32 20 11391174Stmm st32 21 11491174Stmm st32 22 11591174Stmm st32 23 11691174Stmm st32 24 11791174Stmm st32 25 11891174Stmm st32 26 11991174Stmm st32 27 12091174Stmm st32 28 12191174Stmm st32 29 12291174Stmm st32 30 12391174Stmm st32 31 12491174Stmm 12591174Stmm .globl __fpu_ld64 12691174Stmm__fpu_ld64: 12791174Stmm ld64 0 12891174Stmm ld64 2 12991174Stmm ld64 4 13091174Stmm ld64 6 13191174Stmm ld64 8 13291174Stmm ld64 10 13391174Stmm ld64 12 13491174Stmm ld64 14 13591174Stmm ld64 16 13691174Stmm ld64 18 13791174Stmm ld64 20 13891174Stmm ld64 22 13991174Stmm ld64 24 14091174Stmm ld64 26 14191174Stmm ld64 28 14291174Stmm ld64 30 14391174Stmm ld64 32 14491174Stmm ld64 34 14591174Stmm ld64 36 14691174Stmm ld64 38 14791174Stmm ld64 40 14891174Stmm ld64 42 14991174Stmm ld64 44 15091174Stmm ld64 46 15191174Stmm ld64 48 15291174Stmm ld64 50 15391174Stmm ld64 52 15491174Stmm ld64 54 15591174Stmm ld64 56 15691174Stmm ld64 58 15791174Stmm ld64 60 15891174Stmm ld64 62 15991174Stmm 16091174Stmm .globl __fpu_st64 16191174Stmm__fpu_st64: 16291174Stmm st64 0 16391174Stmm st64 2 16491174Stmm st64 4 16591174Stmm st64 6 16691174Stmm st64 8 16791174Stmm st64 10 16891174Stmm st64 12 16991174Stmm st64 14 17091174Stmm st64 16 17191174Stmm st64 18 17291174Stmm st64 20 17391174Stmm st64 22 17491174Stmm st64 24 17591174Stmm st64 26 17691174Stmm st64 28 17791174Stmm st64 30 17891174Stmm st64 32 17991174Stmm st64 34 18091174Stmm st64 36 18191174Stmm st64 38 18291174Stmm st64 40 18391174Stmm st64 42 18491174Stmm st64 44 18591174Stmm st64 46 18691174Stmm st64 48 18791174Stmm st64 50 18891174Stmm st64 52 18991174Stmm st64 54 19091174Stmm st64 56 19191174Stmm st64 58 19291174Stmm st64 60 19391174Stmm st64 62 194