2008-06-13 01:19:06 +04:00
/ *
* Special s u p p o r t f o r e a b i a n d S V R 4
*
* Copyright ( C ) 1 9 9 5 , 1 9 9 6 , 1 9 9 8 , 2 0 0 0 , 2 0 0 1 F r e e S o f t w a r e F o u n d a t i o n , I n c .
* Copyright 2 0 0 8 F r e e s c a l e S e m i c o n d u c t o r , I n c .
* Written B y M i c h a e l M e i s s n e r
*
* Based o n g c c / c o n f i g / r s60 0 0 / c r t s a v r e s . a s m f r o m g c c
*
* This f i l e i s f r e e s o f t w a r e ; you can redistribute it and/or modify it
* under t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e a s p u b l i s h e d b y t h e
* Free S o f t w a r e F o u n d a t i o n ; either version 2, or (at your option) any
* later v e r s i o n .
*
* In a d d i t i o n t o t h e p e r m i s s i o n s i n t h e G N U G e n e r a l P u b l i c L i c e n s e , t h e
* Free S o f t w a r e F o u n d a t i o n g i v e s y o u u n l i m i t e d p e r m i s s i o n t o l i n k t h e
* compiled v e r s i o n o f t h i s f i l e w i t h o t h e r p r o g r a m s , a n d t o d i s t r i b u t e
* those p r o g r a m s w i t h o u t a n y r e s t r i c t i o n c o m i n g f r o m t h e u s e o f t h i s
* file. ( T h e G e n e r a l P u b l i c L i c e n s e r e s t r i c t i o n s d o a p p l y i n o t h e r
* respects; for example, they cover modification of the file, and
* distribution w h e n n o t l i n k e d i n t o a n o t h e r p r o g r a m . )
*
* This f i l e i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l , b u t
* WITHOUT A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e G N U
* General P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y o f t h e G N U G e n e r a l P u b l i c L i c e n s e
* along w i t h t h i s p r o g r a m ; see the file COPYING. If not, write to
* the F r e e S o f t w a r e F o u n d a t i o n , 5 1 F r a n k l i n S t r e e t , F i f t h F l o o r ,
* Boston, M A 0 2 1 1 0 - 1 3 0 1 , U S A .
*
* As a s p e c i a l e x c e p t i o n , i f y o u l i n k t h i s l i b r a r y w i t h f i l e s
* compiled w i t h G C C t o p r o d u c e a n e x e c u t a b l e , t h i s d o e s n o t c a u s e
* the r e s u l t i n g e x e c u t a b l e t o b e c o v e r e d b y t h e G N U G e n e r a l P u b l i c L i c e n s e .
* This e x c e p t i o n d o e s n o t h o w e v e r i n v a l i d a t e a n y o t h e r r e a s o n s w h y
* the e x e c u t a b l e f i l e m i g h t b e c o v e r e d b y t h e G N U G e n e r a l P u b l i c L i c e n s e .
* /
2017-05-11 18:56:50 +03:00
# ifdef _ _ p o w e r p c64 _ _
# error " O n P P C 6 4 , F P R s a v e / r e s t o r e f u n c t i o n s a r e p r o v i d e d b y t h e l i n k e r . "
# endif
2008-06-13 01:19:06 +04:00
.file " crtsavres. S "
.section " .text "
# define _ G L O B A L ( n a m e ) \
.type name,@function; \
.globl name; \
name :
/* Routines for saving integer registers, called by the compiler. */
/* Called with r11 pointing to the stack header word of the caller of the */
/* function, just beyond the end of the integer save area. */
_ GLOBAL( _ s a v e g p r _ 1 4 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 4 )
stw 1 4 ,- 7 2 ( 1 1 ) / * s a v e g p r e g i s t e r s * /
_ GLOBAL( _ s a v e g p r _ 1 5 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 5 )
stw 1 5 ,- 6 8 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 1 6 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 6 )
stw 1 6 ,- 6 4 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 1 7 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 7 )
stw 1 7 ,- 6 0 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 1 8 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 8 )
stw 1 8 ,- 5 6 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 1 9 )
_ GLOBAL( _ s a v e 3 2 g p r _ 1 9 )
stw 1 9 ,- 5 2 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 0 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 0 )
stw 2 0 ,- 4 8 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 1 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 1 )
stw 2 1 ,- 4 4 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 2 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 2 )
stw 2 2 ,- 4 0 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 3 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 3 )
stw 2 3 ,- 3 6 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 4 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 4 )
stw 2 4 ,- 3 2 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 5 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 5 )
stw 2 5 ,- 2 8 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 6 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 6 )
stw 2 6 ,- 2 4 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 7 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 7 )
stw 2 7 ,- 2 0 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 8 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 8 )
stw 2 8 ,- 1 6 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 2 9 )
_ GLOBAL( _ s a v e 3 2 g p r _ 2 9 )
stw 2 9 ,- 1 2 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 3 0 )
_ GLOBAL( _ s a v e 3 2 g p r _ 3 0 )
stw 3 0 ,- 8 ( 1 1 )
_ GLOBAL( _ s a v e g p r _ 3 1 )
_ GLOBAL( _ s a v e 3 2 g p r _ 3 1 )
stw 3 1 ,- 4 ( 1 1 )
blr
/* Routines for restoring integer registers, called by the compiler. */
/* Called with r11 pointing to the stack header word of the caller of the */
/* function, just beyond the end of the integer restore area. */
_ GLOBAL( _ r e s t g p r _ 1 4 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 4 )
lwz 1 4 ,- 7 2 ( 1 1 ) / * r e s t o r e g p r e g i s t e r s * /
_ GLOBAL( _ r e s t g p r _ 1 5 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 5 )
lwz 1 5 ,- 6 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 6 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 6 )
lwz 1 6 ,- 6 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 7 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 7 )
lwz 1 7 ,- 6 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 8 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 8 )
lwz 1 8 ,- 5 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 9 )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 9 )
lwz 1 9 ,- 5 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 0 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 0 )
lwz 2 0 ,- 4 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 1 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 1 )
lwz 2 1 ,- 4 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 2 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 2 )
lwz 2 2 ,- 4 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 3 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 3 )
lwz 2 3 ,- 3 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 4 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 4 )
lwz 2 4 ,- 3 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 5 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 5 )
lwz 2 5 ,- 2 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 6 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 6 )
lwz 2 6 ,- 2 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 7 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 7 )
lwz 2 7 ,- 2 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 8 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 8 )
lwz 2 8 ,- 1 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 9 )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 9 )
lwz 2 9 ,- 1 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 3 0 )
_ GLOBAL( _ r e s t 3 2 g p r _ 3 0 )
lwz 3 0 ,- 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 3 1 )
_ GLOBAL( _ r e s t 3 2 g p r _ 3 1 )
lwz 3 1 ,- 4 ( 1 1 )
blr
/* Routines for restoring integer registers, called by the compiler. */
/* Called with r11 pointing to the stack header word of the caller of the */
/* function, just beyond the end of the integer restore area. */
_ GLOBAL( _ r e s t g p r _ 1 4 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 4 _ x )
lwz 1 4 ,- 7 2 ( 1 1 ) / * r e s t o r e g p r e g i s t e r s * /
_ GLOBAL( _ r e s t g p r _ 1 5 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 5 _ x )
lwz 1 5 ,- 6 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 6 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 6 _ x )
lwz 1 6 ,- 6 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 7 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 7 _ x )
lwz 1 7 ,- 6 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 8 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 8 _ x )
lwz 1 8 ,- 5 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 1 9 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 1 9 _ x )
lwz 1 9 ,- 5 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 0 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 0 _ x )
lwz 2 0 ,- 4 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 1 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 1 _ x )
lwz 2 1 ,- 4 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 2 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 2 _ x )
lwz 2 2 ,- 4 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 3 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 3 _ x )
lwz 2 3 ,- 3 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 4 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 4 _ x )
lwz 2 4 ,- 3 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 5 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 5 _ x )
lwz 2 5 ,- 2 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 6 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 6 _ x )
lwz 2 6 ,- 2 4 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 7 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 7 _ x )
lwz 2 7 ,- 2 0 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 8 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 8 _ x )
lwz 2 8 ,- 1 6 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 2 9 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 2 9 _ x )
lwz 2 9 ,- 1 2 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 3 0 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 3 0 _ x )
lwz 3 0 ,- 8 ( 1 1 )
_ GLOBAL( _ r e s t g p r _ 3 1 _ x )
_ GLOBAL( _ r e s t 3 2 g p r _ 3 1 _ x )
lwz 0 ,4 ( 1 1 )
lwz 3 1 ,- 4 ( 1 1 )
mtlr 0
mr 1 ,1 1
blr