/* SPDX-License-Identifier: GPL-2.0-or-later */ /* NetWinder Floating Point Emulator (c) Rebel.com, 1998-1999 Direct questions, comments to Scott Bambrough <scottb@netwinder.org>
/* * The processes registers are always at the very top of the 8K * stack+task struct. Use the same method as 'current' uses to * reach them.
*/ #define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsignedlong)current_thread_info()) - 1)
#include <linux/thread_info.h>
/* includes */ #include"fpsr.h"/* FP control and status register definitions */ #include"milieu.h"
/* * This must be no more and no less than 12 bytes.
*/ typedefunion tagFPREG {
float32 fSingle;
float64 fDouble; #ifdef CONFIG_FPE_NWFPE_XP
floatx80 fExtended; #else
u32 padding[3]; #endif
} __attribute__ ((packed,aligned(4))) FPREG;
/* * FPA11 device model. * * This structure is exported to user space. Do not re-order. * Only add new stuff to the end, and do not change the size of * any element. Elements of this structure are used by user * space, and must match struct user_fp in <asm/user.h>. * We include the byte offsets below for documentation purposes. * * The size of this structure and FPREG are checked by fpmodule.c * on initialisation. If the rules have been broken, NWFPE will * not initialise.
*/ typedefstruct tagFPA11 { /* 0 */ FPREG fpreg[8]; /* 8 floating point registers */ /* 96 */ FPSR fpsr; /* floating point status register */ /* 100 */ FPCR fpcr; /* floating point control register */ /* 104 */ unsigned char fType[8]; /* type of floating point value held in
floating point registers. One of
none, single, doubleor extended. */ /* 112 */ int initflag; /* this is special. The kernel guarantees
to set it to 0 when a thread is launched,
so we can use it to detect whether this
instance of the emulator needs to be
initialised. */
} __attribute__ ((packed,aligned(4))) FPA11;
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.