Port cmovcc
This commit is contained in:
parent
aebcff84ed
commit
1dcb5a6f58
|
@ -202,8 +202,6 @@ function V86Starter(options)
|
|||
"_bswap": function() { return cpu.bswap.apply(cpu, arguments); },
|
||||
|
||||
"_setcc": function() { return cpu.setcc.apply(cpu, arguments); },
|
||||
"_cmovcc16": function() { return cpu.cmovcc16.apply(cpu, arguments); },
|
||||
"_cmovcc32": function() { return cpu.cmovcc32.apply(cpu, arguments); },
|
||||
|
||||
"_lar": function() { return cpu.lar.apply(cpu, arguments); },
|
||||
"_lsl": function() { return cpu.lsl.apply(cpu, arguments); },
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include "global_pointers.h"
|
||||
|
||||
// XXX: Remove these declarations when they are implemented in C
|
||||
void cmovcc16(bool);
|
||||
void cmovcc32(bool);
|
||||
static void cmovcc16(bool);
|
||||
static void cmovcc32(bool);
|
||||
void jmpcc16(bool);
|
||||
void jmpcc32(bool);
|
||||
void setcc(bool);
|
||||
|
|
|
@ -149,6 +149,24 @@ void jmpcc32(bool condition)
|
|||
}
|
||||
}
|
||||
|
||||
static void cmovcc16(bool condition)
|
||||
{
|
||||
int32_t data = read_e16();
|
||||
if(condition)
|
||||
{
|
||||
write_g16(data);
|
||||
}
|
||||
}
|
||||
|
||||
static void cmovcc32(bool condition)
|
||||
{
|
||||
int32_t data = read_e32s();
|
||||
if(condition)
|
||||
{
|
||||
write_g32(data);
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t get_stack_pointer(int32_t offset)
|
||||
{
|
||||
if(*stack_size_32)
|
||||
|
|
Loading…
Reference in a new issue