updates from Tony Bennett (tbennett@divnc.com)

This commit is contained in:
Joel Sherrill
1996-08-15 21:09:02 +00:00
parent 0600e86f61
commit cd3868cdd3
3 changed files with 30 additions and 4 deletions

View File

@@ -126,15 +126,17 @@ void _CPU_Initialize(
proc_ptr old_handler;
/*
* XXX; need to setup fpsr smarter perhaps
* This is the default fp context for all tasks
* Set it up so that denormalized results go to zero.
*/
fp_context = (unsigned8*) &_CPU_Null_fp_context;
for (i=0 ; i<sizeof(Context_Control_fp); i++)
*fp_context++ = 0;
*((unsigned32 *) &_CPU_Null_fp_context) = HPPA_FPSTATUS_D;
/*
* Set _CPU_Default_gr27 here so it will hopefully be the correct
* Save r27 into _CPU_Default_gr27 so it will hopefully be the correct
* global data pointer for the entire system.
*/

View File

@@ -249,6 +249,28 @@ extern "C" {
#define HPPA_PROT_X2 0x06c00000 /* Execute Only, Promote to Level 2 */
#define HPPA_PROT_X3 0x07c00000 /* Execute Only, Promote to Level 3 */
/*
* Floating point status register definitions
*/
#define HPPA_FPSTATUS_ENABLE_I 0x00000001 /* inexact operation */
#define HPPA_FPSTATUS_ENABLE_U 0x00000002 /* underflow */
#define HPPA_FPSTATUS_ENABLE_O 0x00000004 /* overflow */
#define HPPA_FPSTATUS_ENABLE_Z 0x00000008 /* division by zero */
#define HPPA_FPSTATUS_ENABLE_V 0x00000010 /* invalid operation */
#define HPPA_FPSTATUS_D 0x00000020 /* denormalize as zero */
#define HPPA_FPSTATUS_T 0x00000040 /* delayed trap */
#define HPPA_FPSTATUS_RM_MASK 0x00000600 /* rounding mode */
#define HPPA_FPSTATUS_RM_SHIFT 9
#define HPPA_FPSTATUS_CQ_MASK 0x001FFC00 /* compare queue */
#define HPPA_FPSTATUS_CQ_SHIFT 13
#define HPPA_FPSTATUS_C 0x04000000 /* most recent ompare bit */
#define HPPA_FPSTATUS_FLAG_I 0x08000000 /* inexact */
#define HPPA_FPSTATUS_FLAG_U 0x10000000 /* underflow */
#define HPPA_FPSTATUS_FLAG_O 0x20000000 /* overflow */
#define HPPA_FPSTATUS_FLAG_Z 0x40000000 /* division by zero */
#define HPPA_FPSTATUS_FLAG_V 0x80000000 /* invalid operation */
/*
* Inline macros for misc. interesting opcodes