Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
22
.github/workflows/c-cpp.yml
vendored
22
.github/workflows/c-cpp.yml
vendored
@@ -14,6 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build (DEV_BUILD=${{ matrix.dev-build }}, NEW_DYNAREC=${{ matrix.new-dynarec }}, X64=${{ matrix.target-arch.x64 }})
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
@@ -25,14 +26,29 @@ jobs:
|
||||
matrix:
|
||||
dev-build: ['y', 'n']
|
||||
new-dynarec: ['y', 'n']
|
||||
target-arch:
|
||||
- x64: 'n'
|
||||
msystem: MINGW32
|
||||
prefix: mingw-w64-i686
|
||||
- x64: 'y'
|
||||
msystem: MINGW64
|
||||
prefix: mingw-w64-x86_64
|
||||
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
update: true
|
||||
msystem: MINGW32
|
||||
install: 'make mingw-w64-i686-toolchain mingw-w64-i686-openal mingw-w64-i686-freetype mingw-w64-i686-SDL2 mingw-w64-i686-zlib mingw-w64-i686-libpng mingw-w64-i686-libvncserver'
|
||||
msystem: ${{ matrix.target-arch.msystem }}
|
||||
install: >-
|
||||
make
|
||||
${{ matrix.target-arch.prefix }}-toolchain
|
||||
${{ matrix.target-arch.prefix }}-openal
|
||||
${{ matrix.target-arch.prefix }}-freetype
|
||||
${{ matrix.target-arch.prefix }}-SDL2
|
||||
${{ matrix.target-arch.prefix }}-zlib
|
||||
${{ matrix.target-arch.prefix }}-libpng
|
||||
${{ matrix.target-arch.prefix }}-libvncserver
|
||||
- uses: actions/checkout@v2
|
||||
- name: make
|
||||
run: make -fwin/makefile.mingw -j DEV_BUILD=${{ matrix.dev-build }} NEW_DYNAREC=${{ matrix.new-dynarec }} VNC=n
|
||||
run: make -fwin/makefile.mingw -j DEV_BUILD=${{ matrix.dev-build }} NEW_DYNAREC=${{ matrix.new-dynarec }} X64=${{ matrix.target-arch.x64 }} VNC=n
|
||||
working-directory: ./src
|
||||
|
@@ -425,8 +425,8 @@ int
|
||||
cdi_read_sectors(cd_img_t *cdi, uint8_t *buffer, int raw, uint32_t sector, uint32_t num)
|
||||
{
|
||||
int sector_size, success = 1;
|
||||
uint8_t buf_len, *buf;
|
||||
uint32_t i;
|
||||
uint8_t *buf;
|
||||
uint32_t buf_len, i;
|
||||
|
||||
/* TODO: This fails to account for Mode 2. Shouldn't we have a function
|
||||
to get sector size? */
|
||||
|
@@ -146,7 +146,7 @@ static uint32_t ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint3
|
||||
static uint32_t ropFSTd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
x86seg *target_seg;
|
||||
int host_reg1, host_reg2;
|
||||
int host_reg1, host_reg2 = 0;
|
||||
|
||||
FP_ENTER();
|
||||
op_pc--;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
static uint32_t ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
int host_reg1, host_reg2;
|
||||
int host_reg1, host_reg2 = 0;
|
||||
|
||||
MMX_ENTER();
|
||||
|
||||
|
@@ -297,33 +297,26 @@ static inline void STORE_REG_TARGET_B_RELEASE(int host_reg, int guest_reg)
|
||||
addbyte(0x44);
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
if (host_reg & 0x10)
|
||||
{
|
||||
addbyte(0x66); /*AND AX, 0xff00*/
|
||||
addbyte(0x25);
|
||||
addword(0xff00);
|
||||
}
|
||||
else
|
||||
{
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (host_reg)
|
||||
{
|
||||
addbyte(0x66); /*MOV AX, host_reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
}
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
else if (host_reg & 3)
|
||||
{
|
||||
addbyte(0x66); /*MOV AX, host_reg*/
|
||||
addbyte(0x89);
|
||||
addbyte(0xc0 | ((host_reg & 3) << 3));
|
||||
}
|
||||
if (host_reg & 0x10)
|
||||
{
|
||||
addbyte(0x66); /*AND AX, 0xff00*/
|
||||
addbyte(0x25);
|
||||
addword(0xff00);
|
||||
}
|
||||
else
|
||||
{
|
||||
addbyte(0x66); /*SHL AX, 8*/
|
||||
addbyte(0xc1);
|
||||
addbyte(0xe0);
|
||||
addbyte(0x08);
|
||||
}
|
||||
addbyte(0x66); /*AND dest_reg, 0x00ff*/
|
||||
addbyte(0x41);
|
||||
addbyte(0x81);
|
||||
|
@@ -44,9 +44,6 @@ OP_XCHG_EAX_(EBP)
|
||||
|
||||
static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
/* #ifdef __amd64__
|
||||
return 0;
|
||||
#else */
|
||||
int src_reg, dst_reg, temp_reg;
|
||||
|
||||
if ((fetchdat & 0xc0) != 0xc0)
|
||||
@@ -59,7 +56,6 @@ static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uin
|
||||
STORE_REG_TARGET_B_RELEASE(temp_reg, fetchdat & 7);
|
||||
|
||||
return op_pc + 1;
|
||||
/* #endif */
|
||||
}
|
||||
static uint32_t ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
|
@@ -462,9 +462,9 @@ static void
|
||||
writemem(uint32_t s, uint16_t v)
|
||||
{
|
||||
if (opcode & 1)
|
||||
return writememw(s, cpu_state.eaaddr, v);
|
||||
writememw(s, cpu_state.eaaddr, v);
|
||||
else
|
||||
return writememb(s, cpu_state.eaaddr, (uint8_t) (v & 0xff));
|
||||
writememb(s, cpu_state.eaaddr, (uint8_t) (v & 0xff));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -240,35 +240,22 @@ typedef struct {
|
||||
uint64_t fcr2, fcr3;
|
||||
} msr_t;
|
||||
|
||||
typedef union {
|
||||
uint32_t l;
|
||||
uint16_t w;
|
||||
} cr0_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
x86reg regs[8];
|
||||
|
||||
uint8_t tag[8];
|
||||
|
||||
int8_t ssegs, ismmx,
|
||||
abrt, pad;
|
||||
|
||||
uint16_t npxs, npxc, flags, eflags,
|
||||
old_npxc, new_npxc;
|
||||
|
||||
uint16_t MM_w4[8];
|
||||
|
||||
int _cycles,
|
||||
flags_op, TOP;
|
||||
|
||||
uint32_t flags_res,
|
||||
flags_op1, flags_op2,
|
||||
pc, oldpc, eaaddr, op32;
|
||||
|
||||
cr0_t CR0;
|
||||
|
||||
x86seg *ea_seg;
|
||||
uint32_t eaaddr;
|
||||
|
||||
int flags_op;
|
||||
uint32_t flags_res,
|
||||
flags_op1, flags_op2;
|
||||
|
||||
uint32_t pc,
|
||||
oldpc, op32;
|
||||
|
||||
int TOP;
|
||||
|
||||
union {
|
||||
struct {
|
||||
@@ -279,10 +266,21 @@ typedef struct {
|
||||
int32_t rm_mod_reg_data;
|
||||
} rm_data;
|
||||
|
||||
int8_t ssegs, ismmx,
|
||||
abrt, pad;
|
||||
|
||||
int _cycles;
|
||||
|
||||
uint16_t npxs, npxc;
|
||||
|
||||
double ST[8];
|
||||
|
||||
uint16_t MM_w4[8];
|
||||
|
||||
MMX_REG MM[8];
|
||||
|
||||
uint16_t old_npxc, new_npxc;
|
||||
|
||||
#ifdef USE_NEW_DYNAREC
|
||||
uint32_t old_fp_control, new_fp_control;
|
||||
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86
|
||||
@@ -295,6 +293,13 @@ typedef struct {
|
||||
|
||||
x86seg seg_cs, seg_ds, seg_es, seg_ss,
|
||||
seg_fs, seg_gs;
|
||||
|
||||
union {
|
||||
uint32_t l;
|
||||
uint16_t w;
|
||||
} CR0;
|
||||
|
||||
uint16_t flags, eflags;
|
||||
} cpu_state_t;
|
||||
|
||||
/*The cpu_state.flags below must match in both cpu_cur_status and block->status for a block
|
||||
|
@@ -124,7 +124,7 @@ typedef struct svga_t
|
||||
int override;
|
||||
void *p;
|
||||
|
||||
uint8_t crtc[128], gdcreg[64], attrregs[32], seqregs[64],
|
||||
uint8_t crtc[256], gdcreg[64], attrregs[32], seqregs[256],
|
||||
egapal[16],
|
||||
*vram, *changedvram;
|
||||
|
||||
|
Reference in New Issue
Block a user