More FPU operations
This commit is contained in:
parent
d9e280f279
commit
945da70267
3 changed files with 575 additions and 265 deletions
|
|
@ -524,7 +524,7 @@ var X86 = {
|
|||
FPU: {
|
||||
MODEL_8087: 8087,
|
||||
MODEL_80287: 80287,
|
||||
MODEL_80287XL: 80387, // internally, the 80287XL was an 80387SX, so I'm not sure we really want/need a unique identifier
|
||||
MODEL_80287XL: 80387, // internally, the 80287XL was an 80387SX, so in general, we treat this as MODEL_80387
|
||||
MODEL_80387: 80387,
|
||||
CONTROL: { // FPU Control Word
|
||||
IM: 0x0001, // bit 0: Invalid Operation Mask
|
||||
|
|
@ -538,6 +538,10 @@ var X86 = {
|
|||
IEM: 0x0080, // bit 7: Interrupt Enable Mask (0 enables interrupts, 1 masks them; 8087 only)
|
||||
PC: 0x0300, // bits 8-9: Precision Control
|
||||
RC: 0x0C00, // bits 10-11: Rounding Control
|
||||
RC_NEAR: 0x0000,
|
||||
RC_DOWN: 0x0400,
|
||||
RC_UP: 0x0800,
|
||||
RC_CHOP: 0x0C00,
|
||||
IC: 0x1000, // bit 12: Infinity Control (0 for Projective, 1 for Affine)
|
||||
// bits 13-15: unused
|
||||
INIT: 0x03BF, // X86.FPU.CONTROL.IM | X86.FPU.CONTROL.DM | X86.FPU.CONTROL.ZM | X86.FPU.CONTROL.OM | X86.FPU.CONTROL.UM | X86.FPU.CONTROL.PM | X86.FPU.CONTROL.IEM | X86.FPU.CONTROL.PC
|
||||
|
|
@ -557,10 +561,10 @@ var X86 = {
|
|||
C1: 0x0200, // bit 9: Condition Code 1
|
||||
C2: 0x0400, // bit 10: Condition Code 2
|
||||
ST: 0x3800, // bits 11-13: Stack Top
|
||||
ST_SHIFT: 11,
|
||||
C3: 0x4000, // bit 14: Condition Code 3
|
||||
CC: 0x4700, // all condition code bits
|
||||
BUSY: 0x8000, // bit 15: Busy
|
||||
ST_SHIFT: 11
|
||||
BUSY: 0x8000 // bit 15: Busy
|
||||
},
|
||||
TAGS: {
|
||||
VALID: 0x0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue