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 2696129Sobrien#include <machine/asm.h> 2796129Sobrien__FBSDID("$FreeBSD: releng/11.0/lib/libc/sparc64/fpu/fpu_reg.S 96129 2002-05-06 23:24:39Z obrien $"); 2896129Sobrien 2991174Stmm/* 3091174Stmm * Define arrays of leaf functions to load/store fp registers to memory. See 3191174Stmm * fpu_reg.h for the definitions to use this from C code. The function sizes 3291174Stmm * defines there must be kept in sync with this file! 3391174Stmm */ 3491174Stmm 3591174Stmm.macro ld32 reg 3691174Stmm retl 3791174Stmm ld [%o0], %f\reg 3891174Stmm.endm 3991174Stmm 4091174Stmm.macro st32 reg 4191174Stmm retl 4291174Stmm st %f\reg, [%o0] 4391174Stmm.endm 4491174Stmm 4591174Stmm.macro ld64 reg 4691174Stmm retl 4791174Stmm ldd [%o0], %f\reg 4891174Stmm.endm 4991174Stmm 5091174Stmm.macro st64 reg 5191174Stmm retl 5291174Stmm std %f\reg, [%o0] 5391174Stmm.endm 5491174Stmm 5591174Stmm/* The actual function arrays. */ 5691174Stmm .globl __fpu_ld32 5791174Stmm__fpu_ld32: 5891174Stmm ld32 0 5991174Stmm ld32 1 6091174Stmm ld32 2 6191174Stmm ld32 3 6291174Stmm ld32 4 6391174Stmm ld32 5 6491174Stmm ld32 6 6591174Stmm ld32 7 6691174Stmm ld32 8 6791174Stmm ld32 9 6891174Stmm ld32 10 6991174Stmm ld32 11 7091174Stmm ld32 12 7191174Stmm ld32 13 7291174Stmm ld32 14 7391174Stmm ld32 15 7491174Stmm ld32 16 7591174Stmm ld32 17 7691174Stmm ld32 18 7791174Stmm ld32 19 7891174Stmm ld32 20 7991174Stmm ld32 21 8091174Stmm ld32 22 8191174Stmm ld32 23 8291174Stmm ld32 24 8391174Stmm ld32 25 8491174Stmm ld32 26 8591174Stmm ld32 27 8691174Stmm ld32 28 8791174Stmm ld32 29 8891174Stmm ld32 30 8991174Stmm ld32 31 9091174Stmm 9191174Stmm .globl __fpu_st32 9291174Stmm__fpu_st32: 9391174Stmm st32 0 9491174Stmm st32 1 9591174Stmm st32 2 9691174Stmm st32 3 9791174Stmm st32 4 9891174Stmm st32 5 9991174Stmm st32 6 10091174Stmm st32 7 10191174Stmm st32 8 10291174Stmm st32 9 10391174Stmm st32 10 10491174Stmm st32 11 10591174Stmm st32 12 10691174Stmm st32 13 10791174Stmm st32 14 10891174Stmm st32 15 10991174Stmm st32 16 11091174Stmm st32 17 11191174Stmm st32 18 11291174Stmm st32 19 11391174Stmm st32 20 11491174Stmm st32 21 11591174Stmm st32 22 11691174Stmm st32 23 11791174Stmm st32 24 11891174Stmm st32 25 11991174Stmm st32 26 12091174Stmm st32 27 12191174Stmm st32 28 12291174Stmm st32 29 12391174Stmm st32 30 12491174Stmm st32 31 12591174Stmm 12691174Stmm .globl __fpu_ld64 12791174Stmm__fpu_ld64: 12891174Stmm ld64 0 12991174Stmm ld64 2 13091174Stmm ld64 4 13191174Stmm ld64 6 13291174Stmm ld64 8 13391174Stmm ld64 10 13491174Stmm ld64 12 13591174Stmm ld64 14 13691174Stmm ld64 16 13791174Stmm ld64 18 13891174Stmm ld64 20 13991174Stmm ld64 22 14091174Stmm ld64 24 14191174Stmm ld64 26 14291174Stmm ld64 28 14391174Stmm ld64 30 14491174Stmm ld64 32 14591174Stmm ld64 34 14691174Stmm ld64 36 14791174Stmm ld64 38 14891174Stmm ld64 40 14991174Stmm ld64 42 15091174Stmm ld64 44 15191174Stmm ld64 46 15291174Stmm ld64 48 15391174Stmm ld64 50 15491174Stmm ld64 52 15591174Stmm ld64 54 15691174Stmm ld64 56 15791174Stmm ld64 58 15891174Stmm ld64 60 15991174Stmm ld64 62 16091174Stmm 16191174Stmm .globl __fpu_st64 16291174Stmm__fpu_st64: 16391174Stmm st64 0 16491174Stmm st64 2 16591174Stmm st64 4 16691174Stmm st64 6 16791174Stmm st64 8 16891174Stmm st64 10 16991174Stmm st64 12 17091174Stmm st64 14 17191174Stmm st64 16 17291174Stmm st64 18 17391174Stmm st64 20 17491174Stmm st64 22 17591174Stmm st64 24 17691174Stmm st64 26 17791174Stmm st64 28 17891174Stmm st64 30 17991174Stmm st64 32 18091174Stmm st64 34 18191174Stmm st64 36 18291174Stmm st64 38 18391174Stmm st64 40 18491174Stmm st64 42 18591174Stmm st64 44 18691174Stmm st64 46 18791174Stmm st64 48 18891174Stmm st64 50 18991174Stmm st64 52 19091174Stmm st64 54 19191174Stmm st64 56 19291174Stmm st64 58 19391174Stmm st64 60 19491174Stmm st64 62 195