Blame mpn/x86_64/darwin.m4

Packit 5c3484
divert(-1)
Packit 5c3484
dnl  Copyright 2008, 2011, 2012 Free Software Foundation, Inc.
Packit 5c3484
dnl
Packit 5c3484
dnl  This file is part of the GNU MP Library.
Packit 5c3484
dnl
Packit 5c3484
dnl  The GNU MP Library is free software; you can redistribute it and/or modify
Packit 5c3484
dnl  it under the terms of either:
Packit 5c3484
dnl
Packit 5c3484
dnl    * the GNU Lesser General Public License as published by the Free
Packit 5c3484
dnl      Software Foundation; either version 3 of the License, or (at your
Packit 5c3484
dnl      option) any later version.
Packit 5c3484
dnl
Packit 5c3484
dnl  or
Packit 5c3484
dnl
Packit 5c3484
dnl    * the GNU General Public License as published by the Free Software
Packit 5c3484
dnl      Foundation; either version 2 of the License, or (at your option) any
Packit 5c3484
dnl      later version.
Packit 5c3484
dnl
Packit 5c3484
dnl  or both in parallel, as here.
Packit 5c3484
dnl
Packit 5c3484
dnl  The GNU MP Library is distributed in the hope that it will be useful, but
Packit 5c3484
dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit 5c3484
dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
Packit 5c3484
dnl  for more details.
Packit 5c3484
dnl
Packit 5c3484
dnl  You should have received copies of the GNU General Public License and the
Packit 5c3484
dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
Packit 5c3484
dnl  see https://www.gnu.org/licenses/.
Packit 5c3484
Packit 5c3484
define(`DARWIN')
Packit 5c3484
Packit 5c3484
define(`LEA',`dnl
Packit 5c3484
ifdef(`PIC',
Packit 5c3484
	`lea	$1(%rip), $2'
Packit 5c3484
,
Packit 5c3484
	`movabs	`$'$1, $2')
Packit 5c3484
')
Packit 5c3484
Packit 5c3484
dnl  Usage: CALL(funcname)
Packit 5c3484
dnl
Packit 5c3484
dnl  Simply override the definition in x86_64-defs.m4.
Packit 5c3484
Packit 5c3484
define(`CALL',`call	GSYM_PREFIX`'$1')
Packit 5c3484
Packit 5c3484
Packit 5c3484
dnl  Usage: JUMPTABSECT
Packit 5c3484
dnl
Packit 5c3484
dnl  CAUTION: Do not put anything sensible here, like RODATA.  That works with
Packit 5c3484
dnl  some Darwin tool chains, but silently breaks with other.  (Note that
Packit 5c3484
dnl  putting jump tables in the text segment is a really poor idea for PC many
Packit 5c3484
dnl  processors, since they cannot cache the same thing in both L1D and L2I.)
Packit 5c3484
Packit 5c3484
define(`JUMPTABSECT', `.text')
Packit 5c3484
Packit 5c3484
Packit 5c3484
dnl  Usage: JMPENT(targlabel,tablabel)
Packit 5c3484
Packit 5c3484
define(`JMPENT',`dnl
Packit 5c3484
ifdef(`PIC',
Packit 5c3484
	`.set	$1_tmp, $1-$2
Packit 5c3484
	.long	$1_tmp'
Packit 5c3484
,
Packit 5c3484
	`.quad	$1'
Packit 5c3484
)')
Packit 5c3484
Packit 5c3484
dnl  Target ABI macros.  For Darwin we override IFELF (and leave default for
Packit 5c3484
dnl  IFDOS and IFSTD).
Packit 5c3484
Packit 5c3484
define(`IFELF',   `')
Packit 5c3484
Packit 5c3484
Packit 5c3484
dnl  Usage: PROTECT(symbol)
Packit 5c3484
dnl
Packit 5c3484
dnl  Used for private GMP symbols that should never be overridden by users.
Packit 5c3484
dnl  This can save reloc entries and improve shlib sharing as well as
Packit 5c3484
dnl  application startup times
Packit 5c3484
Packit 5c3484
define(`PROTECT',  `.private_extern $1')
Packit 5c3484
Packit 5c3484
Packit 5c3484
divert`'dnl