Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9cb2b210
Commit
9cb2b210
authored
Jul 10, 2002
by
Admiral Coeyman
Committed by
Alexandre Julliard
Jul 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for FPU emulation interrupts.
parent
273f86fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
263 additions
and
55 deletions
+263
-55
Makefile.in
dlls/ntdll/Makefile.in
+1
-1
dosvm.c
dlls/winedos/dosvm.c
+2
-2
miscemu.h
include/miscemu.h
+14
-1
fpu.c
msdos/fpu.c
+246
-0
int3d.c
msdos/int3d.c
+0
-51
No files found.
dlls/ntdll/Makefile.in
View file @
9cb2b210
...
@@ -51,6 +51,7 @@ C_SRCS = \
...
@@ -51,6 +51,7 @@ C_SRCS = \
$(TOPOBJDIR)
/msdos/dosconf.c
\
$(TOPOBJDIR)
/msdos/dosconf.c
\
$(TOPOBJDIR)
/msdos/dosmem.c
\
$(TOPOBJDIR)
/msdos/dosmem.c
\
$(TOPOBJDIR)
/msdos/dpmi.c
\
$(TOPOBJDIR)
/msdos/dpmi.c
\
$(TOPOBJDIR)
/msdos/fpu.c
\
$(TOPOBJDIR)
/msdos/int11.c
\
$(TOPOBJDIR)
/msdos/int11.c
\
$(TOPOBJDIR)
/msdos/int12.c
\
$(TOPOBJDIR)
/msdos/int12.c
\
$(TOPOBJDIR)
/msdos/int13.c
\
$(TOPOBJDIR)
/msdos/int13.c
\
...
@@ -62,7 +63,6 @@ C_SRCS = \
...
@@ -62,7 +63,6 @@ C_SRCS = \
$(TOPOBJDIR)
/msdos/int26.c
\
$(TOPOBJDIR)
/msdos/int26.c
\
$(TOPOBJDIR)
/msdos/int2a.c
\
$(TOPOBJDIR)
/msdos/int2a.c
\
$(TOPOBJDIR)
/msdos/int2f.c
\
$(TOPOBJDIR)
/msdos/int2f.c
\
$(TOPOBJDIR)
/msdos/int3d.c
\
$(TOPOBJDIR)
/msdos/int41.c
\
$(TOPOBJDIR)
/msdos/int41.c
\
$(TOPOBJDIR)
/msdos/int4b.c
\
$(TOPOBJDIR)
/msdos/int4b.c
\
$(TOPOBJDIR)
/msdos/int5c.c
\
$(TOPOBJDIR)
/msdos/int5c.c
\
...
...
dlls/winedos/dosvm.c
View file @
9cb2b210
...
@@ -652,8 +652,8 @@ static const INTPROC real_mode_handlers[] =
...
@@ -652,8 +652,8 @@ static const INTPROC real_mode_handlers[] =
/* 18 */
0
,
0
,
INT_Int1aHandler
,
0
,
0
,
0
,
0
,
0
,
/* 18 */
0
,
0
,
INT_Int1aHandler
,
0
,
0
,
0
,
0
,
0
,
/* 20 */
DOSVM_Int20Handler
,
DOSVM_Int21Handler
,
0
,
0
,
0
,
INT_Int25Handler
,
0
,
0
,
/* 20 */
DOSVM_Int20Handler
,
DOSVM_Int21Handler
,
0
,
0
,
0
,
INT_Int25Handler
,
0
,
0
,
/* 28 */
0
,
DOSVM_Int29Handler
,
INT_Int2aHandler
,
0
,
0
,
0
,
0
,
INT_Int2fHandler
,
/* 28 */
0
,
DOSVM_Int29Handler
,
INT_Int2aHandler
,
0
,
0
,
0
,
0
,
INT_Int2fHandler
,
/* 30 */
0
,
DOSVM_Int31Handler
,
0
,
DOSVM_Int33Handler
,
0
,
0
,
0
,
0
,
/* 30 */
0
,
DOSVM_Int31Handler
,
0
,
DOSVM_Int33Handler
,
INT_Int34Handler
,
INT_Int35Handler
,
INT_Int36Handler
,
INT_Int37Handler
,
/* 38 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 38 */
INT_Int38Handler
,
INT_Int39Handler
,
INT_Int3aHandler
,
INT_Int3bHandler
,
INT_Int3cHandler
,
INT_Int3dHandler
,
INT_Int3eHandler
,
0
,
/* 40 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 40 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 48 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 48 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 50 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
/* 50 */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
...
include/miscemu.h
View file @
9cb2b210
...
@@ -225,6 +225,19 @@ extern void WINAPI INT_Int2aHandler(CONTEXT86*);
...
@@ -225,6 +225,19 @@ extern void WINAPI INT_Int2aHandler(CONTEXT86*);
/* msdos/int2f.c */
/* msdos/int2f.c */
extern
void
WINAPI
INT_Int2fHandler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int2fHandler
(
CONTEXT86
*
);
/* fpu.c */
extern
void
WINAPI
INT_Int34Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int35Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int36Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int37Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int38Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int39Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int3aHandler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int3bHandler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int3cHandler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int3dHandler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int3eHandler
(
CONTEXT86
*
);
/* msdos/dpmi.c */
/* msdos/dpmi.c */
typedef
void
(
WINAPI
*
RMCBPROC
)(
CONTEXT86
*
);
typedef
void
(
WINAPI
*
RMCBPROC
)(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int31Handler
(
CONTEXT86
*
);
extern
void
WINAPI
INT_Int31Handler
(
CONTEXT86
*
);
...
@@ -259,7 +272,7 @@ extern char IO_pp_init(void);
...
@@ -259,7 +272,7 @@ extern char IO_pp_init(void);
*/
*/
#define CTX_SEG_OFF_TO_LIN(context,seg,off) \
#define CTX_SEG_OFF_TO_LIN(context,seg,off) \
(ISV86(context) ? PTR_REAL_TO_LIN((seg),(off)) : \
(ISV86(context) ? PTR_REAL_TO_LIN((seg),(off)) : \
(!seg || IS_SELECTOR_SYSTEM(seg))? (void *)(off) : MapSL(MAKESEGPTR((seg),(off))))
(!seg || IS_SELECTOR_SYSTEM(seg))? (void *)(
ULONG_PTR)(
off) : MapSL(MAKESEGPTR((seg),(off))))
#define INT_BARF(context,num) \
#define INT_BARF(context,num) \
ERR( "int%x: unknown/not implemented parameters:\n" \
ERR( "int%x: unknown/not implemented parameters:\n" \
...
...
msdos/fpu.c
0 → 100644
View file @
9cb2b210
/*
* DOS interrupt 34->3e handlers. All FPU interrupt code should be
* moved into this file.
* int 3d is not activated yet...
*
* Copyright 2002 Robert 'Admiral' Coeyman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include "msdos.h"
#include "miscemu.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
/*
* The actual work is done by a single routine.
*/
static
void
FPU_ModifyCode
(
CONTEXT86
*
context
,
BYTE
Opcode
);
/**********************************************************************
* INT_Int34Handler (WPROCS.152)
*
* Handler for int 34 (FLOATING POINT EMULATION - Opcode 0xd8).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int34Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x34 called-- FP opcode 0xd8"
);
FPU_ModifyCode
(
context
,
0xd8
);
}
/**********************************************************************
* INT_Int35Handler (WPROCS.153)
*
* Handler for int 35 (FLOATING POINT EMULATION - Opcode 0xd9).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int35Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x35 called-- FP opcode 0xd9"
);
FPU_ModifyCode
(
context
,
0xd9
);
}
/**********************************************************************
* INT_Int36Handler (WPROCS.154)
*
* Handler for int 36 (FLOATING POINT EMULATION - Opcode 0xda).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int36Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x36 called-- FP opcode 0xda"
);
FPU_ModifyCode
(
context
,
0xda
);
}
/**********************************************************************
* INT_Int37Handler (WPROCS.155)
*
* Handler for int 37 (FLOATING POINT EMULATION - Opcode 0xdb).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int37Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x37 called-- FP opcode 0xdb"
);
FPU_ModifyCode
(
context
,
0xdb
);
}
/**********************************************************************
* INT_Int38Handler (WPROCS.156)
*
* Handler for int 38 (FLOATING POINT EMULATION - Opcode 0xdc).
*
* Between versions 3.0 and 5.01, the original PC-MOS API call that
* was here was moved to int 0xd4.
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int38Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x38 called-- FP opcode 0xdc"
);
FPU_ModifyCode
(
context
,
0xdc
);
}
/**********************************************************************
* INT_Int39Handler (WPROCS.157)
*
* Handler for int 39 (FLOATING POINT EMULATION - Opcode 0xdd).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int39Handler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x39 called-- FP opcode 0xdd"
);
FPU_ModifyCode
(
context
,
0xdd
);
}
/**********************************************************************
* INT_Int3aHandler (WPROCS.158)
*
* Handler for int 3a (FLOATING POINT EMULATION - Opcode 0xde).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int3aHandler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x3a called-- FP opcode 0xde"
);
FPU_ModifyCode
(
context
,
0xde
);
}
/**********************************************************************
* INT_Int3bHandler (WPROCS.159)
*
* Handler for int 3B (FLOATING POINT EMULATION - Opcode 0xdf).
*
* The interrupt list isn't specific about what this interrupt
* actually does. [ interrup.m ]
*/
void
WINAPI
INT_Int3bHandler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x3b called-- FP opcode 0xdf"
);
FPU_ModifyCode
(
context
,
0xdf
);
}
/**********************************************************************
* INT_Int3cHandler (WPROCS.160)
*
* Handler for int 3C (FLOATING POINT EMULATION - INSTRUCTIONS WITH SEGMENT OVERRIDE).
*
* Generated code is CD 3C xy mm ... (CD = int | 3C = this interrupt)
* xy is a modified ESC code and mm is the modR/M byte.
* xy byte seems to be encoded as ss011xxx or ss000xxx
* ss= segment override.
* 00 -> DS
* 01 -> SS
* 10 -> CS
* 11 -> ES
*
* 11011xxx should be the opcode instruction.
*/
void
WINAPI
INT_Int3cHandler
(
CONTEXT86
*
context
)
{
FIXME
(
"Int 3C NOT Implemented"
);
INT_BARF
(
context
,
0x3c
);
}
/**********************************************************************
* INT_Int3dHandler (WPROCS.161)
*
* Handler for int 3D (FLOATING POINT EMULATION - Standalone FWAIT).
*
* Opcode 0x90 is a NOP. It just fills space where the 3D was.
*/
void
WINAPI
INT_Int3dHandler
(
CONTEXT86
*
context
)
{
TRACE
(
"Int 0x3d called-- Standalone FWAIT"
);
FPU_ModifyCode
(
context
,
0x90
);
}
/**********************************************************************
* INT_Int3eHandler (WPROCS.162)
*
* FLOATING POINT EMULATION -- Borland "Shortcut" call.
* The two bytes following the int 3E instruction are
* the subcode and a NOP ( 0x90 ), except for subcodes DC and DE
* where the second byte is the register count.
*
* Direct access 4.0 modifies and does not restore this vector.
*
*/
void
WINAPI
INT_Int3eHandler
(
CONTEXT86
*
context
)
{
FIXME
(
"Int 3E NOT Implemented"
);
INT_BARF
(
context
,
0x3e
);
}
/**********************************************************************
* FPU_ModifyCode
*
* This is the function that inserts the 0x9b fwait instruction
* and the actual FPU opcode into the program.
* -A.C.
*
* Code thanks to Ove Kaaven
*/
static
void
FPU_ModifyCode
(
CONTEXT86
*
context
,
BYTE
Opcode
)
{
WORD
*
stack
=
CTX_SEG_OFF_TO_LIN
(
context
,
context
->
SegSs
,
context
->
Esp
);
BYTE
*
code
=
CTX_SEG_OFF_TO_LIN
(
context
,
stack
[
1
],
stack
[
0
]);
/*
* All *NIX systems should have a real or kernel emulated FPU.
*/
code
[
-
2
]
=
0x9b
;
/* The fwait instruction */
code
[
-
1
]
=
Opcode
;
/* Insert the opcode */
if
(
stack
[
0
]
<
2
)
FIXME
(
"Backed up over a segment boundry in FPU code."
);
stack
[
0
]
-=
2
;
/* back up the return address 2 bytes */
TRACE
(
"Modified code in FPU int call to 0x9b 0x%x"
,
Opcode
);
}
msdos/int3d.c
deleted
100644 → 0
View file @
273f86fc
/*
* DOS interrupt 3d handler.
* Copyright 1997 Len White
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdlib.h>
#include "msdos.h"
#include "miscemu.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
/**********************************************************************
* INT_Int3dHandler (WPROCS.161)
*
* Handler for int 3d (FLOATING POINT EMULATION - STANDALONE FWAIT).
*/
void
WINAPI
INT_Int3dHandler
(
CONTEXT86
*
context
)
{
switch
(
AH_reg
(
context
))
{
case
0x00
:
break
;
case
0x02
:
case
0x03
:
case
0x04
:
case
0x05
:
case
0xb
:
AH_reg
(
context
)
=
0
;
break
;
default:
INT_BARF
(
context
,
0x3d
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment