|
Packit |
5c3484 |
divert(-1)
|
|
Packit |
5c3484 |
dnl Copyright 2011-2013 Free Software Foundation, Inc.
|
|
Packit |
5c3484 |
|
|
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(`HOST_DOS64')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl On DOS64 we always generate position-independent-code
|
|
Packit |
5c3484 |
dnl
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`PIC')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`LEA',`
|
|
Packit |
5c3484 |
lea $1(%rip), $2
|
|
Packit |
5c3484 |
')
|
|
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 |
|
|
Packit |
5c3484 |
define(`JUMPTABSECT', `RODATA')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl Usage: JMPENT(targlabel,tablabel)
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`JMPENT', `.long $1-$2')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl Usage: FUNC_ENTRY(nregparmas)
|
|
Packit |
5c3484 |
dnl Usage: FUNC_EXIT()
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl FUNC_ENTRY and FUNC_EXIT provide an easy path for adoption of standard
|
|
Packit |
5c3484 |
dnl ABI assembly to the DOS64 ABI.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`FUNC_ENTRY',
|
|
Packit |
5c3484 |
`push %rdi
|
|
Packit |
5c3484 |
push %rsi
|
|
Packit |
5c3484 |
mov %rcx, %rdi
|
|
Packit |
5c3484 |
ifelse(eval($1>=2),1,`dnl
|
|
Packit |
5c3484 |
mov %rdx, %rsi
|
|
Packit |
5c3484 |
ifelse(eval($1>=3),1,`dnl
|
|
Packit |
5c3484 |
mov %r8, %rdx
|
|
Packit |
5c3484 |
ifelse(eval($1>=4),1,`dnl
|
|
Packit |
5c3484 |
mov %r9, %rcx
|
|
Packit |
5c3484 |
')')')')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`FUNC_EXIT',
|
|
Packit |
5c3484 |
`pop %rsi
|
|
Packit |
5c3484 |
pop %rdi')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
dnl Target ABI macros. For DOS64 we override the defaults.
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
define(`IFDOS', `$1')
|
|
Packit |
5c3484 |
define(`IFSTD', `')
|
|
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', `')
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
|
|
Packit |
5c3484 |
divert`'dnl
|