1*803a4704SPulkoMandy/*- 2*803a4704SPulkoMandy * Copyright (c) 2002 by Thomas Moestl <tmm@FreeBSD.org>. 3*803a4704SPulkoMandy * All rights reserved. 4*803a4704SPulkoMandy * 5*803a4704SPulkoMandy * Redistribution and use in source and binary forms, with or without 6*803a4704SPulkoMandy * modification, are permitted provided that the following conditions 7*803a4704SPulkoMandy * are met: 8*803a4704SPulkoMandy * 1. Redistributions of source code must retain the above copyright 9*803a4704SPulkoMandy * notice, this list of conditions and the following disclaimer. 10*803a4704SPulkoMandy * 2. Redistributions in binary form must reproduce the above copyright 11*803a4704SPulkoMandy * notice, this list of conditions and the following disclaimer in the 12*803a4704SPulkoMandy * documentation and/or other materials provided with the distribution. 13*803a4704SPulkoMandy * 14*803a4704SPulkoMandy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15*803a4704SPulkoMandy * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16*803a4704SPulkoMandy * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17*803a4704SPulkoMandy * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18*803a4704SPulkoMandy * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19*803a4704SPulkoMandy * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20*803a4704SPulkoMandy * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21*803a4704SPulkoMandy * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22*803a4704SPulkoMandy * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 23*803a4704SPulkoMandy * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24*803a4704SPulkoMandy */ 25*803a4704SPulkoMandy 26*803a4704SPulkoMandy 27*803a4704SPulkoMandy/* 28*803a4704SPulkoMandy * Define arrays of leaf functions to load/store fp registers to memory. See 29*803a4704SPulkoMandy * fpu_reg.h for the definitions to use this from C code. The function sizes 30*803a4704SPulkoMandy * defines there must be kept in sync with this file! 31*803a4704SPulkoMandy */ 32*803a4704SPulkoMandy 33*803a4704SPulkoMandy.macro ld32 reg 34*803a4704SPulkoMandy retl 35*803a4704SPulkoMandy ld [%o0], %f\reg 36*803a4704SPulkoMandy.endm 37*803a4704SPulkoMandy 38*803a4704SPulkoMandy.macro st32 reg 39*803a4704SPulkoMandy retl 40*803a4704SPulkoMandy st %f\reg, [%o0] 41*803a4704SPulkoMandy.endm 42*803a4704SPulkoMandy 43*803a4704SPulkoMandy.macro ld64 reg 44*803a4704SPulkoMandy retl 45*803a4704SPulkoMandy ldd [%o0], %f\reg 46*803a4704SPulkoMandy.endm 47*803a4704SPulkoMandy 48*803a4704SPulkoMandy.macro st64 reg 49*803a4704SPulkoMandy retl 50*803a4704SPulkoMandy std %f\reg, [%o0] 51*803a4704SPulkoMandy.endm 52*803a4704SPulkoMandy 53*803a4704SPulkoMandy/* The actual function arrays. */ 54*803a4704SPulkoMandy .globl __fpu_ld32 55*803a4704SPulkoMandy__fpu_ld32: 56*803a4704SPulkoMandy ld32 0 57*803a4704SPulkoMandy ld32 1 58*803a4704SPulkoMandy ld32 2 59*803a4704SPulkoMandy ld32 3 60*803a4704SPulkoMandy ld32 4 61*803a4704SPulkoMandy ld32 5 62*803a4704SPulkoMandy ld32 6 63*803a4704SPulkoMandy ld32 7 64*803a4704SPulkoMandy ld32 8 65*803a4704SPulkoMandy ld32 9 66*803a4704SPulkoMandy ld32 10 67*803a4704SPulkoMandy ld32 11 68*803a4704SPulkoMandy ld32 12 69*803a4704SPulkoMandy ld32 13 70*803a4704SPulkoMandy ld32 14 71*803a4704SPulkoMandy ld32 15 72*803a4704SPulkoMandy ld32 16 73*803a4704SPulkoMandy ld32 17 74*803a4704SPulkoMandy ld32 18 75*803a4704SPulkoMandy ld32 19 76*803a4704SPulkoMandy ld32 20 77*803a4704SPulkoMandy ld32 21 78*803a4704SPulkoMandy ld32 22 79*803a4704SPulkoMandy ld32 23 80*803a4704SPulkoMandy ld32 24 81*803a4704SPulkoMandy ld32 25 82*803a4704SPulkoMandy ld32 26 83*803a4704SPulkoMandy ld32 27 84*803a4704SPulkoMandy ld32 28 85*803a4704SPulkoMandy ld32 29 86*803a4704SPulkoMandy ld32 30 87*803a4704SPulkoMandy ld32 31 88*803a4704SPulkoMandy 89*803a4704SPulkoMandy .globl __fpu_st32 90*803a4704SPulkoMandy__fpu_st32: 91*803a4704SPulkoMandy st32 0 92*803a4704SPulkoMandy st32 1 93*803a4704SPulkoMandy st32 2 94*803a4704SPulkoMandy st32 3 95*803a4704SPulkoMandy st32 4 96*803a4704SPulkoMandy st32 5 97*803a4704SPulkoMandy st32 6 98*803a4704SPulkoMandy st32 7 99*803a4704SPulkoMandy st32 8 100*803a4704SPulkoMandy st32 9 101*803a4704SPulkoMandy st32 10 102*803a4704SPulkoMandy st32 11 103*803a4704SPulkoMandy st32 12 104*803a4704SPulkoMandy st32 13 105*803a4704SPulkoMandy st32 14 106*803a4704SPulkoMandy st32 15 107*803a4704SPulkoMandy st32 16 108*803a4704SPulkoMandy st32 17 109*803a4704SPulkoMandy st32 18 110*803a4704SPulkoMandy st32 19 111*803a4704SPulkoMandy st32 20 112*803a4704SPulkoMandy st32 21 113*803a4704SPulkoMandy st32 22 114*803a4704SPulkoMandy st32 23 115*803a4704SPulkoMandy st32 24 116*803a4704SPulkoMandy st32 25 117*803a4704SPulkoMandy st32 26 118*803a4704SPulkoMandy st32 27 119*803a4704SPulkoMandy st32 28 120*803a4704SPulkoMandy st32 29 121*803a4704SPulkoMandy st32 30 122*803a4704SPulkoMandy st32 31 123*803a4704SPulkoMandy 124*803a4704SPulkoMandy .globl __fpu_ld64 125*803a4704SPulkoMandy__fpu_ld64: 126*803a4704SPulkoMandy ld64 0 127*803a4704SPulkoMandy ld64 2 128*803a4704SPulkoMandy ld64 4 129*803a4704SPulkoMandy ld64 6 130*803a4704SPulkoMandy ld64 8 131*803a4704SPulkoMandy ld64 10 132*803a4704SPulkoMandy ld64 12 133*803a4704SPulkoMandy ld64 14 134*803a4704SPulkoMandy ld64 16 135*803a4704SPulkoMandy ld64 18 136*803a4704SPulkoMandy ld64 20 137*803a4704SPulkoMandy ld64 22 138*803a4704SPulkoMandy ld64 24 139*803a4704SPulkoMandy ld64 26 140*803a4704SPulkoMandy ld64 28 141*803a4704SPulkoMandy ld64 30 142*803a4704SPulkoMandy ld64 32 143*803a4704SPulkoMandy ld64 34 144*803a4704SPulkoMandy ld64 36 145*803a4704SPulkoMandy ld64 38 146*803a4704SPulkoMandy ld64 40 147*803a4704SPulkoMandy ld64 42 148*803a4704SPulkoMandy ld64 44 149*803a4704SPulkoMandy ld64 46 150*803a4704SPulkoMandy ld64 48 151*803a4704SPulkoMandy ld64 50 152*803a4704SPulkoMandy ld64 52 153*803a4704SPulkoMandy ld64 54 154*803a4704SPulkoMandy ld64 56 155*803a4704SPulkoMandy ld64 58 156*803a4704SPulkoMandy ld64 60 157*803a4704SPulkoMandy ld64 62 158*803a4704SPulkoMandy 159*803a4704SPulkoMandy .globl __fpu_st64 160*803a4704SPulkoMandy__fpu_st64: 161*803a4704SPulkoMandy st64 0 162*803a4704SPulkoMandy st64 2 163*803a4704SPulkoMandy st64 4 164*803a4704SPulkoMandy st64 6 165*803a4704SPulkoMandy st64 8 166*803a4704SPulkoMandy st64 10 167*803a4704SPulkoMandy st64 12 168*803a4704SPulkoMandy st64 14 169*803a4704SPulkoMandy st64 16 170*803a4704SPulkoMandy st64 18 171*803a4704SPulkoMandy st64 20 172*803a4704SPulkoMandy st64 22 173*803a4704SPulkoMandy st64 24 174*803a4704SPulkoMandy st64 26 175*803a4704SPulkoMandy st64 28 176*803a4704SPulkoMandy st64 30 177*803a4704SPulkoMandy st64 32 178*803a4704SPulkoMandy st64 34 179*803a4704SPulkoMandy st64 36 180*803a4704SPulkoMandy st64 38 181*803a4704SPulkoMandy st64 40 182*803a4704SPulkoMandy st64 42 183*803a4704SPulkoMandy st64 44 184*803a4704SPulkoMandy st64 46 185*803a4704SPulkoMandy st64 48 186*803a4704SPulkoMandy st64 50 187*803a4704SPulkoMandy st64 52 188*803a4704SPulkoMandy st64 54 189*803a4704SPulkoMandy st64 56 190*803a4704SPulkoMandy st64 58 191*803a4704SPulkoMandy st64 60 192*803a4704SPulkoMandy st64 62 193