github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/alpha/unicos.m4 (about)

     1  divert(-1)
     2  
     3  dnl  m4 macros for alpha assembler on unicos.
     4  
     5  
     6  dnl  Copyright 2000, 2002-2004, 2013 Free Software Foundation, Inc.
     7  
     8  dnl  This file is part of the GNU MP Library.
     9  dnl
    10  dnl  The GNU MP Library is free software; you can redistribute it and/or modify
    11  dnl  it under the terms of either:
    12  dnl
    13  dnl    * the GNU Lesser General Public License as published by the Free
    14  dnl      Software Foundation; either version 3 of the License, or (at your
    15  dnl      option) any later version.
    16  dnl
    17  dnl  or
    18  dnl
    19  dnl    * the GNU General Public License as published by the Free Software
    20  dnl      Foundation; either version 2 of the License, or (at your option) any
    21  dnl      later version.
    22  dnl
    23  dnl  or both in parallel, as here.
    24  dnl
    25  dnl  The GNU MP Library is distributed in the hope that it will be useful, but
    26  dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    27  dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    28  dnl  for more details.
    29  dnl
    30  dnl  You should have received copies of the GNU General Public License and the
    31  dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
    32  dnl  see https://www.gnu.org/licenses/.
    33  
    34  
    35  dnl  Note that none of the standard GMP_ASM_ autoconf tests are done for
    36  dnl  unicos, so none of the config.m4 results can be used here.
    37  
    38  dnl  No underscores on unicos
    39  define(`GSYM_PREFIX')
    40  
    41  define(`ASM_START',
    42  m4_assert_numargs(0)
    43  `	.ident	dummy')
    44  
    45  define(`X',
    46  m4_assert_numargs(1)
    47  `^X$1')
    48  
    49  define(`FLOAT64',
    50  m4_assert_numargs(2)
    51  `	.psect	$1@crud,data
    52  $1:	.t_floating $2
    53  	.endp')
    54  
    55  dnl  Called: PROLOGUE_cpu(GSYM_PREFIX`'foo[,gp|noalign])
    56  dnl          EPILOGUE_cpu(GSYM_PREFIX`'foo)
    57  
    58  define(`PROLOGUE_cpu',
    59  m4_assert_numargs_range(1,2)
    60  `ifelse(`$2',gp,,
    61  `ifelse(`$2',noalign,,
    62  `ifelse(`$2',,,`m4_error(`Unrecognised PROLOGUE parameter
    63  ')')')')dnl
    64  	.stack	192		; What does this mean?  Only Cray knows.
    65  	.psect	$1@code,code,cache
    66  $1::')
    67  
    68  define(`EPILOGUE_cpu',
    69  m4_assert_numargs(1)
    70  `	.endp')
    71  
    72  
    73  dnl  Usage: LDGP(dst,src)
    74  dnl
    75  dnl  Emit an "ldgp dst,src", but only on systems using a GOT (which unicos
    76  dnl  doesn't).
    77  
    78  define(LDGP,
    79  m4_assert_numargs(2)
    80  )
    81  
    82  
    83  dnl  Usage: EXTERN(variable_name)
    84  define(`EXTERN',
    85  m4_assert_numargs(1)
    86  `	.extern	$1')
    87  
    88  define(`DATASTART',
    89  m4_assert_numargs_range(1,2)
    90  `	.psect	$1@crud,data
    91  	ALIGN(ifelse($#,1,2,$2))
    92  $1:')
    93  
    94  define(`DATAEND',
    95  m4_assert_numargs(0)
    96  `	.endp')
    97  
    98  define(`ASM_END',
    99  m4_assert_numargs(0)
   100  `	.end')
   101  
   102  define(`cvttqc',
   103  m4_assert_numargs(-1)
   104  `cvttq/c')
   105  
   106  dnl  Load a symbolic address into a register
   107  define(`LEA',
   108  m4_assert_numargs(2)
   109  	`laum	$1,  $2(r31)
   110  	sll	$1,  32,   $1
   111  	lalm	$1,  $2($1)
   112  	lal	$1,  $2($1)')
   113  
   114  
   115  dnl  Usage: ALIGN(bytes)
   116  dnl
   117  dnl  Unicos assembler .align emits zeros, even in code segments, so disable
   118  dnl  aligning.
   119  dnl
   120  dnl  GCC uses a macro emiting nops until the desired alignment is reached
   121  dnl  (see unicosmk_file_start in alpha.c).  Could do something like that if
   122  dnl  we cared.  The maximum desired alignment must be established at the
   123  dnl  start of the section though, since of course emitting nops only
   124  dnl  advances relative to the section beginning.
   125  
   126  define(`ALIGN',
   127  m4_assert_numargs(1)
   128  )
   129  
   130  
   131  divert