1 /* This file contains the floating
-point save
and restore routines.
3 * Copyright
(C
) 2004 Free Software Foundation
, Inc.
5 * This file is free software
; you can redistribute it and/or modify it
6 * under the terms of the GNU General
Public License as published by the
7 * Free Software Foundation
; either version 2, or (at your option) any
10 * In addition to the permissions
in the GNU General
Public License
, the
11 * Free Software Foundation gives you unlimited permission to link the
12 * compiled version of
this file with other programs
, and to distribute
13 * those programs without any restriction coming from the use of
this
14 * file.
(The General
Public License restrictions do apply
in other
15 * respects
; for example, they cover modification of the file, and
16 * distribution when
not linked
into another program.
)
18 * This file is distributed
in the hope that it will be useful
, but
19 * WITHOUT ANY WARRANTY
; without even the implied warranty of
20 * MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General
Public License for more details.
23 * You should have received a copy of the GNU General
Public License
24 * along with
this program
; see the file COPYING. If not, write to
25 * the Free Software Foundation
, 51 Franklin Street
, Fifth Floor
,
26 * Boston
, MA
02110-1301, USA.
28 * As a special exception
, if you link
this library with files
29 * compiled with GCC to produce an executable
, this does
not cause the
30 * resulting executable to be covered by the GNU General
Public License.
31 * This exception does
not however invalidate any other reasons why the
32 * executable file might be covered by the GNU General
Public License.
35 /* THE SAVE
AND RESTORE ROUTINES CAN HAVE ONLY ONE GLOBALLY VISIBLE
36 ENTRY POINT
- callers have to jump to
"saveFP+60" to save f29..f31
,
37 for example. For FP reg saves
/restores
, it takes one instruction
38 (4 bytes
) to do the operation
; for Vector regs, 2 instructions are
41 MORAL: DO
NOT MESS AROUND WITH THESE FUNCTIONS
! */
43 #
include "darwin-asm.h"
48 /* saveFP saves R0
-- assumed to be the callers LR
-- to
8/16(R1
).
*/
50 .private_extern saveFP
70 stg r0
,SAVED_LR_OFFSET
(r1
)
73 /* restFP restores the caller`s LR from
8/16(R1
). Note that the code for
74 this starts at the
offset of F30 restoration
, so calling
this
75 routine
in an attempt to restore only F31 WILL
NOT WORK
(it would
76 be a stupid thing to do
, anyway.
) */
78 .private_extern restFP
96 /* <OFFSET OF F30 RESTORE
> restore callers LR
*/
97 lg r0
,SAVED_LR_OFFSET
(r1
)
99 /* and prepare for return to caller
*/