1
0
Fork 0

add undocumented ffreep fpu instruction to the recompilers (thanks to ripsaw for figuring this out; fixes Trucks)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3468
This commit is contained in:
Sebastian Strohhäcker 2009-09-23 20:55:19 +00:00
parent 25c7518a8c
commit d04f128aae
3 changed files with 18 additions and 2 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu.h,v 1.4 2009-05-27 09:15:41 qbix79 Exp $ */
/* $Id: dyn_fpu.h,v 1.5 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"
#if C_FPU
@ -593,6 +593,11 @@ static void dyn_fpu_esc7(){
Bitu sub=(decode.modrm.val & 7);
if (decode.modrm.val >= 0xc0) {
switch (group){
case 0x00: /* FFREEP STi*/
dyn_fpu_top();
gen_call_function((void*)&FPU_FFREE,"%Ddr",DREG(EA));
gen_call_function((void*)&FPU_FPOP,"");
break;
case 0x01: /* FXCH STi*/
dyn_fpu_top();
gen_call_function((void*)&FPU_FXCH,"%Ddr%Ddr",DREG(TMPB),DREG(EA));

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu_dh.h,v 1.6 2009-05-27 09:15:41 qbix79 Exp $ */
/* $Id: dyn_fpu_dh.h,v 1.7 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"
#if C_FPU
@ -408,6 +408,10 @@ static void dh_fpu_esc7(){
Bitu sub=(decode.modrm.val & 7);
if (decode.modrm.val >= 0xc0) {
switch (group){
case 0x00: /* FFREEP STi*/
cache_addb(0xdf);
cache_addb(decode.modrm.val);
break;
case 0x01: /* FXCH STi*/
cache_addb(0xdf);
cache_addb(decode.modrm.val);

View file

@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dyn_fpu.h,v 1.8 2009-09-23 20:55:19 c2woody Exp $ */
#include "dosbox.h"
#if C_FPU
@ -602,6 +604,11 @@ static void dyn_fpu_esc7(){
dyn_get_modrm();
if (decode.modrm.val >= 0xc0) {
switch (decode.modrm.reg){
case 0x00: /* FFREEP STi */
dyn_fpu_top();
gen_call_function_R((void*)&FPU_FFREE,FC_OP2);
gen_call_function_raw((void*)&FPU_FPOP);
break;
case 0x01: /* FXCH STi*/
dyn_fpu_top();
gen_call_function_RR((void*)&FPU_FXCH,FC_OP1,FC_OP2);