dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
dnl Usage: CPUVEC_FUNCS_LIST
dnl
dnl A list of the functions from gmp-impl.h x86 struct cpuvec_t, in the
dnl order they appear in that structure.
dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo)
dnl
dnl In the amd64 code we use explicit TEXT and ALIGN() calls in the code,
dnl since different alignments are wanted in various circumstances. So for
dnl instance,
dnl
dnl TEXT
dnl ALIGN(16)
dnl PROLOGUE(mpn_add_n)
dnl ...
dnl EPILOGUE()
dnl Usage: COFF_TYPE(GSYM_PREFIX`'foo)
dnl
dnl Emit COFF style ".def ... .endef" type information for a function, when
dnl supported. The argument should include any GSYM_PREFIX.
dnl
dnl See autoconf macro GMP_ASM_COFF_TYPE for HAVE_COFF_TYPE.
dnl Usage: ASSERT([cond][,instructions])
dnl
dnl If WANT_ASSERT is 1, output the given instructions and expect the given
dnl flags condition to then be satisfied. For example,
dnl
dnl ASSERT(ne, `cmpq %rax, %rbx')
dnl
dnl The instructions can be omitted to just assert a flags condition with
dnl no extra calculation. For example,
dnl
dnl ASSERT(nc)
dnl
dnl When `instructions' is not empty, a pushfq/popfq is added for
dnl convenience to preserve the flags, but the instructions themselves must
dnl preserve any registers that matter.
dnl
dnl The condition can be omitted to just output the given instructions when
dnl assertion checking is wanted. In this case the pushf/popf is omitted.
dnl For example,
dnl
dnl ASSERT(, `movq %rax, VAR_KEEPVAL')
dnl LEA - load effective address
dnl
dnl FIXME: We should never create a GOT entry and therefore use the simpler 2nd
dnl variant always. We need to understand what happens for not-yet-hidden
dnl symbols first.
dnl define(`LEA',`dnl
ifdef(`PIC',
`mov $1@GOTPCREL(%rip), $2'
,
`lea $1(%rip), $2') ')
dnl Usage: PROTECT(symbol)
dnl
dnl Used for private GMP symbols that should never be overridden by users.
dnl This can save reloc entries and improve shlib sharing as well as
dnl application startup times
define(`PROTECT', `.hidden $1')
dnl Usage: x86_lookup(target, key,value, key,value, ...)
dnl
dnl Look for `target' among the `key' parameters.
dnl
dnl x86_lookup expands to the corresponding `value', or generates an error
dnl if `target' isn't found.
define(x86_lookup,
m4_assert_numargs_range(1,999)
`ifelse(eval($#<3),1,
`m4_error(`unrecognised part of x86 instruction: $1 ')',
`ifelse(`$1',`$2', `$3',
`x86_lookup(`$1',shift(shift(shift($@))))')')')
dnl Usage: x86_opcode_regxmm(reg)
dnl
dnl Validate the given xmm register, and return its number, 0 to 7.
dnl Usage: palignr($imm,%srcreg,%dstreg)
dnl
dnl Emit a palignr instruction, using a .byte sequence, since obsolete but
dnl still distributed versions of gas don't know SSSE3 instructions.
dnl Usage
dnl
dnl regnum(op) raw operand index (so slightly misnamed)
dnl regnumh(op) high bit of register operand nimber
dnl ix(op) 0 for reg operand, 1 for plain pointer operand.
dnl
dnl Usage (by mulx, shlx, shrx)
dnl
dnl reg1,reg2,reg3,opc1,opc2
dnl
dnl or
dnl
dnl (reg1),reg2,reg3,opc1,opc2
dnl
dnl where reg1 is any register but rsp,rbp,r12,r13, or
dnl
dnl or
dnl
dnl off,(reg1),reg2,reg3,opc1,opc2
dnl
dnl where reg1 is any register but rsp,r12.
dnl
dnl The exceptions are due to special coding needed for some registers; rsp
dnl and r12 need an extra byte 0x24 at the endwhile rbp and r13 lack the
dnl offset-less form.
dnl
dnl Other addressing forms are not handled. Invalid forms are not properly
dnl detected. Offsets that don't fit one byte are not handled correctly.
dnl Usage
dnl
dnl mulx(reg1,reg2,reg3)
dnl
dnl or
dnl
dnl mulx((reg1),reg2,reg3)
dnl
dnl where reg1 is any register but rsp,rbp,r12,r13, or
dnl
dnl mulx(off,(reg1),reg2,reg3)
dnl
dnl where reg1 is any register but rsp,r12.
define(`mulx',`dnl
ifelse(`$#',3,`dnl
c4_helper($1,$2,$3,fb,f6)',`dnl format 1,2
c4_helper($1,$2,$3,$4,fb,f6)'dnl format 3
)')
dnl Usage
dnl
dnl shlx(reg1,reg2,reg3)
dnl shrx(reg1,reg2,reg3)
dnl
dnl or
dnl
dnl shlx(reg1,(reg2),reg3)
dnl shrx(reg1,(reg2),reg3)
dnl
dnl where reg2 is any register but rsp,rbp,r12,r13, or
dnl
dnl shlx(reg1,off,(reg2),reg3)
dnl shrx(reg1,off,(reg2),reg3)
dnl
dnl where reg2 is any register but rsp,r12.
define(`shlx',`dnl
ifelse(`$#',3,`dnl
c4_helper($2,$1,$3,f9,f7)',`dnl format 1,2
c4_helper($1,$3,$2,$4,f9,f7)'dnl format 3
)')
define(`shrx',`dnl
ifelse(`$#',3,`dnl
c4_helper($2,$1,$3,fb,f7)',`dnl format 1,2
c4_helper($1,$3,$2,$4,fb,f7)'dnl format 3
)')
define(`sarx',`dnl
ifelse(`$#',3,`dnl
c4_helper($2,$1,$3,fa,f7)',`dnl format 1,2
c4_helper($1,$3,$2,$4,fa,f7)'dnl format 3
)')
dnl Usage
dnl
dnl adcx(reg1,reg2)
dnl adox(reg1,reg2)
dnl
dnl or
dnl
dnl adcx((reg1),reg2)
dnl adox((reg1),reg2)
dnl
dnl where reg1 is any register but rsp,rbp,r12,r13, or
dnl
dnl adcx(off,(reg1),reg2)
dnl adox(off,(reg1),reg2)
dnl
dnl where reg1 is any register but rsp,r12.
dnl
dnl The exceptions are due to special coding needed for some registers; rsp
dnl and r12 need an extra byte 0x24 at the endwhile rbp and r13 lack the
dnl offset-less form.
dnl
dnl Other addressing forms are not handled. Invalid forms are not properly
dnl detected. Offsets that don't fit one byte are not handled correctly.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.