dnl This file is part of the GNU MP Library test suite.
dnl The GNU MP Library test suite is free software; you can redistribute it
dnl and/or modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation; either version 3 of the
dnl License, or (at your option) any later version.
dnl The GNU MP Library test suite is distributed in the hope that it will be
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
dnl Public License for more details.
dnl You should have received a copy of the GNU General Public License along
dnl with the GNU MP Library test suite. If not, see
dnl https://www.gnu.org/licenses/.
dnl The current version of the code attempts to keep the call/return
dnl prediction stack valid, but matching calls and returns.
include(`../config.m4')
C void x86_fldcw (unsigned short cw);
C
C Execute an fldcw, setting the x87 control word to cw.
PROLOGUE(x86_fldcw) mov %rdi, -8(%rsp)
fldcw -8(%rsp) ret
EPILOGUE()
C unsigned short x86_fstcw (void);
C
C Execute an fstcw, returning the current x87 control word.
dnl Instrumented profiling won't come out quite right below, since we don't do
dnl an actual "ret". There's only a few instructions here, so there's no
dnl great need to get them separately accounted, just let them get attributed
dnl to the caller. FIXME thiscomment might no longer be true.
C int calling_conventions (...);
C
C The global variable "calling_conventions_function" is the function to
C call, with the arguments as passed here.
C
C Perhaps the finit should be done only if the tags word isn't clear, but
C nothing uses the rounding mode or anything at the moment.
C Values we expect to see unchanged, as per amd64check.c mov WANT_RBX(%rax), %rbx mov WANT_RBP(%rax), %rbp mov WANT_R12(%rax), %r12 mov WANT_R13(%rax), %r13 mov WANT_R14(%rax), %r14 mov WANT_R15(%rax), %r15
C Try to provoke a problem by starting with junk in the caller-saves
C registers, especially %rax which will be the return value.
C mov JUNK_RAX(%rax), %rax C overwritten below anyway mov JUNK_R10(%rax), %r10 mov JUNK_R11(%rax), %r11
C Overwrite parameter registers
C mov JUNK_R9(%rcx), %r9
C mov JUNK_R8(%rcx), %r8
C mov JUNK_RCX(%rcx), %rcx
C mov JUNK_RDX(%rcx), %rdx
C mov JUNK_RSI(%rcx), %rsi
C mov JUNK_RDI(%rcx), %rdi
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 ist noch experimentell.