Home | History | Annotate | Line # | Download | only in powerpc32
eabi.m4 revision 1.1.1.2
      1      1.1  mrg divert(-1)
      2      1.1  mrg dnl  m4 macros for powerpc32 eABI assembly.
      3      1.1  mrg 
      4      1.1  mrg dnl  Copyright 2003, 2005, 2006 Free Software Foundation, Inc.
      5  1.1.1.2  mrg 
      6      1.1  mrg dnl  This file is part of the GNU MP Library.
      7      1.1  mrg dnl
      8  1.1.1.2  mrg dnl  The GNU MP Library is free software; you can redistribute it and/or modify
      9  1.1.1.2  mrg dnl  it under the terms of either:
     10  1.1.1.2  mrg dnl
     11  1.1.1.2  mrg dnl    * the GNU Lesser General Public License as published by the Free
     12  1.1.1.2  mrg dnl      Software Foundation; either version 3 of the License, or (at your
     13  1.1.1.2  mrg dnl      option) any later version.
     14  1.1.1.2  mrg dnl
     15  1.1.1.2  mrg dnl  or
     16  1.1.1.2  mrg dnl
     17  1.1.1.2  mrg dnl    * the GNU General Public License as published by the Free Software
     18  1.1.1.2  mrg dnl      Foundation; either version 2 of the License, or (at your option) any
     19  1.1.1.2  mrg dnl      later version.
     20  1.1.1.2  mrg dnl
     21  1.1.1.2  mrg dnl  or both in parallel, as here.
     22  1.1.1.2  mrg dnl
     23  1.1.1.2  mrg dnl  The GNU MP Library is distributed in the hope that it will be useful, but
     24  1.1.1.2  mrg dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     25  1.1.1.2  mrg dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     26  1.1.1.2  mrg dnl  for more details.
     27      1.1  mrg dnl
     28  1.1.1.2  mrg dnl  You should have received copies of the GNU General Public License and the
     29  1.1.1.2  mrg dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
     30  1.1.1.2  mrg dnl  see https://www.gnu.org/licenses/.
     31      1.1  mrg 
     32      1.1  mrg define(`ASM_START',`')
     33      1.1  mrg 
     34      1.1  mrg dnl  Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
     35      1.1  mrg dnl          EPILOGUE_cpu(GSYM_PREFIX`'foo)
     36      1.1  mrg dnl
     37      1.1  mrg 
     38      1.1  mrg define(`PROLOGUE_cpu',
     39      1.1  mrg m4_assert_numargs(1)
     40      1.1  mrg 	`
     41      1.1  mrg 	.section	".text"
     42      1.1  mrg 	.align	3
     43      1.1  mrg 	.globl	$1
     44      1.1  mrg 	.type	$1, @function
     45      1.1  mrg $1:')
     46      1.1  mrg 
     47      1.1  mrg define(`EPILOGUE_cpu',
     48      1.1  mrg m4_assert_numargs(1)
     49      1.1  mrg `	.size	$1, .-$1')
     50      1.1  mrg 
     51      1.1  mrg dnl  This ought to support PIC, but it is unclear how that is done for eABI
     52      1.1  mrg define(`LEA',
     53      1.1  mrg m4_assert_numargs(2)
     54      1.1  mrg `
     55      1.1  mrg 	lis	$1, $2@ha
     56      1.1  mrg 	la	$1, $2@l($1)
     57      1.1  mrg ')
     58      1.1  mrg 
     59      1.1  mrg define(`EXTERN',
     60      1.1  mrg m4_assert_numargs(1)
     61      1.1  mrg `dnl')
     62      1.1  mrg 
     63      1.1  mrg define(`DEF_OBJECT',
     64      1.1  mrg m4_assert_numargs_range(1,2)
     65      1.1  mrg `
     66      1.1  mrg 	.section	.rodata
     67      1.1  mrg 	ALIGN(ifelse($#,1,2,$2))
     68      1.1  mrg 	.type	$1, @object
     69      1.1  mrg $1:
     70      1.1  mrg ')
     71      1.1  mrg 
     72      1.1  mrg define(`END_OBJECT',
     73      1.1  mrg m4_assert_numargs(1)
     74      1.1  mrg `	.size	$1, .-$1')
     75      1.1  mrg 
     76      1.1  mrg define(`ASM_END', `dnl')
     77      1.1  mrg 
     78      1.1  mrg ifdef(`PIC',`
     79      1.1  mrg define(`PIC_SLOW')')
     80      1.1  mrg 
     81      1.1  mrg dnl  64-bit "long long" parameters are put in an even-odd pair, skipping an
     82      1.1  mrg dnl  even register if that was in turn.  I wish somebody could explain why that
     83      1.1  mrg dnl  is a good idea.
     84      1.1  mrg define(`BROKEN_LONGLONG_PARAM')
     85      1.1  mrg 
     86      1.1  mrg divert
     87