Merge pull request #5197 from jriwanek-forks/warnfixes

Assorted warning fixes
This commit is contained in:
Miran Grča
2025-02-02 09:31:13 +01:00
committed by GitHub
136 changed files with 1374 additions and 1291 deletions

View File

@@ -293,7 +293,7 @@ void pclog_ensure_stdlog_open(void)
* being logged, and catch repeating entries.
*/
void
pclog_ex(const char *fmt, va_list ap)
pclog_ex(UNUSED(const char *fmt), UNUSED(va_list ap))
{
#ifndef RELEASE_BUILD
char temp[LOG_SIZE_BUFFER];
@@ -330,7 +330,7 @@ pclog_toggle_suppr(void)
/* Log something. We only do this in non-release builds. */
void
pclog(const char *fmt, ...)
pclog(UNUSED(const char *fmt), ...)
{
#ifndef RELEASE_BUILD
va_list ap;

View File

@@ -89,7 +89,7 @@ acpi_timer_get(acpi_t *dev)
}
static uint8_t
acpi_gp_timer_get(acpi_t *dev)
acpi_gp_timer_get(UNUSED(acpi_t *dev))
{
uint64_t clock = acpi_clock_get();
clock -= acpi_last_clock;

View File

@@ -593,7 +593,7 @@ read_toc_raw(const cdrom_t *dev, unsigned char *b, const unsigned char start_tra
}
static int
track_type_is_valid(const cdrom_t *dev, const int type, const int flags, const int audio,
track_type_is_valid(UNUSED(const cdrom_t *dev), const int type, const int flags, const int audio,
const int mode2)
{
if (!(flags & 0x70) && (flags & 0xf8)) { /* 0x08/0x80/0x88 are illegal modes */
@@ -1968,7 +1968,7 @@ cdrom_get_track_buffer(cdrom_t *dev, uint8_t *buf)
/* TODO: Actually implement this properly. */
void
cdrom_get_q(cdrom_t *dev, uint8_t *buf, int *curtoctrk, uint8_t mode)
cdrom_get_q(UNUSED(cdrom_t *dev), uint8_t *buf, UNUSED(int *curtoctrk), UNUSED(uint8_t mode))
{
memset(buf, 0x00, 10);
}

View File

@@ -32,13 +32,13 @@
#include <time.h>
#include <wchar.h>
#include <86box/86box.h>
#include <86box/bswap.h>
#include <86box/cdrom.h>
#include <86box/cdrom_image.h>
#include <86box/cdrom_image_viso.h>
#include <86box/log.h>
#include <86box/path.h>
#include <86box/plat.h>
#include <86box/bswap.h>
#include <86box/plat_dir.h>
#include <86box/version.h>
#include <86box/nvr.h>

View File

@@ -40,9 +40,8 @@
#include <86box/fdc.h>
#include <86box/smram.h>
#include <86box/chipset.h>
#include <86box/plat_unused.h>
#ifdef ENABLE_ALI1409_LOG
int ali1409_do_log = ENABLE_ALI1409_LOG;
@@ -161,7 +160,7 @@ ali1409_close(void *priv)
}
static void *
ali1409_init(const device_t *info)
ali1409_init(UNUSED(const device_t *info))
{
ali1409_t *dev = (ali1409_t *) calloc(1, sizeof(ali1409_t));
@@ -172,7 +171,7 @@ ali1409_init(const device_t *info)
23h Data Port
*/
ali1409_log ("Bus speed: %i",cpu_busspeed);
ali1409_log ("Bus speed: %i", cpu_busspeed);
io_sethandler(0x0022, 0x0002, ali1409_read, NULL, NULL, ali1409_write, NULL, NULL, dev);

View File

@@ -115,7 +115,7 @@ sis_5513_apc_reset(sis_5513_pci_to_isa_t *dev)
}
static void
sis_5513_apc_write(uint16_t addr, uint8_t val, void *priv)
sis_5513_apc_write(UNUSED(uint16_t addr), uint8_t val, void *priv)
{
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv;
uint8_t nvr_index = nvr_get_index(dev->nvr, 0);
@@ -135,7 +135,7 @@ sis_5513_apc_write(uint16_t addr, uint8_t val, void *priv)
}
static uint8_t
sis_5513_apc_read(uint16_t addr, void *priv)
sis_5513_apc_read(UNUSED(uint16_t addr), void *priv)
{
sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv;
uint8_t nvr_index = nvr_get_index(dev->nvr, 0);

View File

@@ -119,7 +119,7 @@ sis_5595_pmu_trap_io_mask(int size, uint16_t addr, uint8_t write, uint8_t val, v
}
static void
sis_5595_pmu_trap_io_ide_bm(int size, uint16_t addr, uint8_t write, uint8_t val, void *priv)
sis_5595_pmu_trap_io_ide_bm(UNUSED(int size), UNUSED(uint16_t addr), UNUSED(uint8_t write), UNUSED(uint8_t val), void *priv)
{
sis_5595_pmu_io_trap_t *trap = (sis_5595_pmu_io_trap_t *) priv;
sis_5595_pmu_t *dev = (sis_5595_pmu_t *) trap->priv;

View File

@@ -38,6 +38,7 @@
#include <86box/smram.h>
#include <86box/chipset.h>
#include <86box/plat_unused.h>
#ifdef ENABLE_UMC_8890_LOG
int umc_8890_do_log = ENABLE_UMC_8890_LOG;
@@ -209,7 +210,7 @@ umc_8890_close(void *priv)
static void *
umc_8890_init(const device_t *info)
umc_8890_init(UNUSED(const device_t *info))
{
umc_8890_t *dev = (umc_8890_t *) calloc(1, sizeof(umc_8890_t));

View File

@@ -37,6 +37,7 @@
#include <86box/port_92.h>
#include <86box/serial.h>
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>
#include <86box/chipset.h>
/* Lock/Unlock Procedures */
@@ -879,7 +880,7 @@ wd76c10_reset(void *priv)
static void *
wd76c10_init(const device_t *info)
wd76c10_init(UNUSED(const device_t *info))
{
wd76c10_t *dev = (wd76c10_t *) calloc(1, sizeof(wd76c10_t));
uint32_t total_mem = mem_size << 10;

View File

@@ -1,5 +1,5 @@
static uint32_t
ropINC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropINC_rw(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -22,7 +22,7 @@ ropINC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropINC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropINC_rl(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -45,7 +45,7 @@ ropINC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropDEC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropDEC_rw(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -68,7 +68,7 @@ ropDEC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropDEC_rl(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -93,7 +93,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
#define ROP_ARITH_RMW(name, op, writeback) \
static uint32_t \
rop##name##_b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_b_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -129,7 +129,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_w_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -165,7 +165,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1; \
} \
static uint32_t \
rop##name##_l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_l_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -203,7 +203,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
#define ROP_ARITH_RM(name, op, writeback) \
static uint32_t \
rop##name##_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_b_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -233,7 +233,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_w_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -263,7 +263,7 @@ ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1; \
} \
static uint32_t \
rop##name##_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_l_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -299,7 +299,7 @@ ROP_ARITH_RM(ADD, ADD, 1)
ROP_ARITH_RM(SUB, SUB, 1)
static uint32_t
ropCMP_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_b_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -326,7 +326,7 @@ ropCMP_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + 1;
}
static uint32_t
ropCMP_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_w_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -353,7 +353,7 @@ ropCMP_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + 1;
}
static uint32_t
ropCMP_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_l_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -381,7 +381,7 @@ ropCMP_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
}
static uint32_t
ropCMP_b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_b_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -408,7 +408,7 @@ ropCMP_b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropCMP_w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_w_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -435,7 +435,7 @@ ropCMP_w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropCMP_l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_l_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -463,7 +463,7 @@ ropCMP_l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropADD_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropADD_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -478,7 +478,7 @@ ropADD_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropADD_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropADD_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -493,7 +493,7 @@ ropADD_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropADD_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropADD_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -510,7 +510,7 @@ ropADD_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
ropCMP_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -525,7 +525,7 @@ ropCMP_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropCMP_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -540,7 +540,7 @@ ropCMP_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropCMP_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCMP_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -557,7 +557,7 @@ ropCMP_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
ropSUB_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropSUB_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -572,7 +572,7 @@ ropSUB_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropSUB_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropSUB_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -587,7 +587,7 @@ ropSUB_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropSUB_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropSUB_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -604,7 +604,7 @@ ropSUB_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
rop80(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
rop80(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
uint32_t imm;
@@ -679,7 +679,7 @@ rop80(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblo
}
static uint32_t
rop81_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
rop81_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
uint32_t imm;
@@ -753,7 +753,7 @@ rop81_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 3;
}
static uint32_t
rop81_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
rop81_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
uint32_t imm;
@@ -827,7 +827,7 @@ rop81_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
rop83_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
rop83_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
uint32_t imm;
@@ -904,7 +904,7 @@ rop83_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 2;
}
static uint32_t
rop83_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
rop83_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
uint32_t imm;

View File

@@ -1,5 +1,5 @@
static uint32_t
ropFXCH(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFXCH(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
@@ -9,7 +9,7 @@ ropFXCH(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
ropFLD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFLD(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
@@ -19,7 +19,7 @@ ropFLD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codebl
}
static uint32_t
ropFST(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFST(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
@@ -28,7 +28,7 @@ ropFST(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codebl
return op_pc;
}
static uint32_t
ropFSTP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSTP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
@@ -39,7 +39,7 @@ ropFSTP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
ropFLDs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFLDs(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -57,7 +57,7 @@ ropFLDs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 1;
}
static uint32_t
ropFLDd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFLDd(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -76,7 +76,7 @@ ropFLDd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
ropFILDw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFILDw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -94,7 +94,7 @@ ropFILDw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc + 1;
}
static uint32_t
ropFILDl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFILDl(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -112,7 +112,7 @@ ropFILDl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc + 1;
}
static uint32_t
ropFILDq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFILDq(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -133,7 +133,7 @@ ropFILDq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
}
static uint32_t
ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSTs(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;
@@ -153,7 +153,7 @@ ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 1;
}
static uint32_t
ropFSTd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSTd(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg1;
@@ -194,24 +194,28 @@ ropFSTPd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return new_pc;
}
#define ropFarith(name, size, load, op) \
static uint32_t \
ropF##name##size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
x86seg *target_seg; \
\
FP_ENTER(); \
op_pc--; \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
load(target_seg); \
\
op(FPU_##name); \
\
return op_pc + 1; \
#define ropFarith(name, size, load, op) \
static uint32_t \
ropF##name##size(UNUSED(uint8_t opcode), \
uint32_t fetchdat, \
uint32_t op_32, \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
x86seg *target_seg; \
\
FP_ENTER(); \
op_pc--; \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
load(target_seg); \
\
op(FPU_##name); \
\
return op_pc + 1; \
}
ropFarith(ADD, s, MEM_LOAD_ADDR_EA_L, FP_OP_S);
@@ -239,32 +243,40 @@ ropFarith(MUL, il, MEM_LOAD_ADDR_EA_L, FP_OP_IL);
ropFarith(SUB, il, MEM_LOAD_ADDR_EA_L, FP_OP_IL);
ropFarith(SUBR, il, MEM_LOAD_ADDR_EA_L, FP_OP_IL);
#define ropFcompare(name, size, load, op) \
static uint32_t \
ropF##name##size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
x86seg *target_seg; \
\
FP_ENTER(); \
op_pc--; \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
load(target_seg); \
\
op(); \
\
return op_pc + 1; \
} \
static uint32_t ropF##name##P##size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
uint32_t new_pc = ropF##name##size(opcode, fetchdat, op_32, op_pc, block); \
\
FP_POP(); \
\
return new_pc; \
#define ropFcompare(name, size, load, op) \
static uint32_t \
ropF##name##size(UNUSED(uint8_t opcode), \
uint32_t fetchdat, \
uint32_t op_32, \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
x86seg *target_seg; \
\
FP_ENTER(); \
op_pc--; \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
load(target_seg); \
\
op(); \
\
return op_pc + 1; \
} \
static uint32_t ropF##name##P##size(uint8_t opcode, \
uint32_t fetchdat, \
uint32_t op_32, \
uint32_t op_pc, \
codeblock_t *block) \
{ \
uint32_t new_pc = ropF##name##size(opcode, fetchdat, op_32, op_pc, block); \
\
FP_POP(); \
\
return new_pc; \
}
ropFcompare(COM, s, MEM_LOAD_ADDR_EA_L, FP_COMPARE_S);
@@ -348,7 +360,7 @@ ropFSUBs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
#endif
static uint32_t
ropFADD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFADD(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_ADD, 0, opcode & 7);
@@ -356,7 +368,7 @@ ropFADD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
static uint32_t
ropFCOM(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFCOM(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_COMPARE_REG(0, opcode & 7);
@@ -364,7 +376,7 @@ ropFCOM(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
static uint32_t
ropFDIV(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIV(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIV, 0, opcode & 7);
@@ -372,7 +384,7 @@ ropFDIV(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
static uint32_t
ropFDIVR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIVR(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIVR, 0, opcode & 7);
@@ -380,7 +392,7 @@ ropFDIVR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFMUL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFMUL(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_MUL, 0, opcode & 7);
@@ -388,7 +400,7 @@ ropFMUL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
static uint32_t
ropFSUB(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUB(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUB, 0, opcode & 7);
@@ -396,7 +408,7 @@ ropFSUB(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
static uint32_t
ropFSUBR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUBR(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUBR, 0, opcode & 7);
@@ -405,7 +417,7 @@ ropFSUBR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
}
static uint32_t
ropFADDr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFADDr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_ADD, opcode & 7, 0);
@@ -413,7 +425,7 @@ ropFADDr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFDIVr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIVr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIV, opcode & 7, 0);
@@ -421,7 +433,7 @@ ropFDIVr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFDIVRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIVRr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIVR, opcode & 7, 0);
@@ -429,7 +441,7 @@ ropFDIVRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropFMULr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFMULr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_MUL, opcode & 7, 0);
@@ -437,7 +449,7 @@ ropFMULr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFSUBr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUBr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUB, opcode & 7, 0);
@@ -445,7 +457,7 @@ ropFSUBr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFSUBRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUBRr(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUBR, opcode & 7, 0);
@@ -454,7 +466,7 @@ ropFSUBRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropFADDP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFADDP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_ADD, opcode & 7, 0);
@@ -463,7 +475,7 @@ ropFADDP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFCOMP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFCOMP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_COMPARE_REG(0, opcode & 7);
@@ -472,7 +484,7 @@ ropFCOMP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFDIVP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIVP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIV, opcode & 7, 0);
@@ -481,7 +493,7 @@ ropFDIVP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFDIVRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFDIVRP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_DIVR, opcode & 7, 0);
@@ -490,7 +502,7 @@ ropFDIVRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropFMULP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFMULP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_MUL, opcode & 7, 0);
@@ -499,7 +511,7 @@ ropFMULP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFSUBP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUBP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUB, opcode & 7, 0);
@@ -508,7 +520,7 @@ ropFSUBP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc;
}
static uint32_t
ropFSUBRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSUBRP(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_OP_REG(FPU_SUBR, opcode & 7, 0);
@@ -518,7 +530,7 @@ ropFSUBRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropFCOMPP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFCOMPP(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_COMPARE_REG(0, 1);
@@ -528,7 +540,7 @@ ropFCOMPP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropFSTSW_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSTSW_AX(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -540,7 +552,7 @@ ropFSTSW_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
}
static uint32_t
ropFISTw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFISTw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;
@@ -560,7 +572,7 @@ ropFISTw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc + 1;
}
static uint32_t
ropFISTl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFISTl(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;
@@ -599,7 +611,7 @@ ropFISTPl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return new_pc;
}
static uint32_t
ropFISTPq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFISTPq(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg1;
@@ -623,7 +635,7 @@ ropFISTPq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropFLDCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFLDCW(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
@@ -640,7 +652,7 @@ ropFLDCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc + 1;
}
static uint32_t
ropFSTCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFSTCW(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
x86seg *target_seg;
@@ -658,7 +670,7 @@ ropFSTCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
}
static uint32_t
ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFCHS(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_FCHS();
@@ -666,17 +678,21 @@ ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc;
}
#define opFLDimm(name, v) \
static uint32_t \
ropFLD##name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
static double fp_imm = v; \
static uint64_t *fptr = (uint64_t *) &fp_imm; \
\
FP_ENTER(); \
FP_LOAD_IMM_Q(*fptr); \
\
return op_pc; \
#define opFLDimm(name, v) \
static uint32_t \
ropFLD##name(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
static double fp_imm = v; \
static uint64_t *fptr = (uint64_t *) &fp_imm; \
\
FP_ENTER(); \
FP_LOAD_IMM_Q(*fptr); \
\
return op_pc; \
}
// clang-format off
@@ -689,7 +705,7 @@ opFLDimm(Z, 0.0)
// clang-format on
static uint32_t
ropFLDLN2(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
ropFLDLN2(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
FP_ENTER();
FP_LOAD_IMM_Q(0x3fe62e42fefa39f0ULL);

View File

@@ -1,5 +1,5 @@
static uint32_t
ropJMP_r8(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropJMP_r8(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t offset = fetchdat & 0xff;
@@ -12,7 +12,7 @@ ropJMP_r8(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropJMP_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropJMP_r16(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint16_t offset = fetchdat & 0xffff;
@@ -22,7 +22,7 @@ ropJMP_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropJMP_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropJMP_r32(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t offset = fastreadl(cs + op_pc);
@@ -32,7 +32,7 @@ ropJMP_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropJCXZ(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropJCXZ(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t offset = fetchdat & 0xff;
@@ -51,7 +51,7 @@ ropJCXZ(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
ropLOOP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropLOOP(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t offset = fetchdat & 0xff;
@@ -214,45 +214,51 @@ BRANCH_COND_S(int pc_offset, uint32_t op_pc, uint32_t offset, int not )
}
}
#define ropBRANCH(name, func, not ) \
static uint32_t \
rop##name(uint8_t opcode, uint32_t fetchdat, \
uint32_t op_32, uint32_t op_pc, \
codeblock_t *block) \
{ \
uint32_t offset = fetchdat & 0xff; \
\
if (offset & 0x80) \
offset |= 0xffffff00; \
\
func(1, op_pc, offset, not ); \
\
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w(uint8_t opcode, \
uint32_t fetchdat, uint32_t op_32, \
uint32_t op_pc, codeblock_t *block) \
{ \
uint32_t offset = fetchdat & 0xffff; \
\
if (offset & 0x8000) \
offset |= 0xffff0000; \
\
func(2, op_pc, offset, not ); \
\
return op_pc + 2; \
} \
static uint32_t \
rop##name##_l(uint8_t opcode, \
uint32_t fetchdat, uint32_t op_32, \
uint32_t op_pc, codeblock_t *block) \
{ \
uint32_t offset = fastreadl(cs + op_pc); \
\
func(4, op_pc, offset, not ); \
\
return op_pc + 4; \
#define ropBRANCH(name, func, not ) \
static uint32_t \
rop##name(UNUSED(uint8_t opcode), \
uint32_t fetchdat, \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
uint32_t offset = fetchdat & 0xff; \
\
if (offset & 0x80) \
offset |= 0xffffff00; \
\
func(1, op_pc, offset, not ); \
\
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w(UNUSED(uint8_t opcode), \
uint32_t fetchdat, \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
uint32_t offset = fetchdat & 0xffff; \
\
if (offset & 0x8000) \
offset |= 0xffff0000; \
\
func(2, op_pc, offset, not ); \
\
return op_pc + 2; \
} \
static uint32_t \
rop##name##_l(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
uint32_t offset = fastreadl(cs + op_pc); \
\
func(4, op_pc, offset, not ); \
\
return op_pc + 4; \
}
// clang-format off

View File

@@ -1,6 +1,6 @@
#define ROP_LOGIC(name, op, writeback) \
static uint32_t \
rop##name##_b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_b_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -33,7 +33,7 @@
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_w_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -66,7 +66,7 @@
return op_pc + 1; \
} \
static uint32_t \
rop##name##_l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_l_rmw(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -99,7 +99,7 @@
return op_pc + 1; \
} \
static uint32_t \
rop##name##_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_b_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -126,7 +126,7 @@
return op_pc + 1; \
} \
static uint32_t \
rop##name##_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_w_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -153,7 +153,7 @@
return op_pc + 1; \
} \
static uint32_t \
rop##name##_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
rop##name##_l_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int src_reg; \
int dst_reg; \
@@ -185,7 +185,7 @@ ROP_LOGIC(OR, OR, 1)
ROP_LOGIC(XOR, XOR, 1)
static uint32_t
ropTEST_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_b_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -209,7 +209,7 @@ ropTEST_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropTEST_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_w_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -233,7 +233,7 @@ ropTEST_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropTEST_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_l_rm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -258,7 +258,7 @@ ropTEST_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropAND_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropAND_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -270,7 +270,7 @@ ropAND_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropAND_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropAND_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -282,7 +282,7 @@ ropAND_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropAND_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropAND_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -296,7 +296,7 @@ ropAND_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
ropOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropOR_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -308,7 +308,7 @@ ropOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropOR_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -320,7 +320,7 @@ ropOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropOR_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -334,7 +334,7 @@ ropOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropTEST_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -346,7 +346,7 @@ ropTEST_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
return op_pc + 1;
}
static uint32_t
ropTEST_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -358,7 +358,7 @@ ropTEST_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
return op_pc + 2;
}
static uint32_t
ropTEST_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropTEST_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -372,7 +372,7 @@ ropTEST_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_p
}
static uint32_t
ropXOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropXOR_AL_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B(REG_AL);
@@ -384,7 +384,7 @@ ropXOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropXOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropXOR_AX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W(REG_AX);
@@ -396,7 +396,7 @@ ropXOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropXOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropXOR_EAX_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_L(REG_EAX);
@@ -410,7 +410,7 @@ ropXOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
ropF6(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropF6(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;
@@ -458,7 +458,7 @@ ropF6(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblo
return 0;
}
static uint32_t
ropF7_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropF7_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;
@@ -506,7 +506,7 @@ ropF7_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return 0;
}
static uint32_t
ropF7_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropF7_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg;
int host_reg;

View File

@@ -1,24 +1,24 @@
static uint32_t
ropNOP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropNOP(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
return op_pc;
}
static uint32_t
ropCLD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCLD(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
CLEAR_BITS((uintptr_t) &cpu_state.flags, D_FLAG);
return op_pc;
}
static uint32_t
ropSTD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropSTD(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
SET_BITS((uintptr_t) &cpu_state.flags, D_FLAG);
return op_pc;
}
static uint32_t
ropCLI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCLI(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI)))
return 0;
@@ -29,7 +29,7 @@ ropCLI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codebl
return op_pc;
}
static uint32_t
ropSTI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropSTI(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI)))
return 0;
@@ -38,7 +38,7 @@ ropSTI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codebl
}
static uint32_t
ropFE(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFE(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int host_reg;
@@ -88,7 +88,7 @@ ropFE(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblo
}
static uint32_t codegen_temp;
static uint32_t
ropFF_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFF_16(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int host_reg;
@@ -175,7 +175,7 @@ ropFF_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return 0;
}
static uint32_t
ropFF_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropFF_32(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int host_reg;

View File

@@ -1,5 +1,5 @@
static uint32_t
ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVQ_q_mm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg1;
int host_reg2 = 0;
@@ -25,7 +25,7 @@ ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOVQ_mm_q(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVQ_mm_q(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
MMX_ENTER();
@@ -50,7 +50,7 @@ ropMOVQ_mm_q(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOVD_l_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVD_l_mm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -74,7 +74,7 @@ ropMOVD_l_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOVD_mm_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVD_mm_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
MMX_ENTER();
@@ -95,36 +95,40 @@ ropMOVD_mm_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
#define MMX_OP(name, func) \
static uint32_t \
name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
int src_reg1; \
int src_reg2; \
int xmm_src; \
int xmm_dst; \
\
MMX_ENTER(); \
\
if ((fetchdat & 0xc0) == 0xc0) { \
xmm_src = LOAD_MMX_Q_MMX(fetchdat & 7); \
} else { \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
\
MEM_LOAD_ADDR_EA_Q(target_seg); \
src_reg1 = LOAD_Q_REG_1; \
src_reg2 = LOAD_Q_REG_2; \
xmm_src = LOAD_INT_TO_MMX(src_reg1, src_reg2); \
} \
xmm_dst = LOAD_MMX_Q_MMX((fetchdat >> 3) & 7); \
func(xmm_dst, xmm_src); \
STORE_MMX_Q_MMX((fetchdat >> 3) & 7, xmm_dst); \
\
return op_pc + 1; \
#define MMX_OP(name, func) \
static uint32_t \
name(UNUSED(uint8_t opcode), \
uint32_t fetchdat, \
uint32_t op_32, \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
int src_reg1; \
int src_reg2; \
int xmm_src; \
int xmm_dst; \
\
MMX_ENTER(); \
\
if ((fetchdat & 0xc0) == 0xc0) { \
xmm_src = LOAD_MMX_Q_MMX(fetchdat & 7); \
} else { \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
\
CHECK_SEG_READ(target_seg); \
\
MEM_LOAD_ADDR_EA_Q(target_seg); \
src_reg1 = LOAD_Q_REG_1; \
src_reg2 = LOAD_Q_REG_2; \
xmm_src = LOAD_INT_TO_MMX(src_reg1, src_reg2); \
} \
xmm_dst = LOAD_MMX_Q_MMX((fetchdat >> 3) & 7); \
func(xmm_dst, xmm_src); \
STORE_MMX_Q_MMX((fetchdat >> 3) & 7, xmm_dst); \
\
return op_pc + 1; \
}
MMX_OP(ropPAND, MMX_AND)
@@ -179,7 +183,7 @@ MMX_OP(ropPMULHW, MMX_PMULHW);
MMX_OP(ropPMADDWD, MMX_PMADDWD);
static uint32_t
ropPSxxW_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPSxxW_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int xmm_dst;
@@ -207,7 +211,7 @@ ropPSxxW_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropPSxxD_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPSxxD_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int xmm_dst;
@@ -235,7 +239,7 @@ ropPSxxD_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropPSxxQ_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPSxxQ_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int xmm_dst;
@@ -264,7 +268,7 @@ ropPSxxQ_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropEMMS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropEMMS(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc), UNUSED(codeblock_t *block))
{
codegen_mmx_entered = 0;

View File

@@ -1,19 +1,19 @@
static uint32_t
ropMOV_rb_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_rb_imm(uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
STORE_IMM_REG_B(opcode & 7, fetchdat & 0xff);
return op_pc + 1;
}
static uint32_t
ropMOV_rw_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_rw_imm(uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
STORE_IMM_REG_W(opcode & 7, fetchdat & 0xffff);
return op_pc + 2;
}
static uint32_t
ropMOV_rl_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_rl_imm(uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
fetchdat = fastreadl(cs + op_pc);
@@ -23,7 +23,7 @@ ropMOV_rl_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOV_b_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_b_r(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_B((fetchdat >> 3) & 7);
@@ -44,7 +44,7 @@ ropMOV_b_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
return op_pc + 1;
}
static uint32_t
ropMOV_w_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_w_r(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg = LOAD_REG_W((fetchdat >> 3) & 7);
@@ -66,7 +66,7 @@ ropMOV_w_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropMOV_l_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_l_r(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -90,7 +90,7 @@ ropMOV_l_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropMOV_r_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_r_b(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_B(fetchdat & 7);
@@ -109,7 +109,7 @@ ropMOV_r_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
return op_pc + 1;
}
static uint32_t
ropMOV_r_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_r_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_W(fetchdat & 7);
@@ -128,7 +128,7 @@ ropMOV_r_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
return op_pc + 1;
}
static uint32_t
ropMOV_r_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_r_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_L(fetchdat & 7);
@@ -148,7 +148,7 @@ ropMOV_r_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropMOV_b_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_b_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
STORE_IMM_REG_B(fetchdat & 7, (fetchdat >> 8) & 0xff);
@@ -167,7 +167,7 @@ ropMOV_b_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 2;
}
static uint32_t
ropMOV_w_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_w_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
STORE_IMM_REG_W(fetchdat & 7, (fetchdat >> 8) & 0xffff);
@@ -186,7 +186,7 @@ ropMOV_w_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 3;
}
static uint32_t
ropMOV_l_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_l_imm(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
uint32_t imm = fastreadl(cs + op_pc + 1);
@@ -208,7 +208,7 @@ ropMOV_l_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOV_AL_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_AL_a(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
@@ -226,7 +226,7 @@ ropMOV_AL_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
static uint32_t
ropMOV_AX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_AX_a(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
@@ -244,7 +244,7 @@ ropMOV_AX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
static uint32_t
ropMOV_EAX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_EAX_a(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
@@ -263,7 +263,7 @@ ropMOV_EAX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOV_a_AL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_a_AL(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
int host_reg;
@@ -284,7 +284,7 @@ ropMOV_a_AL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
static uint32_t
ropMOV_a_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_a_AX(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
int host_reg;
@@ -305,7 +305,7 @@ ropMOV_a_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
static uint32_t
ropMOV_a_EAX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_a_EAX(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t addr;
int host_reg;
@@ -327,7 +327,7 @@ ropMOV_a_EAX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropLEA_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropLEA_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int dest_reg = (fetchdat >> 3) & 7;
@@ -341,7 +341,7 @@ ropLEA_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
return op_pc + 1;
}
static uint32_t
ropLEA_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropLEA_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int dest_reg = (fetchdat >> 3) & 7;
@@ -356,7 +356,7 @@ ropLEA_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, code
}
static uint32_t
ropMOVZX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVZX_w_b(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_B(fetchdat & 7);
@@ -377,7 +377,7 @@ ropMOVZX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOVZX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVZX_l_b(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_B(fetchdat & 7);
@@ -398,7 +398,7 @@ ropMOVZX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOVZX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVZX_l_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_W(fetchdat & 7);
@@ -420,7 +420,7 @@ ropMOVZX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOVSX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVSX_w_b(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_B(fetchdat & 7);
@@ -441,7 +441,7 @@ ropMOVSX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOVSX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVSX_l_b(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_B(fetchdat & 7);
@@ -462,7 +462,7 @@ ropMOVSX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOVSX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOVSX_l_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
if ((fetchdat & 0xc0) == 0xc0) {
int host_reg = LOAD_REG_W(fetchdat & 7);
@@ -484,7 +484,7 @@ ropMOVSX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropMOV_w_seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_w_seg(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -531,7 +531,7 @@ ropMOV_w_seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return op_pc + 1;
}
static uint32_t
ropMOV_seg_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropMOV_seg_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -578,7 +578,7 @@ ropMOV_seg_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
#define ropLseg(seg, rseg) \
static uint32_t ropL##seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropL##seg(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block)) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
x86seg *target_seg; \

View File

@@ -43,7 +43,7 @@
}
static uint32_t
ropC0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropC0(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count;
@@ -57,7 +57,7 @@ ropC0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblo
return op_pc + 2;
}
static uint32_t
ropC1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropC1_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count;
@@ -71,7 +71,7 @@ ropC1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 2;
}
static uint32_t
ropC1_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropC1_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count;
@@ -86,7 +86,7 @@ ropC1_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
}
static uint32_t
ropD0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropD0(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count = 1;
@@ -100,7 +100,7 @@ ropD0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblo
return op_pc + 1;
}
static uint32_t
ropD1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropD1_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count = 1;
@@ -114,7 +114,7 @@ ropD1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
return op_pc + 1;
}
static uint32_t
ropD1_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropD1_l(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, UNUSED(codeblock_t *block))
{
x86seg *target_seg = NULL;
int count = 1;

View File

@@ -1,5 +1,5 @@
static uint32_t
ropPUSH_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_16(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -12,7 +12,7 @@ ropPUSH_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
return op_pc;
}
static uint32_t
ropPUSH_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_32(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -26,7 +26,7 @@ ropPUSH_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, co
}
static uint32_t
ropPUSH_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_imm_16(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint16_t imm = fetchdat & 0xffff;
int host_reg;
@@ -40,7 +40,7 @@ ropPUSH_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
return op_pc + 2;
}
static uint32_t
ropPUSH_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_imm_32(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t imm = fastreadl(cs + op_pc);
int host_reg;
@@ -55,7 +55,7 @@ ropPUSH_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc
}
static uint32_t
ropPUSH_imm_b16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_imm_b16(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint16_t imm = fetchdat & 0xff;
int host_reg;
@@ -72,7 +72,7 @@ ropPUSH_imm_b16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_p
return op_pc + 1;
}
static uint32_t
ropPUSH_imm_b32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPUSH_imm_b32(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t imm = fetchdat & 0xff;
int host_reg;
@@ -90,7 +90,7 @@ ropPUSH_imm_b32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_p
}
static uint32_t
ropPOP_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPOP_16(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc);
LOAD_STACK_TO_EA(0);
@@ -101,7 +101,7 @@ ropPOP_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc;
}
static uint32_t
ropPOP_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropPOP_32(uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc);
LOAD_STACK_TO_EA(0);
@@ -113,7 +113,7 @@ ropPOP_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropRET_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropRET_16(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc), UNUSED(codeblock_t *block))
{
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc);
LOAD_STACK_TO_EA(0);
@@ -124,7 +124,7 @@ ropRET_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return -1;
}
static uint32_t
ropRET_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropRET_32(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc), UNUSED(codeblock_t *block))
{
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc);
LOAD_STACK_TO_EA(0);
@@ -136,7 +136,7 @@ ropRET_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
}
static uint32_t
ropRET_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropRET_imm_16(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc), UNUSED(codeblock_t *block))
{
uint16_t offset = fetchdat & 0xffff;
@@ -149,7 +149,7 @@ ropRET_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
return -1;
}
static uint32_t
ropRET_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropRET_imm_32(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc), UNUSED(codeblock_t *block))
{
uint16_t offset = fetchdat & 0xffff;
@@ -163,7 +163,7 @@ ropRET_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc,
}
static uint32_t
ropCALL_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCALL_r16(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint16_t offset = fetchdat & 0xffff;
int host_reg;
@@ -178,7 +178,7 @@ ropCALL_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return -1;
}
static uint32_t
ropCALL_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropCALL_r32(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
uint32_t offset = fastreadl(cs + op_pc);
int host_reg;
@@ -194,7 +194,7 @@ ropCALL_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
}
static uint32_t
ropLEAVE_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropLEAVE_16(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -209,7 +209,7 @@ ropLEAVE_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc;
}
static uint32_t
ropLEAVE_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropLEAVE_32(UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int host_reg;
@@ -224,32 +224,40 @@ ropLEAVE_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, c
return op_pc;
}
#define ROP_PUSH_SEG(seg) \
static uint32_t \
ropPUSH_##seg##_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
int host_reg; \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(-2); \
host_reg = LOAD_VAR_W((uintptr_t) &seg); \
MEM_STORE_ADDR_EA_W(&cpu_state.seg_ss, host_reg); \
SP_MODIFY(-2); \
\
return op_pc; \
} \
static uint32_t \
ropPUSH_##seg##_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
int host_reg; \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(-4); \
host_reg = LOAD_VAR_W((uintptr_t) &seg); \
MEM_STORE_ADDR_EA_L(&cpu_state.seg_ss, host_reg); \
SP_MODIFY(-4); \
\
return op_pc; \
#define ROP_PUSH_SEG(seg) \
static uint32_t \
ropPUSH_##seg##_16(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
int host_reg; \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(-2); \
host_reg = LOAD_VAR_W((uintptr_t) &seg); \
MEM_STORE_ADDR_EA_W(&cpu_state.seg_ss, host_reg); \
SP_MODIFY(-2); \
\
return op_pc; \
} \
static uint32_t \
ropPUSH_##seg##_32(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
int host_reg; \
\
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(-4); \
host_reg = LOAD_VAR_W((uintptr_t) &seg); \
MEM_STORE_ADDR_EA_L(&cpu_state.seg_ss, host_reg); \
SP_MODIFY(-4); \
\
return op_pc; \
}
ROP_PUSH_SEG(CS)
@@ -259,28 +267,36 @@ ROP_PUSH_SEG(FS)
ROP_PUSH_SEG(GS)
ROP_PUSH_SEG(SS)
#define ROP_POP_SEG(seg, rseg) \
static uint32_t \
ropPOP_##seg##_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(0); \
MEM_LOAD_ADDR_EA_W(&cpu_state.seg_ss); \
LOAD_SEG(0, &rseg); \
SP_MODIFY(2); \
\
return op_pc; \
} \
static uint32_t \
ropPOP_##seg##_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(0); \
MEM_LOAD_ADDR_EA_W(&cpu_state.seg_ss); \
LOAD_SEG(0, &rseg); \
SP_MODIFY(4); \
\
return op_pc; \
#define ROP_POP_SEG(seg, rseg) \
static uint32_t \
ropPOP_##seg##_16(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(0); \
MEM_LOAD_ADDR_EA_W(&cpu_state.seg_ss); \
LOAD_SEG(0, &rseg); \
SP_MODIFY(2); \
\
return op_pc; \
} \
static uint32_t \
ropPOP_##seg##_32(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
STORE_IMM_ADDR_L((uintptr_t) &cpu_state.oldpc, op_old_pc); \
LOAD_STACK_TO_EA(0); \
MEM_LOAD_ADDR_EA_W(&cpu_state.seg_ss); \
LOAD_SEG(0, &rseg); \
SP_MODIFY(4); \
\
return op_pc; \
}
ROP_POP_SEG(DS, cpu_state.seg_ds)

View File

@@ -55,7 +55,7 @@ call_long(uintptr_t func)
}
static __inline void
load_param_1_32(codeblock_t *block, uint32_t param)
load_param_1_32(UNUSED(codeblock_t *block), uint32_t param)
{
#if _WIN64
addbyte(0xb9); /*MOVL $fetchdat,%ecx*/
@@ -93,7 +93,7 @@ static __inline void load_param_1_64(codeblock_t *block, uint64_t param)
#endif
static __inline void
load_param_2_32(codeblock_t *block, uint32_t param)
load_param_2_32(UNUSED(codeblock_t *block), uint32_t param)
{
#if _WIN64
addbyte(0xba); /*MOVL $fetchdat,%edx*/
@@ -118,7 +118,7 @@ load_param_2_reg_32(int reg)
#endif
}
static __inline void
load_param_2_64(codeblock_t *block, uint64_t param)
load_param_2_64(UNUSED(codeblock_t *block), uint64_t param)
{
addbyte(0x48);
#if _WIN64
@@ -1492,7 +1492,7 @@ MEM_STORE_ADDR_EA_L(x86seg *seg, int host_reg)
/*done:*/
}
static __inline void
MEM_STORE_ADDR_EA_Q(x86seg *seg, int host_reg, int host_reg2)
MEM_STORE_ADDR_EA_Q(x86seg *seg, int host_reg, UNUSED(int host_reg2))
{
if ((seg == &cpu_state.seg_ds && codegen_flat_ds && !(cpu_cur_status & CPU_STATUS_NOTFLATDS)) || (seg == &cpu_state.seg_ss && codegen_flat_ss && !(cpu_cur_status & CPU_STATUS_NOTFLATSS))) {
addbyte(0x31); /*XOR ECX, ECX*/
@@ -3926,7 +3926,7 @@ FP_LOAD_REG(int reg)
return REG_EBX;
}
static __inline void
FP_LOAD_REG_D(int reg, int *host_reg1, int *host_reg2)
FP_LOAD_REG_D(int reg, int *host_reg1, UNUSED(int *host_reg2))
{
addbyte(0x8b); /*MOV EBX, TOP*/
addbyte(0x5d);
@@ -4086,7 +4086,7 @@ FP_LOAD_REG_INT(int reg)
return REG_EBX;
}
static __inline void
FP_LOAD_REG_INT_Q(int reg, int *host_reg1, int *host_reg2)
FP_LOAD_REG_INT_Q(int reg, int *host_reg1, UNUSED(int *host_reg2))
{
addbyte(0x89); /*MOV EBX, EAX*/
addbyte(0xc3);
@@ -4693,7 +4693,7 @@ LOAD_MMX_D(int guest_reg)
return host_reg;
}
static __inline void
LOAD_MMX_Q(int guest_reg, int *host_reg1, int *host_reg2)
LOAD_MMX_Q(int guest_reg, int *host_reg1, UNUSED(int *host_reg2))
{
int host_reg = REG_EBX;
@@ -4725,7 +4725,7 @@ LOAD_MMX_Q_MMX(int guest_reg)
}
static __inline int
LOAD_INT_TO_MMX(int src_reg1, int src_reg2)
LOAD_INT_TO_MMX(int src_reg1, UNUSED(int src_reg2))
{
int dst_reg = find_host_xmm_reg();
host_reg_xmm_mapping[dst_reg] = 100;
@@ -4758,7 +4758,7 @@ STORE_MMX_LQ(int guest_reg, int host_reg1)
addbyte((uint8_t) cpu_state_offset(MM[guest_reg].l[0]));
}
static __inline void
STORE_MMX_Q(int guest_reg, int host_reg1, int host_reg2)
STORE_MMX_Q(int guest_reg, int host_reg1, UNUSED(int host_reg2))
{
if (host_reg1 & 8)
addbyte(0x4c);

View File

@@ -1,16 +1,20 @@
#define OP_XCHG_AX_(reg) \
static uint32_t \
ropXCHG_AX_##reg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
int ax_reg, host_reg, temp_reg; \
\
ax_reg = LOAD_REG_W(REG_AX); \
host_reg = LOAD_REG_W(REG_##reg); \
temp_reg = COPY_REG(host_reg); \
STORE_REG_TARGET_W_RELEASE(ax_reg, REG_##reg); \
STORE_REG_TARGET_W_RELEASE(temp_reg, REG_AX); \
\
return op_pc; \
#define OP_XCHG_AX_(reg) \
static uint32_t \
ropXCHG_AX_##reg(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
int ax_reg, host_reg, temp_reg; \
\
ax_reg = LOAD_REG_W(REG_AX); \
host_reg = LOAD_REG_W(REG_##reg); \
temp_reg = COPY_REG(host_reg); \
STORE_REG_TARGET_W_RELEASE(ax_reg, REG_##reg); \
STORE_REG_TARGET_W_RELEASE(temp_reg, REG_AX); \
\
return op_pc; \
}
OP_XCHG_AX_(BX)
@@ -21,19 +25,23 @@ OP_XCHG_AX_(DI)
OP_XCHG_AX_(SP)
OP_XCHG_AX_(BP)
#define OP_XCHG_EAX_(reg) \
static uint32_t \
ropXCHG_EAX_##reg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
{ \
int eax_reg, host_reg, temp_reg; \
\
eax_reg = LOAD_REG_L(REG_EAX); \
host_reg = LOAD_REG_L(REG_##reg); \
temp_reg = COPY_REG(host_reg); \
STORE_REG_TARGET_L_RELEASE(eax_reg, REG_##reg); \
STORE_REG_TARGET_L_RELEASE(temp_reg, REG_EAX); \
\
return op_pc; \
#define OP_XCHG_EAX_(reg) \
static uint32_t \
ropXCHG_EAX_##reg(UNUSED(uint8_t opcode), \
UNUSED(uint32_t fetchdat), \
UNUSED(uint32_t op_32), \
uint32_t op_pc, \
UNUSED(codeblock_t *block)) \
{ \
int eax_reg, host_reg, temp_reg; \
\
eax_reg = LOAD_REG_L(REG_EAX); \
host_reg = LOAD_REG_L(REG_##reg); \
temp_reg = COPY_REG(host_reg); \
STORE_REG_TARGET_L_RELEASE(eax_reg, REG_##reg); \
STORE_REG_TARGET_L_RELEASE(temp_reg, REG_EAX); \
\
return op_pc; \
}
OP_XCHG_EAX_(EBX)
@@ -45,7 +53,7 @@ OP_XCHG_EAX_(ESP)
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)
ropXCHG_b(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -63,7 +71,7 @@ ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1;
}
static uint32_t
ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropXCHG_w(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;
@@ -81,7 +89,7 @@ ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, cod
return op_pc + 1;
}
static uint32_t
ropXCHG_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ropXCHG_l(UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc, UNUSED(codeblock_t *block))
{
int src_reg;
int dst_reg;

View File

@@ -125,7 +125,7 @@ add_to_block_list(codeblock_t *block)
}
static void
remove_from_block_list(codeblock_t *block, uint32_t pc)
remove_from_block_list(codeblock_t *block, UNUSED(uint32_t pc))
{
if (!block->page_mask)
return;

View File

@@ -2,6 +2,7 @@
#include <86box/86box.h>
#include "cpu.h"
#include <86box/mem.h>
#include <86box/plat_unused.h>
#include "codegen.h"
#include "codegen_allocator.h"

View File

@@ -410,7 +410,7 @@ uop_gen_reg_src1(uint32_t uop_type, ir_data_t *ir, int src_reg_a)
}
static inline void
uop_gen_reg_src1_arg(uint32_t uop_type, ir_data_t *ir, int arg, int src_reg_a)
uop_gen_reg_src1_arg(uint32_t uop_type, ir_data_t *ir, UNUSED(int arg), int src_reg_a)
{
uop_t *uop = uop_alloc(ir, uop_type);

View File

@@ -2,6 +2,7 @@
#include <86box/86box.h>
#include "cpu.h"
#include <86box/mem.h>
#include <86box/plat_unused.h>
#include "codegen.h"
#include "codegen_ir.h"

View File

@@ -17,7 +17,7 @@
#include "codegen_ops_helpers.h"
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
@@ -192,7 +192,7 @@ ropPFRSQRT(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
}
uint32_t
ropPFRSQIT1(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPFRSQIT1(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MMX_ENTER(ir);

View File

@@ -22,7 +22,7 @@ get_cf(ir_data_t *ir, int dest_reg)
}
uint32_t
ropADC_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropADC_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -39,7 +39,7 @@ ropADC_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropADC_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropADC_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -274,7 +274,7 @@ ropADC_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropADD_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropADD_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -289,7 +289,7 @@ ropADD_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropADD_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropADD_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -511,7 +511,7 @@ ropADD_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropCMP_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCMP_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -526,7 +526,7 @@ ropCMP_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropCMP_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCMP_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -734,7 +734,7 @@ ropCMP_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropSBB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSBB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -751,7 +751,7 @@ ropSBB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropSBB_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSBB_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -988,7 +988,7 @@ ropSBB_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropSUB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSUB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -1003,7 +1003,7 @@ ropSUB_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropSUB_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSUB_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -2293,7 +2293,7 @@ rebuild_c(ir_data_t *ir)
}
uint32_t
ropINC_r16(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropINC_r16(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
rebuild_c(ir);
@@ -2307,7 +2307,7 @@ ropINC_r16(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opc
return op_pc;
}
uint32_t
ropINC_r32(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropINC_r32(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
rebuild_c(ir);
@@ -2322,7 +2322,7 @@ ropINC_r32(UNUSED(UNUSED(codeblock_t *block)), ir_data_t *ir, UNUSED(uint8_t opc
}
uint32_t
ropDEC_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropDEC_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
rebuild_c(ir);
@@ -2336,7 +2336,7 @@ ropDEC_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t f
return op_pc;
}
uint32_t
ropDEC_r32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropDEC_r32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
rebuild_c(ir);

View File

@@ -816,7 +816,7 @@ ropJNLE_common(codeblock_t *block, ir_data_t *ir, uint32_t dest_addr, uint32_t n
}
#define ropJ(cond) \
uint32_t ropJ##cond##_8(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropJ##cond##_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc); \
uint32_t dest_addr = op_pc + 1 + offset; \
@@ -829,7 +829,7 @@ ropJNLE_common(codeblock_t *block, ir_data_t *ir, uint32_t dest_addr, uint32_t n
codegen_mark_code_present(block, cs + op_pc, 1); \
return ret ? dest_addr : (op_pc + 1); \
} \
uint32_t ropJ##cond##_16(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropJ##cond##_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uint32_t offset = (int32_t) (int16_t) fastreadw(cs + op_pc); \
uint32_t dest_addr = (op_pc + 2 + offset) & 0xffff; \
@@ -840,7 +840,7 @@ ropJNLE_common(codeblock_t *block, ir_data_t *ir, uint32_t dest_addr, uint32_t n
codegen_mark_code_present(block, cs + op_pc, 2); \
return ret ? dest_addr : (op_pc + 2); \
} \
uint32_t ropJ##cond##_32(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropJ##cond##_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uint32_t offset = fastreadl(cs + op_pc); \
uint32_t dest_addr = op_pc + 4 + offset; \
@@ -852,6 +852,7 @@ ropJNLE_common(codeblock_t *block, ir_data_t *ir, uint32_t dest_addr, uint32_t n
return ret ? dest_addr : (op_pc + 4); \
}
// clang-format off
ropJ(O)
ropJ(NO)
ropJ(B)
@@ -868,9 +869,10 @@ ropJ(L)
ropJ(NL)
ropJ(LE)
ropJ(NLE)
// clang-format on
uint32_t
ropJCXZ(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropJCXZ(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc);
uint32_t dest_addr = op_pc + 1 + offset;
@@ -892,7 +894,7 @@ ropJCXZ(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetc
}
uint32_t
ropLOOP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropLOOP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc);
uint32_t dest_addr = op_pc + 1 + offset;
@@ -932,7 +934,7 @@ ropLOOP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetc
}
uint32_t
ropLOOPE(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropLOOPE(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc);
uint32_t dest_addr = op_pc + 1 + offset;
@@ -965,7 +967,7 @@ ropLOOPE(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
return op_pc + 1;
}
uint32_t
ropLOOPNE(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropLOOPNE(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc);
uint32_t dest_addr = op_pc + 1 + offset;

View File

@@ -79,7 +79,7 @@ ropFCOMP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
return op_pc;
}
uint32_t
ropFCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FCOM(ir, IREG_temp0_W, IREG_ST(0), IREG_ST(1));
@@ -289,7 +289,7 @@ ropFUCOMP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fe
return op_pc;
}
uint32_t
ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FCOM(ir, IREG_temp0_W, IREG_ST(0), IREG_ST(1));
@@ -301,7 +301,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
}
#define ropF_arith_mem(name, load_uop) \
uint32_t ropFADD##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -318,7 +318,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFCOM##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFCOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -329,12 +329,12 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
codegen_check_seg_read(block, ir, target_seg); \
load_uop(ir, IREG_temp0_D, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFCOMP##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFCOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -351,7 +351,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFDIV##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -366,7 +366,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFDIVR##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -381,7 +381,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFMUL##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -396,7 +396,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFSUB##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFSUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -411,7 +411,7 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
\
return op_pc + 1; \
} \
uint32_t ropFSUBR##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFSUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -433,7 +433,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
// clang-format on
#define ropFI_arith_mem(name, temp_reg) \
uint32_t ropFIADD##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFIADD##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -449,7 +449,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
\
return op_pc + 1; \
} \
uint32_t ropFICOM##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFICOM##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -461,12 +461,12 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
\
return op_pc + 1; \
} \
uint32_t ropFICOMP##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFICOMP##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -478,13 +478,13 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
uop_MEM_LOAD_REG(ir, temp_reg, ireg_seg_base(target_seg), IREG_eaaddr); \
uop_MOV_DOUBLE_INT(ir, IREG_temp0_D, temp_reg); \
uop_FCOM(ir, IREG_temp1_W, IREG_ST(0), IREG_temp0_D); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_AND_IMM(ir, IREG_NPXS, IREG_NPXS, ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3)); \
uop_OR(ir, IREG_NPXS, IREG_NPXS, IREG_temp1_W); \
fpu_POP(block, ir); \
\
return op_pc + 1; \
} \
uint32_t ropFIDIV##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFIDIV##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -500,7 +500,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
\
return op_pc + 1; \
} \
uint32_t ropFIDIVR##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFIDIVR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -516,7 +516,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
\
return op_pc + 1; \
} \
uint32_t ropFIMUL##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFIMUL##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -532,7 +532,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
\
return op_pc + 1; \
} \
uint32_t ropFISUB##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFISUB##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -548,7 +548,7 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
\
return op_pc + 1; \
} \
uint32_t ropFISUBR##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropFISUBR##name(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg; \
\
@@ -565,11 +565,13 @@ ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
return op_pc + 1; \
}
// clang-format off
ropFI_arith_mem(l, IREG_temp0)
ropFI_arith_mem(w, IREG_temp0_W)
// clang-format on
uint32_t
ropFABS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFABS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FABS(ir, IREG_ST(0), IREG_ST(0));
@@ -579,7 +581,7 @@ ropFABS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint3
}
uint32_t
ropFCHS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFCHS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FCHS(ir, IREG_ST(0), IREG_ST(0));
@@ -588,7 +590,7 @@ ropFCHS(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint3
return op_pc;
}
uint32_t
ropFSQRT(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFSQRT(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FSQRT(ir, IREG_ST(0), IREG_ST(0));
@@ -597,7 +599,7 @@ ropFSQRT(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint
return op_pc;
}
uint32_t
ropFTST(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFTST(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_FTST(ir, IREG_temp0_W, IREG_ST(0));

View File

@@ -19,7 +19,7 @@
#include "codegen_ops_helpers.h"
uint32_t
ropFLD1(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFLD1(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_MOV_IMM(ir, IREG_temp0, 1);
@@ -30,7 +30,7 @@ ropFLD1(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetc
return op_pc;
}
uint32_t
ropFLDZ(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFLDZ(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_MOV_IMM(ir, IREG_temp0, 0);

View File

@@ -98,7 +98,7 @@ ropFSTSW(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
return op_pc + 1;
}
uint32_t
ropFSTSW_AX(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropFSTSW_AX(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_FP_ENTER(ir);
uop_MOV(ir, IREG_AX, IREG_NPXS);

View File

@@ -71,7 +71,7 @@ fpu_PUSH(codeblock_t *block, ir_data_t *ir)
}
static inline void
CHECK_SEG_LIMITS(codeblock_t *block, ir_data_t *ir, x86seg *seg, int addr_reg, int end_offset)
CHECK_SEG_LIMITS(UNUSED(codeblock_t *block), ir_data_t *ir, x86seg *seg, int addr_reg, int end_offset)
{
if ((seg == &cpu_state.seg_ds && codegen_flat_ds && !(cpu_cur_status & CPU_STATUS_NOTFLATDS)) || (seg == &cpu_state.seg_ss && codegen_flat_ss && !(cpu_cur_status & CPU_STATUS_NOTFLATSS)))
return;
@@ -85,7 +85,7 @@ CHECK_SEG_LIMITS(codeblock_t *block, ir_data_t *ir, x86seg *seg, int addr_reg, i
}
static inline void
LOAD_IMMEDIATE_FROM_RAM_8(codeblock_t *block, ir_data_t *ir, int dest_reg, uint32_t addr)
LOAD_IMMEDIATE_FROM_RAM_8(UNUSED(codeblock_t *block), ir_data_t *ir, int dest_reg, uint32_t addr)
{
uop_MOVZX_REG_PTR_8(ir, dest_reg, get_ram_ptr(addr));
}

View File

@@ -15,7 +15,7 @@
#include "codegen_ops_mov.h"
uint32_t
ropJMP_r8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropJMP_r8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t offset = (int32_t) (int8_t) fastreadb(cs + op_pc);
uint32_t dest_addr = op_pc + 1 + offset;
@@ -29,7 +29,7 @@ ropJMP_r8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fe
return dest_addr;
}
uint32_t
ropJMP_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropJMP_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t offset = (int32_t) (int16_t) fastreadw(cs + op_pc);
uint32_t dest_addr = op_pc + 2 + offset;
@@ -42,7 +42,7 @@ ropJMP_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
return dest_addr;
}
uint32_t
ropJMP_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropJMP_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t offset = fastreadl(cs + op_pc);
uint32_t dest_addr = op_pc + 4 + offset;
@@ -54,7 +54,7 @@ ropJMP_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
}
uint32_t
ropJMP_far_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropJMP_far_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t new_pc = fastreadw(cs + op_pc);
uint16_t new_cs = fastreadw(cs + op_pc + 2);
@@ -69,7 +69,7 @@ ropJMP_far_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return -1;
}
uint32_t
ropJMP_far_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropJMP_far_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t new_pc = fastreadl(cs + op_pc);
uint16_t new_cs = fastreadw(cs + op_pc + 4);
@@ -85,7 +85,7 @@ ropJMP_far_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
}
uint32_t
ropCALL_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCALL_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t offset = (int32_t) (int16_t) fastreadw(cs + op_pc);
uint16_t ret_addr = op_pc + 2;
@@ -104,7 +104,7 @@ ropCALL_r16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
return -1;
}
uint32_t
ropCALL_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCALL_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t offset = fastreadl(cs + op_pc);
uint32_t ret_addr = op_pc + 4;
@@ -122,7 +122,7 @@ ropCALL_r32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropRET_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
ropRET_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -138,7 +138,7 @@ ropRET_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uin
return -1;
}
uint32_t
ropRET_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
ropRET_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -154,7 +154,7 @@ ropRET_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uin
}
uint32_t
ropRET_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropRET_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t offset = fastreadw(cs + op_pc);
@@ -173,7 +173,7 @@ ropRET_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return -1;
}
uint32_t
ropRET_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropRET_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t offset = fastreadw(cs + op_pc);
@@ -192,7 +192,7 @@ ropRET_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
}
uint32_t
ropRETF_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
ropRETF_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
{
if ((msw & 1) && !(cpu_state.eflags & VM_FLAG))
return 0;
@@ -215,7 +215,7 @@ ropRETF_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), ui
return -1;
}
uint32_t
ropRETF_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
ropRETF_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), UNUSED(uint32_t op_pc))
{
if ((msw & 1) && !(cpu_state.eflags & VM_FLAG))
return 0;
@@ -239,7 +239,7 @@ ropRETF_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), ui
}
uint32_t
ropRETF_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropRETF_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t offset;
@@ -266,7 +266,7 @@ ropRETF_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
return -1;
}
uint32_t
ropRETF_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropRETF_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t offset;

View File

@@ -16,7 +16,7 @@
#include "codegen_ops_logic.h"
uint32_t
ropAND_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropAND_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -29,7 +29,7 @@ ropAND_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropAND_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropAND_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -226,7 +226,7 @@ ropAND_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -239,7 +239,7 @@ ropOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
return op_pc + 1;
}
uint32_t
ropOR_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropOR_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -437,7 +437,7 @@ ropOR_l_rmw(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropTEST_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropTEST_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -449,7 +449,7 @@ ropTEST_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
return op_pc + 1;
}
uint32_t
ropTEST_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropTEST_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);
@@ -557,7 +557,7 @@ ropTEST_l_rm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t
}
uint32_t
ropXOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropXOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm_data = fastreadb(cs + op_pc);
@@ -570,7 +570,7 @@ ropXOR_AL_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + 1;
}
uint32_t
ropXOR_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropXOR_AX_imm(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm_data = fastreadw(cs + op_pc);

View File

@@ -485,34 +485,34 @@ ropFF_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
}
uint32_t
ropNOP(UNUSED(codeblock_t *block), UNUSED(ir_data_t *ir), UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropNOP(UNUSED(codeblock_t *block), UNUSED(ir_data_t *ir), UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
return op_pc;
}
uint32_t
ropCBW(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCBW(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOVSX(ir, IREG_AX, IREG_AL);
return op_pc;
}
uint32_t
ropCDQ(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCDQ(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_SAR_IMM(ir, IREG_EDX, IREG_EAX, 31);
return op_pc;
}
uint32_t
ropCWD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCWD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_SAR_IMM(ir, IREG_DX, IREG_AX, 15);
return op_pc;
}
uint32_t
ropCWDE(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCWDE(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOVSX(ir, IREG_EAX, IREG_AX);
@@ -520,7 +520,7 @@ ropCWDE(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint3
}
#define ropLxS(name, seg) \
uint32_t rop##name##_16(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##name##_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
@@ -542,7 +542,7 @@ ropCWDE(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint3
\
return op_pc + 1; \
} \
uint32_t rop##name##_32(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##name##_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
x86seg *target_seg = NULL; \
int dest_reg = (fetchdat >> 3) & 7; \
@@ -572,21 +572,21 @@ ropLxS(LGS, &cpu_state.seg_gs)
ropLxS(LSS, &cpu_state.seg_ss)
uint32_t
ropCLC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCLC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_CALL_FUNC(ir, flags_rebuild);
uop_AND_IMM(ir, IREG_flags, IREG_flags, ~C_FLAG);
return op_pc;
}
uint32_t
ropCMC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCMC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_CALL_FUNC(ir, flags_rebuild);
uop_XOR_IMM(ir, IREG_flags, IREG_flags, C_FLAG);
return op_pc;
}
uint32_t
ropSTC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSTC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_CALL_FUNC(ir, flags_rebuild);
uop_OR_IMM(ir, IREG_flags, IREG_flags, C_FLAG);
@@ -594,20 +594,20 @@ ropSTC(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32
}
uint32_t
ropCLD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCLD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_AND_IMM(ir, IREG_flags, IREG_flags, ~D_FLAG);
return op_pc;
}
uint32_t
ropSTD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSTD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_OR_IMM(ir, IREG_flags, IREG_flags, D_FLAG);
return op_pc;
}
uint32_t
ropCLI(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropCLI(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI)))
return 0;
@@ -616,7 +616,7 @@ ropCLI(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32
return op_pc;
}
uint32_t
ropSTI(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropSTI(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
if (!IOPLp && (cr4 & (CR4_VME | CR4_PVI)))
return 0;

View File

@@ -2,6 +2,7 @@
#include <86box/86box.h>
#include "cpu.h"
#include <86box/mem.h>
#include <86box/plat_unused.h>
#include "x86.h"
#include "x86_flags.h"
@@ -16,7 +17,7 @@
#include "codegen_ops_helpers.h"
#define ropParith(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
@@ -58,4 +59,4 @@ ropParith(PSUBUSW)
ropParith(PMADDWD)
ropParith(PMULHW)
ropParith(PMULLW)
// clang-format on
// clang-format on

View File

@@ -2,6 +2,7 @@
#include <86box/86box.h>
#include "cpu.h"
#include <86box/mem.h>
#include <86box/plat_unused.h>
#include "x86.h"
#include "x86_flags.h"
@@ -16,7 +17,7 @@
#include "codegen_ops_helpers.h"
#define ropPcmp(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
@@ -45,4 +46,4 @@ ropPcmp(PCMPEQD)
ropPcmp(PCMPGTB)
ropPcmp(PCMPGTW)
ropPcmp(PCMPGTD)
// clang-format on
// clang-format on

View File

@@ -2,6 +2,7 @@
#include <86box/86box.h>
#include "cpu.h"
#include <86box/mem.h>
#include <86box/plat_unused.h>
#include "x86.h"
#include "x86_flags.h"
@@ -16,7 +17,7 @@
#include "codegen_ops_helpers.h"
#define ropPpack(func) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t rop##func(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
{ \
int dest_reg = (fetchdat >> 3) & 7; \
\
@@ -48,4 +49,4 @@ ropPpack(PUNPCKLDQ)
ropPpack(PUNPCKHBW)
ropPpack(PUNPCKHWD)
ropPpack(PUNPCKHDQ)
// clang-format on
// clang-format on

View File

@@ -15,7 +15,7 @@
#include "codegen_ops_mov.h"
uint32_t
ropMOV_rb_imm(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropMOV_rb_imm(codeblock_t *block, ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint8_t imm = fastreadb(cs + op_pc);
@@ -25,7 +25,7 @@ ropMOV_rb_imm(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchd
return op_pc + 1;
}
uint32_t
ropMOV_rw_imm(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropMOV_rw_imm(codeblock_t *block, ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm = fastreadw(cs + op_pc);
@@ -172,7 +172,7 @@ ropMOV_r_l(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
}
uint32_t
ropMOV_AL_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_AL_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr;
@@ -189,7 +189,7 @@ ropMOV_AL_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
uint32_t
ropMOV_AX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_AX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr;
@@ -206,7 +206,7 @@ ropMOV_AX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
uint32_t
ropMOV_EAX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_EAX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr = 0;
@@ -233,7 +233,7 @@ ropMOV_EAX_abs(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
}
uint32_t
ropMOV_abs_AL(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_abs_AL(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr;
@@ -250,7 +250,7 @@ ropMOV_abs_AL(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
uint32_t
ropMOV_abs_AX(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_abs_AX(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr;
@@ -267,7 +267,7 @@ ropMOV_abs_AX(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_
return op_pc + ((op_32 & 0x200) ? 4 : 2);
}
uint32_t
ropMOV_abs_EAX(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropMOV_abs_EAX(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uint32_t addr;
@@ -614,7 +614,7 @@ ropMOVZX_32_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
}
uint32_t
ropXCHG_AX(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropXCHG_AX(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int reg2 = IREG_16(opcode & 7);
@@ -625,7 +625,7 @@ ropXCHG_AX(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t f
return op_pc;
}
uint32_t
ropXCHG_EAX(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropXCHG_EAX(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int reg2 = IREG_32(opcode & 7);
@@ -716,7 +716,7 @@ ropXCHG_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t f
}
uint32_t
ropXLAT(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
ropXLAT(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), uint32_t op_32, uint32_t op_pc)
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);

View File

@@ -16,7 +16,7 @@
#include "codegen_ops_misc.h"
uint32_t
ropPUSH_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -28,7 +28,7 @@ ropPUSH_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t
return op_pc;
}
uint32_t
ropPUSH_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -41,7 +41,7 @@ ropPUSH_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t
}
uint32_t
ropPOP_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPOP_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -57,7 +57,7 @@ ropPOP_r16(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t f
return op_pc;
}
uint32_t
ropPOP_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPOP_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -74,7 +74,7 @@ ropPOP_r32(UNUSED(codeblock_t *block), ir_data_t *ir, uint8_t opcode, uint32_t f
}
uint32_t
ropPUSH_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm = fastreadw(cs + op_pc);
int sp_reg;
@@ -88,7 +88,7 @@ ropPUSH_imm_16(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
return op_pc + 2;
}
uint32_t
ropPUSH_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t imm = fastreadl(cs + op_pc);
int sp_reg;
@@ -103,7 +103,7 @@ ropPUSH_imm_32(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32
}
uint32_t
ropPUSH_imm_16_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_imm_16_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint16_t imm = (int16_t) (int8_t) fastreadb(cs + op_pc);
int sp_reg;
@@ -117,7 +117,7 @@ ropPUSH_imm_16_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint
return op_pc + 1;
}
uint32_t
ropPUSH_imm_32_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSH_imm_32_8(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uint32_t imm = (int32_t) (int8_t) fastreadb(cs + op_pc);
int sp_reg;
@@ -197,7 +197,7 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
}
#define ROP_PUSH_SEG(seg) \
uint32_t ropPUSH_##seg##_16(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropPUSH_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
@@ -208,7 +208,7 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
\
return op_pc; \
} \
uint32_t ropPUSH_##seg##_32(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropPUSH_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
int sp_reg; \
\
@@ -222,7 +222,7 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
}
#define ROP_POP_SEG(seg, rseg) \
uint32_t ropPOP_##seg##_16(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropPOP_##seg##_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
@@ -237,7 +237,7 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
\
return op_pc; \
} \
uint32_t ropPOP_##seg##_32(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
uint32_t ropPOP_##seg##_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc) \
{ \
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc); \
\
@@ -253,6 +253,7 @@ ropPOP_L(codeblock_t *block, ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fet
return op_pc; \
}
// clang-format off
ROP_PUSH_SEG(CS)
ROP_PUSH_SEG(DS)
ROP_PUSH_SEG(ES)
@@ -263,9 +264,10 @@ ROP_POP_SEG(DS, cpu_state.seg_ds)
ROP_POP_SEG(ES, cpu_state.seg_es)
ROP_POP_SEG(FS, cpu_state.seg_fs)
ROP_POP_SEG(GS, cpu_state.seg_gs)
// clang-format on
uint32_t
ropLEAVE_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropLEAVE_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -281,7 +283,7 @@ ropLEAVE_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), u
return op_pc;
}
uint32_t
ropLEAVE_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropLEAVE_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
uop_MOV_IMM(ir, IREG_oldpc, cpu_state.oldpc);
@@ -298,7 +300,7 @@ ropLEAVE_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), u
}
uint32_t
ropPUSHA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSHA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -317,7 +319,7 @@ ropPUSHA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), u
return op_pc;
}
uint32_t
ropPUSHA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSHA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -337,7 +339,7 @@ ropPUSHA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), u
}
uint32_t
ropPOPA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPOPA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -355,7 +357,7 @@ ropPOPA_16(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), ui
return op_pc;
}
uint32_t
ropPOPA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPOPA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -374,7 +376,7 @@ ropPOPA_32(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), ui
}
uint32_t
ropPUSHF(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSHF(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;
@@ -390,7 +392,7 @@ ropPUSHF(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint
return op_pc;
}
uint32_t
ropPUSHFD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), uint32_t fetchdat, UNUSED(uint32_t op_32), uint32_t op_pc)
ropPUSHFD(UNUSED(codeblock_t *block), ir_data_t *ir, UNUSED(uint8_t opcode), UNUSED(uint32_t fetchdat), UNUSED(uint32_t op_32), uint32_t op_pc)
{
int sp_reg;

View File

@@ -27,6 +27,7 @@
#include <86box/fdc.h>
#include <86box/machine.h>
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>
#include <86box/gdbstub.h>
#ifndef OPS_286_386
# define OPS_286_386

View File

@@ -1825,7 +1825,7 @@ cpu_386_check_instruction_fault(void)
}
int
sysenter(uint32_t fetchdat)
sysenter(UNUSED(uint32_t fetchdat))
{
#ifdef ENABLE_386_COMMON_LOG
x386_common_log("SYSENTER called\n");
@@ -1907,7 +1907,7 @@ sysenter(uint32_t fetchdat)
}
int
sysexit(uint32_t fetchdat)
sysexit(UNUSED(uint32_t fetchdat))
{
#ifdef ENABLE_386_COMMON_LOG
x386_common_log("SYSEXIT called\n");
@@ -1994,7 +1994,7 @@ sysexit(uint32_t fetchdat)
}
int
syscall_op(uint32_t fetchdat)
syscall_op(UNUSED(uint32_t fetchdat))
{
#ifdef ENABLE_386_COMMON_LOG
x386_common_log("SYSCALL called\n");
@@ -2046,7 +2046,7 @@ syscall_op(uint32_t fetchdat)
}
int
sysret(uint32_t fetchdat)
sysret(UNUSED(uint32_t fetchdat))
{
#ifdef ENABLE_386_COMMON_LOG
x386_common_log("SYSRET called\n");

View File

@@ -30,6 +30,7 @@
#include <86box/fdc.h>
#include <86box/machine.h>
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>
#include <86box/gdbstub.h>
#ifdef USE_DYNAREC
# include "codegen.h"

View File

@@ -35,6 +35,7 @@
#include <86box/ppi.h>
#include <86box/timer.h>
#include <86box/gdbstub.h>
#include <86box/plat_unused.h>
/* Is the CPU 8088 or 8086. */
int is8086 = 0;
@@ -815,7 +816,7 @@ pop(void)
}
static void
access(int num, int bits)
access(int num, UNUSED(int bits))
{
switch (num) {
case 0:
@@ -1419,7 +1420,7 @@ set_pzs(int bits)
}
static void
set_co_mul(int bits, int carry)
set_co_mul(UNUSED(int bits), int carry)
{
set_cf(carry);
set_of(carry);

View File

@@ -328,7 +328,7 @@ codegen_timing_486_start(void)
}
void
codegen_timing_486_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_486_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
timing_count += COUNT(opcode_timings_486[prefix], 0);
last_prefix = prefix;

View File

@@ -8,6 +8,7 @@
#include <86box/mem.h>
#include "cpu.h"
#include <86box/machine.h>
#include <86box/plat_unused.h>
#include "x86.h"
#include "x86_ops.h"
@@ -2037,7 +2038,7 @@ codegen_timing_k5_start(void)
}
void
codegen_timing_k5_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_k5_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
if (prefix != 0x0f)
decode_timestamp++;
@@ -2047,7 +2048,7 @@ codegen_timing_k5_prefix(uint8_t prefix, uint32_t fetchdat)
}
void
codegen_timing_k5_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc)
codegen_timing_k5_opcode(uint8_t opcode, UNUSED(uint32_t fetchdat), int op_32, uint32_t op_pc)
{
const risc86_instruction_t **ins_table;
const uint64_t *deps;

View File

@@ -8,6 +8,7 @@
#include <86box/mem.h>
#include "cpu.h"
#include <86box/machine.h>
#include <86box/plat_unused.h>
#include "x86.h"
#include "x86_ops.h"
@@ -2037,7 +2038,7 @@ codegen_timing_k6_start(void)
}
void
codegen_timing_k6_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_k6_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
if (prefix != 0x0f)
decode_timestamp++;
@@ -2047,7 +2048,7 @@ codegen_timing_k6_prefix(uint8_t prefix, uint32_t fetchdat)
}
void
codegen_timing_k6_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc)
codegen_timing_k6_opcode(uint8_t opcode, UNUSED(uint32_t fetchdat), int op_32, uint32_t op_pc)
{
const risc86_instruction_t **ins_table;
const uint64_t *deps;

View File

@@ -1845,7 +1845,7 @@ codegen_timing_p6_start(void)
}
void
codegen_timing_p6_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_p6_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
if (prefix != 0x0f)
decode_timestamp++;
@@ -1855,7 +1855,7 @@ codegen_timing_p6_prefix(uint8_t prefix, uint32_t fetchdat)
}
void
codegen_timing_p6_opcode(uint8_t opcode, uint32_t fetchdat, int op_32, UNUSED(uint32_t op_pc))
codegen_timing_p6_opcode(uint8_t opcode, UNUSED(uint32_t fetchdat), int op_32, UNUSED(uint32_t op_pc))
{
const macro_op_t **ins_table;
const uint64_t *deps;

View File

@@ -328,7 +328,7 @@ codegen_timing_winchip_start(void)
}
void
codegen_timing_winchip_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_winchip_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
timing_count += COUNT(opcode_timings_winchip[prefix], 0);
last_prefix = prefix;

View File

@@ -589,7 +589,7 @@ codegen_timing_winchip2_start(void)
}
static void
codegen_timing_winchip2_prefix(uint8_t prefix, uint32_t fetchdat)
codegen_timing_winchip2_prefix(uint8_t prefix, UNUSED(uint32_t fetchdat))
{
if (prefix == 0x0f) {
/*0fh prefix is 'free'*/

View File

@@ -20,7 +20,7 @@ opPREFETCH_a32(uint32_t fetchdat)
}
static int
opFEMMS(uint32_t fetchdat)
opFEMMS(UNUSED(uint32_t fetchdat))
{
ILLEGAL_ON(!cpu_has_feature(CPU_FEATURE_MMX));
if (cr0 & 0xc) {
@@ -33,7 +33,7 @@ opFEMMS(uint32_t fetchdat)
}
static int
opPAVGUSB(uint32_t fetchdat)
opPAVGUSB(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -54,7 +54,7 @@ opPAVGUSB(uint32_t fetchdat)
return 0;
}
static int
opPF2ID(uint32_t fetchdat)
opPF2ID(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -69,7 +69,7 @@ opPF2ID(uint32_t fetchdat)
return 0;
}
static int
opPF2IW(uint32_t fetchdat)
opPF2IW(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -84,7 +84,7 @@ opPF2IW(uint32_t fetchdat)
return 0;
}
static int
opPFACC(uint32_t fetchdat)
opPFACC(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -101,7 +101,7 @@ opPFACC(uint32_t fetchdat)
return 0;
}
static int
opPFNACC(uint32_t fetchdat)
opPFNACC(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -118,7 +118,7 @@ opPFNACC(uint32_t fetchdat)
return 0;
}
static int
opPFPNACC(uint32_t fetchdat)
opPFPNACC(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -135,7 +135,7 @@ opPFPNACC(uint32_t fetchdat)
return 0;
}
static int
opPSWAPD(uint32_t fetchdat)
opPSWAPD(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -155,7 +155,7 @@ opPSWAPD(uint32_t fetchdat)
return 0;
}
static int
opPFADD(uint32_t fetchdat)
opPFADD(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -170,7 +170,7 @@ opPFADD(uint32_t fetchdat)
return 0;
}
static int
opPFCMPEQ(uint32_t fetchdat)
opPFCMPEQ(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -185,7 +185,7 @@ opPFCMPEQ(uint32_t fetchdat)
return 0;
}
static int
opPFCMPGE(uint32_t fetchdat)
opPFCMPGE(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -200,7 +200,7 @@ opPFCMPGE(uint32_t fetchdat)
return 0;
}
static int
opPFCMPGT(uint32_t fetchdat)
opPFCMPGT(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -215,7 +215,7 @@ opPFCMPGT(uint32_t fetchdat)
return 0;
}
static int
opPFMAX(uint32_t fetchdat)
opPFMAX(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -232,7 +232,7 @@ opPFMAX(uint32_t fetchdat)
return 0;
}
static int
opPFMIN(uint32_t fetchdat)
opPFMIN(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -249,7 +249,7 @@ opPFMIN(uint32_t fetchdat)
return 0;
}
static int
opPFMUL(uint32_t fetchdat)
opPFMUL(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -264,7 +264,7 @@ opPFMUL(uint32_t fetchdat)
return 0;
}
static int
opPFRCP(uint32_t fetchdat)
opPFRCP(UNUSED(uint32_t fetchdat))
{
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -293,7 +293,7 @@ opPFRCP(uint32_t fetchdat)
}
/*Since opPFRCP() calculates a full precision reciprocal, treat the followup iterations as MOVs*/
static int
opPFRCPIT1(uint32_t fetchdat)
opPFRCPIT1(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -308,7 +308,7 @@ opPFRCPIT1(uint32_t fetchdat)
return 0;
}
static int
opPFRCPIT2(uint32_t fetchdat)
opPFRCPIT2(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -323,7 +323,7 @@ opPFRCPIT2(uint32_t fetchdat)
return 0;
}
static int
opPFRSQRT(uint32_t fetchdat)
opPFRSQRT(UNUSED(uint32_t fetchdat))
{
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -352,7 +352,7 @@ opPFRSQRT(uint32_t fetchdat)
}
/*Since opPFRSQRT() calculates a full precision inverse square root, treat the followup iteration as a NOP*/
static int
opPFRSQIT1(uint32_t fetchdat)
opPFRSQIT1(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
@@ -362,7 +362,7 @@ opPFRSQIT1(uint32_t fetchdat)
return 0;
}
static int
opPFSUB(uint32_t fetchdat)
opPFSUB(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -377,7 +377,7 @@ opPFSUB(uint32_t fetchdat)
return 0;
}
static int
opPFSUBR(uint32_t fetchdat)
opPFSUBR(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -392,7 +392,7 @@ opPFSUBR(uint32_t fetchdat)
return 0;
}
static int
opPI2FD(uint32_t fetchdat)
opPI2FD(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -407,7 +407,7 @@ opPI2FD(uint32_t fetchdat)
return 0;
}
static int
opPI2FW(uint32_t fetchdat)
opPI2FW(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);
@@ -422,7 +422,7 @@ opPI2FW(uint32_t fetchdat)
return 0;
}
static int
opPMULHRW(uint32_t fetchdat)
opPMULHRW(UNUSED(uint32_t fetchdat))
{
MMX_REG src;
MMX_REG *dst = MMX_GETREGP(cpu_reg);

View File

@@ -313,7 +313,7 @@
return 0; \
} \
\
static int op##name##_EAX_imm(uint32_t fetchdat) \
static int op##name##_EAX_imm(UNUSED(uint32_t fetchdat)) \
{ \
uint32_t dst = EAX; \
uint32_t src = getlong(); \
@@ -581,7 +581,7 @@ opCMP_AX_imm(uint32_t fetchdat)
}
static int
opCMP_EAX_imm(uint32_t fetchdat)
opCMP_EAX_imm(UNUSED(uint32_t fetchdat))
{
uint32_t src = getlong();
@@ -747,7 +747,7 @@ opTEST_AX(uint32_t fetchdat)
return 0;
}
static int
opTEST_EAX(uint32_t fetchdat)
opTEST_EAX(UNUSED(uint32_t fetchdat))
{
uint32_t temp = getlong();
if (cpu_state.abrt)

View File

@@ -1,5 +1,5 @@
static int
opAAA(uint32_t fetchdat)
opAAA(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
if ((cpu_state.flags & A_FLAG) || ((AL & 0xF) > 9)) {
@@ -46,7 +46,7 @@ opAAM(uint32_t fetchdat)
}
static int
opAAS(uint32_t fetchdat)
opAAS(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
if ((cpu_state.flags & A_FLAG) || ((AL & 0xF) > 9)) {
@@ -63,7 +63,7 @@ opAAS(uint32_t fetchdat)
}
static int
opDAA(uint32_t fetchdat)
opDAA(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
uint16_t old_AL;
@@ -100,7 +100,7 @@ opDAA(uint32_t fetchdat)
}
static int
opDAS(uint32_t fetchdat)
opDAS(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
uint16_t old_AL;

View File

@@ -209,7 +209,7 @@ opCALL_far_w(uint32_t fetchdat)
return 0;
}
static int
opCALL_far_l(uint32_t fetchdat)
opCALL_far_l(UNUSED(uint32_t fetchdat))
{
uint32_t old_cs;
uint32_t old_pc;

View File

@@ -212,7 +212,7 @@ opRSTS_a32(uint32_t fetchdat)
}
static int
opSMINT(uint32_t fetchdat)
opSMINT(UNUSED(uint32_t fetchdat))
{
if (in_smm)
fatal("opSMINT\n");
@@ -223,7 +223,7 @@ opSMINT(uint32_t fetchdat)
}
static int
opRDSHR_a16(uint32_t fetchdat)
opRDSHR_a16(UNUSED(uint32_t fetchdat))
{
if (in_smm)
fatal("opRDSHR_a16\n");
@@ -233,7 +233,7 @@ opRDSHR_a16(uint32_t fetchdat)
return 1;
}
static int
opRDSHR_a32(uint32_t fetchdat)
opRDSHR_a32(UNUSED(uint32_t fetchdat))
{
if (in_smm)
fatal("opRDSHR_a32\n");
@@ -244,7 +244,7 @@ opRDSHR_a32(uint32_t fetchdat)
}
static int
opWRSHR_a16(uint32_t fetchdat)
opWRSHR_a16(UNUSED(uint32_t fetchdat))
{
if (in_smm)
fatal("opWRSHR_a16\n");
@@ -254,7 +254,7 @@ opWRSHR_a16(uint32_t fetchdat)
return 1;
}
static int
opWRSHR_a32(uint32_t fetchdat)
opWRSHR_a32(UNUSED(uint32_t fetchdat))
{
if (in_smm)
fatal("opWRSHR_a32\n");

View File

@@ -1,5 +1,5 @@
static int
opCMC(uint32_t fetchdat)
opCMC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags ^= C_FLAG;
@@ -9,7 +9,7 @@ opCMC(uint32_t fetchdat)
}
static int
opCLC(uint32_t fetchdat)
opCLC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags &= ~C_FLAG;
@@ -18,7 +18,7 @@ opCLC(uint32_t fetchdat)
return 0;
}
static int
opCLD(uint32_t fetchdat)
opCLD(UNUSED(uint32_t fetchdat))
{
cpu_state.flags &= ~D_FLAG;
CLOCK_CYCLES(2);
@@ -26,7 +26,7 @@ opCLD(uint32_t fetchdat)
return 0;
}
static int
opCLI(uint32_t fetchdat)
opCLI(UNUSED(uint32_t fetchdat))
{
if (!IOPLp) {
if ((!(cpu_state.eflags & VM_FLAG) && (cr4 & CR4_PVI)) || ((cpu_state.eflags & VM_FLAG) && (cr4 & CR4_VME))) {
@@ -44,7 +44,7 @@ opCLI(uint32_t fetchdat)
}
static int
opSTC(uint32_t fetchdat)
opSTC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags |= C_FLAG;
@@ -53,7 +53,7 @@ opSTC(uint32_t fetchdat)
return 0;
}
static int
opSTD(uint32_t fetchdat)
opSTD(UNUSED(uint32_t fetchdat))
{
cpu_state.flags |= D_FLAG;
CLOCK_CYCLES(2);
@@ -61,7 +61,7 @@ opSTD(uint32_t fetchdat)
return 0;
}
static int
opSTI(uint32_t fetchdat)
opSTI(UNUSED(uint32_t fetchdat))
{
if (!IOPLp) {
if ((!(cpu_state.eflags & VM_FLAG) && (cr4 & CR4_PVI)) || ((cpu_state.eflags & VM_FLAG) && (cr4 & CR4_VME))) {
@@ -87,7 +87,7 @@ opSTI(uint32_t fetchdat)
}
static int
opSAHF(uint32_t fetchdat)
opSAHF(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags = (cpu_state.flags & 0xff00) | (AH & 0xd5) | 2;
@@ -101,7 +101,7 @@ opSAHF(uint32_t fetchdat)
return 0;
}
static int
opLAHF(uint32_t fetchdat)
opLAHF(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
AH = cpu_state.flags & 0xff;
@@ -111,7 +111,7 @@ opLAHF(uint32_t fetchdat)
}
static int
opPUSHF(uint32_t fetchdat)
opPUSHF(UNUSED(uint32_t fetchdat))
{
if ((cpu_state.eflags & VM_FLAG) && (IOPL < 3)) {
if (cr4 & CR4_VME) {
@@ -135,7 +135,7 @@ opPUSHF(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opPUSHFD(uint32_t fetchdat)
opPUSHFD(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
if ((cpu_state.eflags & VM_FLAG) && (IOPL < 3)) {
@@ -156,7 +156,7 @@ opPUSHFD(uint32_t fetchdat)
}
static int
opPOPF_186(uint32_t fetchdat)
opPOPF_186(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -192,7 +192,7 @@ opPOPF_186(uint32_t fetchdat)
return 0;
}
static int
opPOPF_286(uint32_t fetchdat)
opPOPF_286(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -228,7 +228,7 @@ opPOPF_286(uint32_t fetchdat)
return 0;
}
static int
opPOPF(uint32_t fetchdat)
opPOPF(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -284,7 +284,7 @@ opPOPF(uint32_t fetchdat)
return 0;
}
static int
opPOPFD(uint32_t fetchdat)
opPOPFD(UNUSED(uint32_t fetchdat))
{
uint32_t templ;

View File

@@ -1,5 +1,5 @@
static int
opCMC(uint32_t fetchdat)
opCMC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags ^= C_FLAG;
@@ -9,7 +9,7 @@ opCMC(uint32_t fetchdat)
}
static int
opCLC(uint32_t fetchdat)
opCLC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags &= ~C_FLAG;
@@ -18,7 +18,7 @@ opCLC(uint32_t fetchdat)
return 0;
}
static int
opCLD(uint32_t fetchdat)
opCLD(UNUSED(uint32_t fetchdat))
{
cpu_state.flags &= ~D_FLAG;
CLOCK_CYCLES(2);
@@ -26,7 +26,7 @@ opCLD(uint32_t fetchdat)
return 0;
}
static int
opCLI(uint32_t fetchdat)
opCLI(UNUSED(uint32_t fetchdat))
{
if (!IOPLp) {
if ((!(cpu_state.eflags & VM_FLAG) && (cr4 & CR4_PVI)) || ((cpu_state.eflags & VM_FLAG) && (cr4 & CR4_VME))) {
@@ -44,7 +44,7 @@ opCLI(uint32_t fetchdat)
}
static int
opSTC(uint32_t fetchdat)
opSTC(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags |= C_FLAG;
@@ -53,7 +53,7 @@ opSTC(uint32_t fetchdat)
return 0;
}
static int
opSTD(uint32_t fetchdat)
opSTD(UNUSED(uint32_t fetchdat))
{
cpu_state.flags |= D_FLAG;
CLOCK_CYCLES(2);
@@ -61,7 +61,7 @@ opSTD(uint32_t fetchdat)
return 0;
}
static int
opSTI(uint32_t fetchdat)
opSTI(UNUSED(uint32_t fetchdat))
{
if (!IOPLp) {
if ((!(cpu_state.eflags & VM_FLAG) && (cr4 & CR4_PVI)) || ((cpu_state.eflags & VM_FLAG) && (cr4 & CR4_VME))) {
@@ -87,7 +87,7 @@ opSTI(uint32_t fetchdat)
}
static int
opSAHF(uint32_t fetchdat)
opSAHF(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
cpu_state.flags = (cpu_state.flags & 0xff00) | (AH & 0xd5) | 2;
@@ -101,7 +101,7 @@ opSAHF(uint32_t fetchdat)
return 0;
}
static int
opLAHF(uint32_t fetchdat)
opLAHF(UNUSED(uint32_t fetchdat))
{
flags_rebuild();
AH = cpu_state.flags & 0xff;
@@ -111,7 +111,7 @@ opLAHF(uint32_t fetchdat)
}
static int
opPUSHF(uint32_t fetchdat)
opPUSHF(UNUSED(uint32_t fetchdat))
{
if ((cpu_state.eflags & VM_FLAG) && (IOPL < 3)) {
if (cr4 & CR4_VME) {
@@ -135,7 +135,7 @@ opPUSHF(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opPUSHFD(uint32_t fetchdat)
opPUSHFD(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
if ((cpu_state.eflags & VM_FLAG) && (IOPL < 3)) {
@@ -156,7 +156,7 @@ opPUSHFD(uint32_t fetchdat)
}
static int
opPOPF_186(uint32_t fetchdat)
opPOPF_186(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -190,7 +190,7 @@ opPOPF_186(uint32_t fetchdat)
return 0;
}
static int
opPOPF_286(uint32_t fetchdat)
opPOPF_286(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -224,7 +224,7 @@ opPOPF_286(uint32_t fetchdat)
return 0;
}
static int
opPOPF(uint32_t fetchdat)
opPOPF(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -278,7 +278,7 @@ opPOPF(uint32_t fetchdat)
return 0;
}
static int
opPOPFD(uint32_t fetchdat)
opPOPFD(UNUSED(uint32_t fetchdat))
{
uint32_t templ;

View File

@@ -90,7 +90,7 @@ opESCAPE_df_a32(uint32_t fetchdat)
}
static int
opWAIT(uint32_t fetchdat)
opWAIT(UNUSED(uint32_t fetchdat))
{
if ((cr0 & 0xa) == 0xa) {
x86_int(7);

View File

@@ -90,7 +90,7 @@ opESCAPE_df_a32(uint32_t fetchdat)
}
static int
opWAIT(uint32_t fetchdat)
opWAIT(UNUSED(uint32_t fetchdat))
{
if ((cr0 & 0xa) == 0xa) {
x86_int(7);

View File

@@ -1,5 +1,5 @@
#define INC_DEC_OP(name, reg, inc, setflags) \
static int op##name(uint32_t fetchdat) \
static int op##name(UNUSED(uint32_t fetchdat)) \
{ \
setflags(reg, 1); \
reg += inc; \

View File

@@ -1,5 +1,5 @@
static int
opINT3(uint32_t fetchdat)
opINT3(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -18,7 +18,7 @@ opINT3(uint32_t fetchdat)
}
static int
opINT1(uint32_t fetchdat)
opINT1(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -75,7 +75,7 @@ opINT(uint32_t fetchdat)
}
static int
opINTO(uint32_t fetchdat)
opINTO(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);

View File

@@ -75,7 +75,7 @@ opOUT_EAX_imm(uint32_t fetchdat)
}
static int
opIN_AL_DX(uint32_t fetchdat)
opIN_AL_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 1);
AL = inb(DX);
@@ -86,7 +86,7 @@ opIN_AL_DX(uint32_t fetchdat)
return 0;
}
static int
opIN_AX_DX(uint32_t fetchdat)
opIN_AX_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 2);
AX = inw(DX);
@@ -97,7 +97,7 @@ opIN_AX_DX(uint32_t fetchdat)
return 0;
}
static int
opIN_EAX_DX(uint32_t fetchdat)
opIN_EAX_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 4);
EAX = inl(DX);
@@ -109,7 +109,7 @@ opIN_EAX_DX(uint32_t fetchdat)
}
static int
opOUT_AL_DX(uint32_t fetchdat)
opOUT_AL_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 1);
outb(DX, AL);
@@ -120,7 +120,7 @@ opOUT_AL_DX(uint32_t fetchdat)
return x86_was_reset;
}
static int
opOUT_AX_DX(uint32_t fetchdat)
opOUT_AX_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 2);
outw(DX, AX);
@@ -131,7 +131,7 @@ opOUT_AX_DX(uint32_t fetchdat)
return 0;
}
static int
opOUT_EAX_DX(uint32_t fetchdat)
opOUT_EAX_DX(UNUSED(uint32_t fetchdat))
{
check_io_perm(DX, 4);
outl(DX, EAX);

View File

@@ -51,7 +51,7 @@
return 0; \
} \
\
static int opJ##condition##_l(uint32_t fetchdat) \
static int opJ##condition##_l(UNUSED(uint32_t fetchdat)) \
{ \
uint32_t offset = getlong(); \
if (cpu_state.abrt) \
@@ -256,7 +256,7 @@ opJMP_r16(uint32_t fetchdat)
return 0;
}
static int
opJMP_r32(uint32_t fetchdat)
opJMP_r32(UNUSED(uint32_t fetchdat))
{
int32_t offset = (int32_t) getlong();
if (cpu_state.abrt)
@@ -289,7 +289,7 @@ opJMP_far_a16(uint32_t fetchdat)
return 0;
}
static int
opJMP_far_a32(uint32_t fetchdat)
opJMP_far_a32(UNUSED(uint32_t fetchdat))
{
uint16_t seg;
uint32_t addr;
@@ -323,7 +323,7 @@ opCALL_r16(uint32_t fetchdat)
return 0;
}
static int
opCALL_r32(uint32_t fetchdat)
opCALL_r32(UNUSED(uint32_t fetchdat))
{
int32_t addr = getlong();
@@ -339,7 +339,7 @@ opCALL_r32(uint32_t fetchdat)
}
static int
opRET_w(uint32_t fetchdat)
opRET_w(UNUSED(uint32_t fetchdat))
{
uint16_t ret;
@@ -355,7 +355,7 @@ opRET_w(uint32_t fetchdat)
return 0;
}
static int
opRET_l(uint32_t fetchdat)
opRET_l(UNUSED(uint32_t fetchdat))
{
uint32_t ret;

View File

@@ -1,5 +1,5 @@
static int
opCBW(uint32_t fetchdat)
opCBW(UNUSED(uint32_t fetchdat))
{
AH = (AL & 0x80) ? 0xff : 0;
CLOCK_CYCLES(3);
@@ -7,7 +7,7 @@ opCBW(uint32_t fetchdat)
return 0;
}
static int
opCWDE(uint32_t fetchdat)
opCWDE(UNUSED(uint32_t fetchdat))
{
EAX = (AX & 0x8000) ? (0xffff0000 | AX) : AX;
CLOCK_CYCLES(3);
@@ -15,7 +15,7 @@ opCWDE(uint32_t fetchdat)
return 0;
}
static int
opCWD(uint32_t fetchdat)
opCWD(UNUSED(uint32_t fetchdat))
{
DX = (AX & 0x8000) ? 0xFFFF : 0;
CLOCK_CYCLES(2);
@@ -23,7 +23,7 @@ opCWD(uint32_t fetchdat)
return 0;
}
static int
opCDQ(uint32_t fetchdat)
opCDQ(UNUSED(uint32_t fetchdat))
{
EDX = (EAX & 0x80000000) ? 0xffffffff : 0;
CLOCK_CYCLES(2);
@@ -32,7 +32,7 @@ opCDQ(uint32_t fetchdat)
}
static int
opNOP(uint32_t fetchdat)
opNOP(UNUSED(uint32_t fetchdat))
{
CLOCK_CYCLES((is486) ? 1 : 3);
PREFETCH_RUN(3, 1, -1, 0, 0, 0, 0, 0);
@@ -40,7 +40,7 @@ opNOP(uint32_t fetchdat)
}
static int
opSETALC(uint32_t fetchdat)
opSETALC(UNUSED(uint32_t fetchdat))
{
AL = (CF_SET()) ? 0xff : 0;
CLOCK_CYCLES(timing_rr);
@@ -701,7 +701,7 @@ opF7_l_a32(uint32_t fetchdat)
}
static int
opHLT(uint32_t fetchdat)
opHLT(UNUSED(uint32_t fetchdat))
{
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
x86gpf(NULL, 0);
@@ -856,7 +856,7 @@ opBOUND_l_a32(uint32_t fetchdat)
}
static int
opCLTS(uint32_t fetchdat)
opCLTS(UNUSED(uint32_t fetchdat))
{
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
x86gpf(NULL, 0);
@@ -869,14 +869,14 @@ opCLTS(uint32_t fetchdat)
}
static int
opINVD(uint32_t fetchdat)
opINVD(UNUSED(uint32_t fetchdat))
{
CLOCK_CYCLES(1000);
CPU_BLOCK_END();
return 0;
}
static int
opWBINVD(uint32_t fetchdat)
opWBINVD(UNUSED(uint32_t fetchdat))
{
if ((CPL || (cpu_state.eflags & VM_FLAG)) && (cr0 & 1)) {
x86gpf(NULL, 0);
@@ -888,7 +888,7 @@ opWBINVD(uint32_t fetchdat)
}
static int
opLOADALL(uint32_t fetchdat)
opLOADALL(UNUSED(uint32_t fetchdat))
{
if (CPL && (cr0 & 1)) {
x86gpf(NULL, 0);
@@ -998,7 +998,7 @@ loadall_load_segment(uint32_t addr, x86seg *s)
}
static int
opLOADALL386(uint32_t fetchdat)
opLOADALL386(UNUSED(uint32_t fetchdat))
{
uint32_t la_addr = es + EDI;
@@ -1046,7 +1046,7 @@ opLOADALL386(uint32_t fetchdat)
}
static int
opCPUID(uint32_t fetchdat)
opCPUID(UNUSED(uint32_t fetchdat))
{
if (CPUID) {
cpu_CPUID();
@@ -1059,7 +1059,7 @@ opCPUID(uint32_t fetchdat)
}
static int
opRDMSR(uint32_t fetchdat)
opRDMSR(UNUSED(uint32_t fetchdat))
{
if (cpu_has_feature(CPU_FEATURE_MSR)) {
cpu_RDMSR();
@@ -1072,7 +1072,7 @@ opRDMSR(uint32_t fetchdat)
}
static int
opWRMSR(uint32_t fetchdat)
opWRMSR(UNUSED(uint32_t fetchdat))
{
if (cpu_has_feature(CPU_FEATURE_MSR)) {
cpu_WRMSR();
@@ -1085,7 +1085,7 @@ opWRMSR(uint32_t fetchdat)
}
static int
opRSM(uint32_t fetchdat)
opRSM(UNUSED(uint32_t fetchdat))
{
if (in_smm) {
leave_smm();

View File

@@ -34,7 +34,7 @@
x87_set_mmx()
static int
opEMMS(uint32_t fetchdat)
opEMMS(UNUSED(uint32_t fetchdat))
{
if (!cpu_has_feature(CPU_FEATURE_MMX)) {
cpu_state.pc = cpu_state.oldpc;

View File

@@ -129,7 +129,7 @@ opMOV_SP_imm(uint32_t fetchdat)
}
static int
opMOV_EAX_imm(uint32_t fetchdat)
opMOV_EAX_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -140,7 +140,7 @@ opMOV_EAX_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_EBX_imm(uint32_t fetchdat)
opMOV_EBX_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -151,7 +151,7 @@ opMOV_EBX_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_ECX_imm(uint32_t fetchdat)
opMOV_ECX_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -162,7 +162,7 @@ opMOV_ECX_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_EDX_imm(uint32_t fetchdat)
opMOV_EDX_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -173,7 +173,7 @@ opMOV_EDX_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_ESI_imm(uint32_t fetchdat)
opMOV_ESI_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -184,7 +184,7 @@ opMOV_ESI_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_EDI_imm(uint32_t fetchdat)
opMOV_EDI_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -195,7 +195,7 @@ opMOV_EDI_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_EBP_imm(uint32_t fetchdat)
opMOV_EBP_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -206,7 +206,7 @@ opMOV_EBP_imm(uint32_t fetchdat)
return 0;
}
static int
opMOV_ESP_imm(uint32_t fetchdat)
opMOV_ESP_imm(UNUSED(uint32_t fetchdat))
{
uint32_t templ = getlong();
if (cpu_state.abrt)
@@ -326,7 +326,7 @@ opMOV_AL_a16(uint32_t fetchdat)
return 0;
}
static int
opMOV_AL_a32(uint32_t fetchdat)
opMOV_AL_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
uint32_t addr = getlong();
@@ -356,7 +356,7 @@ opMOV_AX_a16(uint32_t fetchdat)
return 0;
}
static int
opMOV_AX_a32(uint32_t fetchdat)
opMOV_AX_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
uint32_t addr = getlong();
@@ -386,7 +386,7 @@ opMOV_EAX_a16(uint32_t fetchdat)
return 0;
}
static int
opMOV_EAX_a32(uint32_t fetchdat)
opMOV_EAX_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
uint32_t addr = getlong();
@@ -413,7 +413,7 @@ opMOV_a16_AL(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opMOV_a32_AL(uint32_t fetchdat)
opMOV_a32_AL(UNUSED(uint32_t fetchdat))
{
uint32_t addr = getlong();
SEG_CHECK_WRITE(cpu_state.ea_seg);
@@ -435,7 +435,7 @@ opMOV_a16_AX(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opMOV_a32_AX(uint32_t fetchdat)
opMOV_a32_AX(UNUSED(uint32_t fetchdat))
{
uint32_t addr = getlong();
if (cpu_state.abrt)
@@ -459,7 +459,7 @@ opMOV_a16_EAX(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opMOV_a32_EAX(uint32_t fetchdat)
opMOV_a32_EAX(UNUSED(uint32_t fetchdat))
{
uint32_t addr = getlong();
if (cpu_state.abrt)
@@ -515,7 +515,7 @@ opLEA_l_a32(uint32_t fetchdat)
}
static int
opXLAT_a16(uint32_t fetchdat)
opXLAT_a16(UNUSED(uint32_t fetchdat))
{
uint32_t addr = (BX + AL) & 0xFFFF;
uint8_t temp;
@@ -530,7 +530,7 @@ opXLAT_a16(uint32_t fetchdat)
return 0;
}
static int
opXLAT_a32(uint32_t fetchdat)
opXLAT_a32(UNUSED(uint32_t fetchdat))
{
uint32_t addr = EBX + AL;
uint8_t temp;

View File

@@ -1,5 +1,5 @@
static int
opRDTSC(uint32_t fetchdat)
opRDTSC(UNUSED(uint32_t fetchdat))
{
if (!cpu_has_feature(CPU_FEATURE_RDTSC)) {
cpu_state.pc = cpu_state.oldpc;
@@ -21,7 +21,7 @@ opRDTSC(uint32_t fetchdat)
}
static int
opRDPMC(uint32_t fetchdat)
opRDPMC(UNUSED(uint32_t fetchdat))
{
if (ECX > 1 || (!(cr4 & CR4_PCE) && (cr0 & 1) && CPL)) {
x86gpf("RDPMC not allowed", 0);

View File

@@ -172,12 +172,12 @@ opLAR(w_a16, fetch_ea_16, 0, 0)
return cpu_state.abrt; \
}
opLSL(w_a16, fetch_ea_16, 0, 0)
opLSL(w_a32, fetch_ea_32, 0, 1)
opLSL(l_a16, fetch_ea_16, 1, 0)
opLSL(l_a32, fetch_ea_32, 1, 1)
opLSL(w_a16, fetch_ea_16, 0, 0)
opLSL(w_a32, fetch_ea_32, 0, 1)
opLSL(l_a16, fetch_ea_16, 1, 0)
opLSL(l_a32, fetch_ea_32, 1, 1)
static int op0F00_common(uint32_t fetchdat, int ea32)
static int op0F00_common(uint32_t fetchdat, UNUSED(int ea32))
{
int dpl;
int valid;
@@ -359,7 +359,7 @@ op0F00_a32(uint32_t fetchdat)
}
static int
op0F01_common(uint32_t fetchdat, int is32, int is286, int ea32)
op0F01_common(UNUSED(uint32_t fetchdat), int is32, int is286, UNUSED(int ea32))
{
uint32_t base;
uint16_t limit;

View File

@@ -1,5 +1,5 @@
#define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \
static int opREP_INSB_##size(uint32_t fetchdat) \
static int opREP_INSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -38,7 +38,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSW_##size(uint32_t fetchdat) \
static int opREP_INSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -77,7 +77,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSL_##size(uint32_t fetchdat) \
static int opREP_INSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -117,7 +117,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_OUTSB_##size(uint32_t fetchdat) \
static int opREP_OUTSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -148,7 +148,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSW_##size(uint32_t fetchdat) \
static int opREP_OUTSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -179,7 +179,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSL_##size(uint32_t fetchdat) \
static int opREP_OUTSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -211,7 +211,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_MOVSB_##size(uint32_t fetchdat) \
static int opREP_MOVSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -264,7 +264,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSW_##size(uint32_t fetchdat) \
static int opREP_MOVSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -318,7 +318,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSL_##size(uint32_t fetchdat) \
static int opREP_MOVSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -373,7 +373,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_STOSB_##size(uint32_t fetchdat) \
static int opREP_STOSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -405,7 +405,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSW_##size(uint32_t fetchdat) \
static int opREP_STOSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -437,7 +437,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSL_##size(uint32_t fetchdat) \
static int opREP_STOSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -470,7 +470,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_LODSB_##size(uint32_t fetchdat) \
static int opREP_LODSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -502,7 +502,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSW_##size(uint32_t fetchdat) \
static int opREP_LODSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -534,7 +534,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSL_##size(uint32_t fetchdat) \
static int opREP_LODSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -570,7 +570,7 @@
#define CHEK_READ(a, b, c)
#define REP_OPS_CMPS_SCAS(size, CNT_REG, SRC_REG, DEST_REG, FV) \
static int opREP_CMPSB_##size(uint32_t fetchdat) \
static int opREP_CMPSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -623,7 +623,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSW_##size(uint32_t fetchdat) \
static int opREP_CMPSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -677,7 +677,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSL_##size(uint32_t fetchdat) \
static int opREP_CMPSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -732,7 +732,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_SCASB_##size(uint32_t fetchdat) \
static int opREP_SCASB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -767,7 +767,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASW_##size(uint32_t fetchdat) \
static int opREP_SCASW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -802,7 +802,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASL_##size(uint32_t fetchdat) \
static int opREP_SCASL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \

View File

@@ -1,5 +1,5 @@
#define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \
static int opREP_INSB_##size(uint32_t fetchdat) \
static int opREP_INSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -38,7 +38,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSW_##size(uint32_t fetchdat) \
static int opREP_INSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -77,7 +77,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSL_##size(uint32_t fetchdat) \
static int opREP_INSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -117,7 +117,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_OUTSB_##size(uint32_t fetchdat) \
static int opREP_OUTSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -148,7 +148,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSW_##size(uint32_t fetchdat) \
static int opREP_OUTSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -179,7 +179,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSL_##size(uint32_t fetchdat) \
static int opREP_OUTSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
\
@@ -211,7 +211,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_MOVSB_##size(uint32_t fetchdat) \
static int opREP_MOVSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -264,7 +264,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSW_##size(uint32_t fetchdat) \
static int opREP_MOVSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -318,7 +318,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSL_##size(uint32_t fetchdat) \
static int opREP_MOVSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -373,7 +373,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_STOSB_##size(uint32_t fetchdat) \
static int opREP_STOSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -405,7 +405,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSW_##size(uint32_t fetchdat) \
static int opREP_STOSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -437,7 +437,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSL_##size(uint32_t fetchdat) \
static int opREP_STOSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int writes = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -470,7 +470,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_LODSB_##size(uint32_t fetchdat) \
static int opREP_LODSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -502,7 +502,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSW_##size(uint32_t fetchdat) \
static int opREP_LODSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -534,7 +534,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSL_##size(uint32_t fetchdat) \
static int opREP_LODSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -570,7 +570,7 @@
#define CHEK_READ(a, b, c)
#define REP_OPS_CMPS_SCAS(size, CNT_REG, SRC_REG, DEST_REG, FV) \
static int opREP_CMPSB_##size(uint32_t fetchdat) \
static int opREP_CMPSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -619,7 +619,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSW_##size(uint32_t fetchdat) \
static int opREP_CMPSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -669,7 +669,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSL_##size(uint32_t fetchdat) \
static int opREP_CMPSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
\
@@ -720,7 +720,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_SCASB_##size(uint32_t fetchdat) \
static int opREP_SCASB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -755,7 +755,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASW_##size(uint32_t fetchdat) \
static int opREP_SCASW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
@@ -790,7 +790,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASL_##size(uint32_t fetchdat) \
static int opREP_SCASL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int reads = 0, total_cycles = 0, tempz; \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \

View File

@@ -1,5 +1,5 @@
#define REP_OPS(size, CNT_REG, SRC_REG, DEST_REG) \
static int opREP_INSB_##size(uint32_t fetchdat) \
static int opREP_INSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
addr64 = 0x00000000; \
\
@@ -32,7 +32,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSW_##size(uint32_t fetchdat) \
static int opREP_INSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
addr64a[0] = addr64a[1] = 0x00000000; \
\
@@ -65,7 +65,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_INSL_##size(uint32_t fetchdat) \
static int opREP_INSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \
\
@@ -99,7 +99,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_OUTSB_##size(uint32_t fetchdat) \
static int opREP_OUTSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
if (CNT_REG > 0) { \
uint8_t temp; \
@@ -124,7 +124,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSW_##size(uint32_t fetchdat) \
static int opREP_OUTSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
if (CNT_REG > 0) { \
uint16_t temp; \
@@ -149,7 +149,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_OUTSL_##size(uint32_t fetchdat) \
static int opREP_OUTSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
if (CNT_REG > 0) { \
uint32_t temp; \
@@ -175,7 +175,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_MOVSB_##size(uint32_t fetchdat) \
static int opREP_MOVSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
addr64 = addr64_2 = 0x00000000; \
@@ -223,7 +223,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSW_##size(uint32_t fetchdat) \
static int opREP_MOVSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
addr64a[0] = addr64a[1] = 0x00000000; \
@@ -272,7 +272,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_MOVSL_##size(uint32_t fetchdat) \
static int opREP_MOVSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
addr64a[0] = addr64a[1] = addr64a[2] = addr64a[3] = 0x00000000; \
@@ -322,7 +322,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_STOSB_##size(uint32_t fetchdat) \
static int opREP_STOSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -350,7 +350,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSW_##size(uint32_t fetchdat) \
static int opREP_STOSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -378,7 +378,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_STOSL_##size(uint32_t fetchdat) \
static int opREP_STOSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -407,7 +407,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_LODSB_##size(uint32_t fetchdat) \
static int opREP_LODSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -435,7 +435,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSW_##size(uint32_t fetchdat) \
static int opREP_LODSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -463,7 +463,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_LODSL_##size(uint32_t fetchdat) \
static int opREP_LODSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int cycles_end = cycles - ((is386 && cpu_use_dynarec) ? 1000 : 100); \
if (trap) \
@@ -495,7 +495,7 @@
#define CHEK_READ(a, b, c)
#define REP_OPS_CMPS_SCAS(size, CNT_REG, SRC_REG, DEST_REG, FV) \
static int opREP_CMPSB_##size(uint32_t fetchdat) \
static int opREP_CMPSB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
\
@@ -545,7 +545,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSW_##size(uint32_t fetchdat) \
static int opREP_CMPSW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
\
@@ -596,7 +596,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_CMPSL_##size(uint32_t fetchdat) \
static int opREP_CMPSL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
\
@@ -648,7 +648,7 @@
return cpu_state.abrt; \
} \
\
static int opREP_SCASB_##size(uint32_t fetchdat) \
static int opREP_SCASB_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
int cycles_end = cycles - 1000; \
@@ -680,7 +680,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASW_##size(uint32_t fetchdat) \
static int opREP_SCASW_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
int cycles_end = cycles - 1000; \
@@ -712,7 +712,7 @@
} \
return cpu_state.abrt; \
} \
static int opREP_SCASL_##size(uint32_t fetchdat) \
static int opREP_SCASL_##size(UNUSED(uint32_t fetchdat)) \
{ \
int tempz; \
int cycles_end = cycles - 1000; \

View File

@@ -47,7 +47,7 @@
cycles -= timing_retf_rm;
static int
opRETF_a16(uint32_t fetchdat)
opRETF_a16(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -60,7 +60,7 @@ opRETF_a16(uint32_t fetchdat)
return 0;
}
static int
opRETF_a32(uint32_t fetchdat)
opRETF_a32(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -103,7 +103,7 @@ opRETF_a32_imm(uint32_t fetchdat)
}
static int
opIRET_186(uint32_t fetchdat)
opIRET_186(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -146,7 +146,7 @@ opIRET_186(uint32_t fetchdat)
}
static int
opIRET_286(uint32_t fetchdat)
opIRET_286(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -189,7 +189,7 @@ opIRET_286(uint32_t fetchdat)
}
static int
opIRET(uint32_t fetchdat)
opIRET(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -260,7 +260,7 @@ opIRET(uint32_t fetchdat)
}
static int
opIRETD(uint32_t fetchdat)
opIRETD(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);

View File

@@ -47,7 +47,7 @@
cycles -= timing_retf_rm;
static int
opRETF_a16(uint32_t fetchdat)
opRETF_a16(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -60,7 +60,7 @@ opRETF_a16(uint32_t fetchdat)
return 0;
}
static int
opRETF_a32(uint32_t fetchdat)
opRETF_a32(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -103,7 +103,7 @@ opRETF_a32_imm(uint32_t fetchdat)
}
static int
opIRET_186(uint32_t fetchdat)
opIRET_186(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -144,7 +144,7 @@ opIRET_186(uint32_t fetchdat)
}
static int
opIRET_286(uint32_t fetchdat)
opIRET_286(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -185,7 +185,7 @@ opIRET_286(uint32_t fetchdat)
}
static int
opIRET(uint32_t fetchdat)
opIRET(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);
@@ -254,7 +254,7 @@ opIRET(uint32_t fetchdat)
}
static int
opIRETD(uint32_t fetchdat)
opIRETD(UNUSED(uint32_t fetchdat))
{
int cycles_old = cycles;
UN_USED(cycles_old);

View File

@@ -1,5 +1,5 @@
#define PUSH_W_OP(reg) \
static int opPUSH_##reg(uint32_t fetchdat) \
static int opPUSH_##reg(UNUSED(uint32_t fetchdat)) \
{ \
PUSH_W(reg); \
CLOCK_CYCLES((is486) ? 1 : 2); \
@@ -8,7 +8,7 @@
}
#define PUSH_L_OP(reg) \
static int opPUSH_##reg(uint32_t fetchdat) \
static int opPUSH_##reg(UNUSED(uint32_t fetchdat)) \
{ \
PUSH_L(reg); \
CLOCK_CYCLES((is486) ? 1 : 2); \
@@ -17,7 +17,7 @@
}
#define POP_W_OP(reg) \
static int opPOP_##reg(uint32_t fetchdat) \
static int opPOP_##reg(UNUSED(uint32_t fetchdat)) \
{ \
reg = POP_W(); \
CLOCK_CYCLES((is486) ? 1 : 4); \
@@ -26,7 +26,7 @@
}
#define POP_L_OP(reg) \
static int opPOP_##reg(uint32_t fetchdat) \
static int opPOP_##reg(UNUSED(uint32_t fetchdat)) \
{ \
reg = POP_L(); \
CLOCK_CYCLES((is486) ? 1 : 4); \
@@ -71,7 +71,7 @@ POP_L_OP(EBP)
POP_L_OP(ESP)
static int
opPUSHA_w(uint32_t fetchdat)
opPUSHA_w(UNUSED(uint32_t fetchdat))
{
if (stack32) {
writememw(ss, ESP - 2, AX);
@@ -101,7 +101,7 @@ opPUSHA_w(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opPUSHA_l(uint32_t fetchdat)
opPUSHA_l(UNUSED(uint32_t fetchdat))
{
if (stack32) {
writememl(ss, ESP - 4, EAX);
@@ -132,7 +132,7 @@ opPUSHA_l(uint32_t fetchdat)
}
static int
opPOPA_w(uint32_t fetchdat)
opPOPA_w(UNUSED(uint32_t fetchdat))
{
if (stack32) {
DI = readmemw(ss, ESP);
@@ -186,7 +186,7 @@ opPOPA_w(uint32_t fetchdat)
return 0;
}
static int
opPOPA_l(uint32_t fetchdat)
opPOPA_l(UNUSED(uint32_t fetchdat))
{
if (stack32) {
EDI = readmeml(ss, ESP);
@@ -250,7 +250,7 @@ opPUSH_imm_w(uint32_t fetchdat)
return cpu_state.abrt;
}
static int
opPUSH_imm_l(uint32_t fetchdat)
opPUSH_imm_l(UNUSED(uint32_t fetchdat))
{
uint32_t val = getlong();
if (cpu_state.abrt)
@@ -550,7 +550,7 @@ opENTER_l(uint32_t fetchdat)
}
static int
opLEAVE_w(uint32_t fetchdat)
opLEAVE_w(UNUSED(uint32_t fetchdat))
{
uint32_t tempESP = ESP;
uint16_t temp;
@@ -568,7 +568,7 @@ opLEAVE_w(uint32_t fetchdat)
return 0;
}
static int
opLEAVE_l(uint32_t fetchdat)
opLEAVE_l(UNUSED(uint32_t fetchdat))
{
uint32_t tempESP = ESP;
uint32_t temp;
@@ -587,14 +587,14 @@ opLEAVE_l(uint32_t fetchdat)
}
#define PUSH_SEG_OPS(seg) \
static int opPUSH_##seg##_w(uint32_t fetchdat) \
static int opPUSH_##seg##_w(UNUSED(uint32_t fetchdat)) \
{ \
PUSH_W(seg); \
CLOCK_CYCLES(2); \
PREFETCH_RUN(2, 1, -1, 0, 0, 1, 0, 0); \
return cpu_state.abrt; \
} \
static int opPUSH_##seg##_l(uint32_t fetchdat) \
static int opPUSH_##seg##_l(UNUSED(uint32_t fetchdat)) \
{ \
PUSH_L(seg); \
CLOCK_CYCLES(2); \
@@ -603,7 +603,7 @@ opLEAVE_l(uint32_t fetchdat)
}
#define POP_SEG_OPS(seg, realseg) \
static int opPOP_##seg##_w(uint32_t fetchdat) \
static int opPOP_##seg##_w(UNUSED(uint32_t fetchdat)) \
{ \
uint16_t temp_seg; \
uint32_t temp_esp = ESP; \
@@ -617,7 +617,7 @@ opLEAVE_l(uint32_t fetchdat)
PREFETCH_RUN(is486 ? 3 : 7, 1, -1, 0, 0, 1, 0, 0); \
return cpu_state.abrt; \
} \
static int opPOP_##seg##_l(uint32_t fetchdat) \
static int opPOP_##seg##_l(UNUSED(uint32_t fetchdat)) \
{ \
uint32_t temp_seg; \
uint32_t temp_esp = ESP; \

View File

@@ -1,5 +1,5 @@
static int
opMOVSB_a16(uint32_t fetchdat)
opMOVSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -35,7 +35,7 @@ opMOVSB_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSB_a32(uint32_t fetchdat)
opMOVSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -71,7 +71,7 @@ opMOVSB_a32(uint32_t fetchdat)
}
static int
opMOVSW_a16(uint32_t fetchdat)
opMOVSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -107,7 +107,7 @@ opMOVSW_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSW_a32(uint32_t fetchdat)
opMOVSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -144,7 +144,7 @@ opMOVSW_a32(uint32_t fetchdat)
}
static int
opMOVSL_a16(uint32_t fetchdat)
opMOVSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -180,7 +180,7 @@ opMOVSL_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSL_a32(uint32_t fetchdat)
opMOVSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -217,7 +217,7 @@ opMOVSL_a32(uint32_t fetchdat)
}
static int
opCMPSB_a16(uint32_t fetchdat)
opCMPSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t src;
uint8_t dst;
@@ -258,7 +258,7 @@ opCMPSB_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSB_a32(uint32_t fetchdat)
opCMPSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t src;
uint8_t dst;
@@ -300,7 +300,7 @@ opCMPSB_a32(uint32_t fetchdat)
}
static int
opCMPSW_a16(uint32_t fetchdat)
opCMPSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t src;
uint16_t dst;
@@ -342,7 +342,7 @@ opCMPSW_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSW_a32(uint32_t fetchdat)
opCMPSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t src;
uint16_t dst;
@@ -385,7 +385,7 @@ opCMPSW_a32(uint32_t fetchdat)
}
static int
opCMPSL_a16(uint32_t fetchdat)
opCMPSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t src;
uint32_t dst;
@@ -427,7 +427,7 @@ opCMPSL_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSL_a32(uint32_t fetchdat)
opCMPSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t src;
uint32_t dst;
@@ -470,7 +470,7 @@ opCMPSL_a32(uint32_t fetchdat)
}
static int
opSTOSB_a16(uint32_t fetchdat)
opSTOSB_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI);
@@ -486,7 +486,7 @@ opSTOSB_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSB_a32(uint32_t fetchdat)
opSTOSB_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI);
@@ -503,7 +503,7 @@ opSTOSB_a32(uint32_t fetchdat)
}
static int
opSTOSW_a16(uint32_t fetchdat)
opSTOSW_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI + 1UL);
@@ -519,7 +519,7 @@ opSTOSW_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSW_a32(uint32_t fetchdat)
opSTOSW_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI + 1UL);
@@ -536,7 +536,7 @@ opSTOSW_a32(uint32_t fetchdat)
}
static int
opSTOSL_a16(uint32_t fetchdat)
opSTOSL_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI + 3UL);
@@ -552,7 +552,7 @@ opSTOSL_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSL_a32(uint32_t fetchdat)
opSTOSL_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI + 3UL);
@@ -569,7 +569,7 @@ opSTOSL_a32(uint32_t fetchdat)
}
static int
opLODSB_a16(uint32_t fetchdat)
opLODSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -588,7 +588,7 @@ opLODSB_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSB_a32(uint32_t fetchdat)
opLODSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -608,7 +608,7 @@ opLODSB_a32(uint32_t fetchdat)
}
static int
opLODSW_a16(uint32_t fetchdat)
opLODSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -627,7 +627,7 @@ opLODSW_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSW_a32(uint32_t fetchdat)
opLODSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -647,7 +647,7 @@ opLODSW_a32(uint32_t fetchdat)
}
static int
opLODSL_a16(uint32_t fetchdat)
opLODSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -666,7 +666,7 @@ opLODSL_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSL_a32(uint32_t fetchdat)
opLODSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -686,7 +686,7 @@ opLODSL_a32(uint32_t fetchdat)
}
static int
opSCASB_a16(uint32_t fetchdat)
opSCASB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -705,7 +705,7 @@ opSCASB_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASB_a32(uint32_t fetchdat)
opSCASB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -725,7 +725,7 @@ opSCASB_a32(uint32_t fetchdat)
}
static int
opSCASW_a16(uint32_t fetchdat)
opSCASW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -744,7 +744,7 @@ opSCASW_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASW_a32(uint32_t fetchdat)
opSCASW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -764,7 +764,7 @@ opSCASW_a32(uint32_t fetchdat)
}
static int
opSCASL_a16(uint32_t fetchdat)
opSCASL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -783,7 +783,7 @@ opSCASL_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASL_a32(uint32_t fetchdat)
opSCASL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -803,7 +803,7 @@ opSCASL_a32(uint32_t fetchdat)
}
static int
opINSB_a16(uint32_t fetchdat)
opINSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -829,7 +829,7 @@ opINSB_a16(uint32_t fetchdat)
return 0;
}
static int
opINSB_a32(uint32_t fetchdat)
opINSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -856,7 +856,7 @@ opINSB_a32(uint32_t fetchdat)
}
static int
opINSW_a16(uint32_t fetchdat)
opINSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -882,7 +882,7 @@ opINSW_a16(uint32_t fetchdat)
return 0;
}
static int
opINSW_a32(uint32_t fetchdat)
opINSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -909,7 +909,7 @@ opINSW_a32(uint32_t fetchdat)
}
static int
opINSL_a16(uint32_t fetchdat)
opINSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -935,7 +935,7 @@ opINSL_a16(uint32_t fetchdat)
return 0;
}
static int
opINSL_a32(uint32_t fetchdat)
opINSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -962,7 +962,7 @@ opINSL_a32(uint32_t fetchdat)
}
static int
opOUTSB_a16(uint32_t fetchdat)
opOUTSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -982,7 +982,7 @@ opOUTSB_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSB_a32(uint32_t fetchdat)
opOUTSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -1003,7 +1003,7 @@ opOUTSB_a32(uint32_t fetchdat)
}
static int
opOUTSW_a16(uint32_t fetchdat)
opOUTSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -1023,7 +1023,7 @@ opOUTSW_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSW_a32(uint32_t fetchdat)
opOUTSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -1044,7 +1044,7 @@ opOUTSW_a32(uint32_t fetchdat)
}
static int
opOUTSL_a16(uint32_t fetchdat)
opOUTSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -1064,7 +1064,7 @@ opOUTSL_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSL_a32(uint32_t fetchdat)
opOUTSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;

View File

@@ -1,5 +1,5 @@
static int
opMOVSB_a16(uint32_t fetchdat)
opMOVSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -35,7 +35,7 @@ opMOVSB_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSB_a32(uint32_t fetchdat)
opMOVSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -71,7 +71,7 @@ opMOVSB_a32(uint32_t fetchdat)
}
static int
opMOVSW_a16(uint32_t fetchdat)
opMOVSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -107,7 +107,7 @@ opMOVSW_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSW_a32(uint32_t fetchdat)
opMOVSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -144,7 +144,7 @@ opMOVSW_a32(uint32_t fetchdat)
}
static int
opMOVSL_a16(uint32_t fetchdat)
opMOVSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -180,7 +180,7 @@ opMOVSL_a16(uint32_t fetchdat)
return 0;
}
static int
opMOVSL_a32(uint32_t fetchdat)
opMOVSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -217,7 +217,7 @@ opMOVSL_a32(uint32_t fetchdat)
}
static int
opCMPSB_a16(uint32_t fetchdat)
opCMPSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t src;
uint8_t dst;
@@ -254,7 +254,7 @@ opCMPSB_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSB_a32(uint32_t fetchdat)
opCMPSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t src;
uint8_t dst;
@@ -292,7 +292,7 @@ opCMPSB_a32(uint32_t fetchdat)
}
static int
opCMPSW_a16(uint32_t fetchdat)
opCMPSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t src;
uint16_t dst;
@@ -330,7 +330,7 @@ opCMPSW_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSW_a32(uint32_t fetchdat)
opCMPSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t src;
uint16_t dst;
@@ -369,7 +369,7 @@ opCMPSW_a32(uint32_t fetchdat)
}
static int
opCMPSL_a16(uint32_t fetchdat)
opCMPSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t src;
uint32_t dst;
@@ -407,7 +407,7 @@ opCMPSL_a16(uint32_t fetchdat)
return 0;
}
static int
opCMPSL_a32(uint32_t fetchdat)
opCMPSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t src;
uint32_t dst;
@@ -446,7 +446,7 @@ opCMPSL_a32(uint32_t fetchdat)
}
static int
opSTOSB_a16(uint32_t fetchdat)
opSTOSB_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI);
@@ -462,7 +462,7 @@ opSTOSB_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSB_a32(uint32_t fetchdat)
opSTOSB_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI);
@@ -479,7 +479,7 @@ opSTOSB_a32(uint32_t fetchdat)
}
static int
opSTOSW_a16(uint32_t fetchdat)
opSTOSW_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI + 1UL);
@@ -495,7 +495,7 @@ opSTOSW_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSW_a32(uint32_t fetchdat)
opSTOSW_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI + 1UL);
@@ -512,7 +512,7 @@ opSTOSW_a32(uint32_t fetchdat)
}
static int
opSTOSL_a16(uint32_t fetchdat)
opSTOSL_a16(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, DI, DI + 3UL);
@@ -528,7 +528,7 @@ opSTOSL_a16(uint32_t fetchdat)
return 0;
}
static int
opSTOSL_a32(uint32_t fetchdat)
opSTOSL_a32(UNUSED(uint32_t fetchdat))
{
SEG_CHECK_WRITE(&cpu_state.seg_es);
CHECK_WRITE(&cpu_state.seg_es, EDI, EDI + 3UL);
@@ -545,7 +545,7 @@ opSTOSL_a32(uint32_t fetchdat)
}
static int
opLODSB_a16(uint32_t fetchdat)
opLODSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -564,7 +564,7 @@ opLODSB_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSB_a32(uint32_t fetchdat)
opLODSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -584,7 +584,7 @@ opLODSB_a32(uint32_t fetchdat)
}
static int
opLODSW_a16(uint32_t fetchdat)
opLODSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -603,7 +603,7 @@ opLODSW_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSW_a32(uint32_t fetchdat)
opLODSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -623,7 +623,7 @@ opLODSW_a32(uint32_t fetchdat)
}
static int
opLODSL_a16(uint32_t fetchdat)
opLODSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -642,7 +642,7 @@ opLODSL_a16(uint32_t fetchdat)
return 0;
}
static int
opLODSL_a32(uint32_t fetchdat)
opLODSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -662,7 +662,7 @@ opLODSL_a32(uint32_t fetchdat)
}
static int
opSCASB_a16(uint32_t fetchdat)
opSCASB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -681,7 +681,7 @@ opSCASB_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASB_a32(uint32_t fetchdat)
opSCASB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -701,7 +701,7 @@ opSCASB_a32(uint32_t fetchdat)
}
static int
opSCASW_a16(uint32_t fetchdat)
opSCASW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -720,7 +720,7 @@ opSCASW_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASW_a32(uint32_t fetchdat)
opSCASW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -740,7 +740,7 @@ opSCASW_a32(uint32_t fetchdat)
}
static int
opSCASL_a16(uint32_t fetchdat)
opSCASL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -759,7 +759,7 @@ opSCASL_a16(uint32_t fetchdat)
return 0;
}
static int
opSCASL_a32(uint32_t fetchdat)
opSCASL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -779,7 +779,7 @@ opSCASL_a32(uint32_t fetchdat)
}
static int
opINSB_a16(uint32_t fetchdat)
opINSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -805,7 +805,7 @@ opINSB_a16(uint32_t fetchdat)
return 0;
}
static int
opINSB_a32(uint32_t fetchdat)
opINSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -832,7 +832,7 @@ opINSB_a32(uint32_t fetchdat)
}
static int
opINSW_a16(uint32_t fetchdat)
opINSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -858,7 +858,7 @@ opINSW_a16(uint32_t fetchdat)
return 0;
}
static int
opINSW_a32(uint32_t fetchdat)
opINSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -885,7 +885,7 @@ opINSW_a32(uint32_t fetchdat)
}
static int
opINSL_a16(uint32_t fetchdat)
opINSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -911,7 +911,7 @@ opINSL_a16(uint32_t fetchdat)
return 0;
}
static int
opINSL_a32(uint32_t fetchdat)
opINSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -938,7 +938,7 @@ opINSL_a32(uint32_t fetchdat)
}
static int
opOUTSB_a16(uint32_t fetchdat)
opOUTSB_a16(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -958,7 +958,7 @@ opOUTSB_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSB_a32(uint32_t fetchdat)
opOUTSB_a32(UNUSED(uint32_t fetchdat))
{
uint8_t temp;
@@ -979,7 +979,7 @@ opOUTSB_a32(uint32_t fetchdat)
}
static int
opOUTSW_a16(uint32_t fetchdat)
opOUTSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -999,7 +999,7 @@ opOUTSW_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSW_a32(uint32_t fetchdat)
opOUTSW_a32(UNUSED(uint32_t fetchdat))
{
uint16_t temp;
@@ -1020,7 +1020,7 @@ opOUTSW_a32(uint32_t fetchdat)
}
static int
opOUTSL_a16(uint32_t fetchdat)
opOUTSL_a16(UNUSED(uint32_t fetchdat))
{
uint32_t temp;
@@ -1040,7 +1040,7 @@ opOUTSL_a16(uint32_t fetchdat)
return 0;
}
static int
opOUTSL_a32(uint32_t fetchdat)
opOUTSL_a32(UNUSED(uint32_t fetchdat))
{
uint32_t temp;

View File

@@ -116,7 +116,7 @@ opXCHG_l_a32(uint32_t fetchdat)
}
static int
opXCHG_AX_BX(uint32_t fetchdat)
opXCHG_AX_BX(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = BX;
@@ -126,7 +126,7 @@ opXCHG_AX_BX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_CX(uint32_t fetchdat)
opXCHG_AX_CX(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = CX;
@@ -136,7 +136,7 @@ opXCHG_AX_CX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_DX(uint32_t fetchdat)
opXCHG_AX_DX(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = DX;
@@ -146,7 +146,7 @@ opXCHG_AX_DX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_SI(uint32_t fetchdat)
opXCHG_AX_SI(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = SI;
@@ -156,7 +156,7 @@ opXCHG_AX_SI(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_DI(uint32_t fetchdat)
opXCHG_AX_DI(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = DI;
@@ -166,7 +166,7 @@ opXCHG_AX_DI(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_BP(uint32_t fetchdat)
opXCHG_AX_BP(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = BP;
@@ -176,7 +176,7 @@ opXCHG_AX_BP(uint32_t fetchdat)
return 0;
}
static int
opXCHG_AX_SP(uint32_t fetchdat)
opXCHG_AX_SP(UNUSED(uint32_t fetchdat))
{
uint16_t temp = AX;
AX = SP;
@@ -187,7 +187,7 @@ opXCHG_AX_SP(uint32_t fetchdat)
}
static int
opXCHG_EAX_EBX(uint32_t fetchdat)
opXCHG_EAX_EBX(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = EBX;
@@ -197,7 +197,7 @@ opXCHG_EAX_EBX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_ECX(uint32_t fetchdat)
opXCHG_EAX_ECX(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = ECX;
@@ -207,7 +207,7 @@ opXCHG_EAX_ECX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_EDX(uint32_t fetchdat)
opXCHG_EAX_EDX(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = EDX;
@@ -217,7 +217,7 @@ opXCHG_EAX_EDX(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_ESI(uint32_t fetchdat)
opXCHG_EAX_ESI(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = ESI;
@@ -227,7 +227,7 @@ opXCHG_EAX_ESI(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_EDI(uint32_t fetchdat)
opXCHG_EAX_EDI(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = EDI;
@@ -237,7 +237,7 @@ opXCHG_EAX_EDI(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_EBP(uint32_t fetchdat)
opXCHG_EAX_EBP(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = EBP;
@@ -247,7 +247,7 @@ opXCHG_EAX_EBP(uint32_t fetchdat)
return 0;
}
static int
opXCHG_EAX_ESP(uint32_t fetchdat)
opXCHG_EAX_ESP(UNUSED(uint32_t fetchdat))
{
uint32_t temp = EAX;
EAX = ESP;
@@ -258,7 +258,7 @@ opXCHG_EAX_ESP(uint32_t fetchdat)
}
#define opBSWAP(reg) \
static int opBSWAP_##reg(uint32_t fetchdat) \
static int opBSWAP_##reg(UNUSED(uint32_t fetchdat)) \
{ \
reg = (reg >> 24) | ((reg >> 8) & 0xff00) | ((reg << 8) & 0xff0000) | ((reg << 24) & 0xff000000); \
CLOCK_CYCLES(1); \
@@ -275,4 +275,4 @@ opBSWAP(ESI)
opBSWAP(EDI)
opBSWAP(EBP)
opBSWAP(ESP)
// clang-format on
// clang-format on

View File

@@ -20,6 +20,7 @@
#include "softfloat3e/config.h"
#include "softfloat3e/fpu_trans.h"
#include "softfloat3e/specialize.h"
#include <86box/plat_unused.h>
uint32_t x87_pc_off;
uint32_t x87_op_off;
@@ -312,7 +313,7 @@ FPU_write_eflags_fpu_compare(int float_relation)
}
uint16_t
FPU_exception(uint32_t fetchdat, uint16_t exceptions, int store)
FPU_exception(UNUSED(uint32_t fetchdat), uint16_t exceptions, int store)
{
uint16_t status;
uint16_t unmasked;

View File

@@ -542,7 +542,7 @@ op_nofpu_a32(uint32_t fetchdat)
#ifdef FPU_8087
static int
FPU_ILLEGAL_a16(uint32_t fetchdat)
FPU_ILLEGAL_a16(UNUSED(uint32_t fetchdat))
{
geteaw();
wait(timing_rr, 0);

View File

@@ -1,5 +1,5 @@
#define opFPU(name, optype, a_size, load_var, get, use_var, cycle_postfix) \
static int opFADD##name##_a##a_size(uint32_t fetchdat) \
static int opFADD##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -18,7 +18,7 @@
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fadd##cycle_postfix) : ((x87_concurrency.fadd##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFCOM##name##_a##a_size(uint32_t fetchdat) \
static int opFCOM##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -27,13 +27,13 @@
load_var = get(); \
if (cpu_state.abrt) \
return 1; \
cpu_state.npxs &= ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3); \
cpu_state.npxs &= ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3); \
cpu_state.npxs |= x87_compare(ST(0), (double) use_var); \
CLOCK_CYCLES_FPU((fpu_type >= FPU_487SX) ? (x87_timings.fcom##cycle_postfix) : ((x87_timings.fcom##cycle_postfix) * cpu_multi)); \
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fcom##cycle_postfix) : ((x87_concurrency.fcom##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFCOMP##name##_a##a_size(uint32_t fetchdat) \
static int opFCOMP##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -42,14 +42,14 @@
load_var = get(); \
if (cpu_state.abrt) \
return 1; \
cpu_state.npxs &= ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3); \
cpu_state.npxs &= ~(FPU_SW_C0 | FPU_SW_C2 | FPU_SW_C3); \
cpu_state.npxs |= x87_compare(ST(0), (double) use_var); \
x87_pop(); \
CLOCK_CYCLES_FPU((fpu_type >= FPU_487SX) ? (x87_timings.fcom##cycle_postfix) : ((x87_timings.fcom##cycle_postfix) * cpu_multi)); \
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fcom##cycle_postfix) : ((x87_concurrency.fcom##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFDIV##name##_a##a_size(uint32_t fetchdat) \
static int opFDIV##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -64,7 +64,7 @@
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fadd##cycle_postfix) : ((x87_concurrency.fadd##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFDIVR##name##_a##a_size(uint32_t fetchdat) \
static int opFDIVR##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -79,7 +79,7 @@
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fdiv##cycle_postfix) : ((x87_concurrency.fdiv##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFMUL##name##_a##a_size(uint32_t fetchdat) \
static int opFMUL##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -94,7 +94,7 @@
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fmul##cycle_postfix) : ((x87_concurrency.fmul##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFSUB##name##_a##a_size(uint32_t fetchdat) \
static int opFSUB##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -109,7 +109,7 @@
CONCURRENCY_CYCLES((fpu_type >= FPU_487SX) ? (x87_concurrency.fadd##cycle_postfix) : ((x87_concurrency.fadd##cycle_postfix) * cpu_multi)); \
return 0; \
} \
static int opFSUBR##name##_a##a_size(uint32_t fetchdat) \
static int opFSUBR##name##_a##a_size(UNUSED(uint32_t fetchdat)) \
{ \
optype t; \
FP_ENTER(); \
@@ -208,7 +208,7 @@ opFCOMP(uint32_t fetchdat)
}
static int
opFCOMPP(uint32_t fetchdat)
opFCOMPP(UNUSED(uint32_t fetchdat))
{
uint64_t *p, *q;
FP_ENTER();
@@ -229,7 +229,7 @@ opFCOMPP(uint32_t fetchdat)
}
#ifndef FPU_8087
static int
opFUCOMPP(uint32_t fetchdat)
opFUCOMPP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;

View File

@@ -17,7 +17,7 @@
* Copyright 2016-2019 Miran Grca.
*/
static int
opFILDiw_a16(uint32_t fetchdat)
opFILDiw_a16(UNUSED(uint32_t fetchdat))
{
int16_t temp;
FP_ENTER();
@@ -50,7 +50,7 @@ opFILDiw_a32(uint32_t fetchdat)
#endif
static int
opFISTiw_a16(uint32_t fetchdat)
opFISTiw_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -75,7 +75,7 @@ opFISTiw_a32(uint32_t fetchdat)
#endif
static int
opFISTPiw_a16(uint32_t fetchdat)
opFISTPiw_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -106,7 +106,7 @@ opFISTPiw_a32(uint32_t fetchdat)
#endif
static int
opFILDiq_a16(uint32_t fetchdat)
opFILDiq_a16(UNUSED(uint32_t fetchdat))
{
int64_t temp64;
FP_ENTER();
@@ -145,7 +145,7 @@ opFILDiq_a32(uint32_t fetchdat)
#endif
static int
FBLD_a16(uint32_t fetchdat)
FBLD_a16(UNUSED(uint32_t fetchdat))
{
uint16_t load_reg_hi = 0xffff;
uint64_t load_reg_lo = BX_CONST64(0xC000000000000000);
@@ -228,7 +228,7 @@ FBLD_a32(uint32_t fetchdat)
#endif
static int
FBSTP_a16(uint32_t fetchdat)
FBSTP_a16(UNUSED(uint32_t fetchdat))
{
double dt;
double tempd;
@@ -296,7 +296,7 @@ FBSTP_a32(uint32_t fetchdat)
#endif
static int
FISTPiq_a16(uint32_t fetchdat)
FISTPiq_a16(UNUSED(uint32_t fetchdat))
{
int64_t temp64;
FP_ENTER();
@@ -337,7 +337,7 @@ FISTPiq_a32(uint32_t fetchdat)
#endif
static int
opFILDil_a16(uint32_t fetchdat)
opFILDil_a16(UNUSED(uint32_t fetchdat))
{
int32_t templ;
FP_ENTER();
@@ -370,7 +370,7 @@ opFILDil_a32(uint32_t fetchdat)
#endif
static int
opFISTil_a16(uint32_t fetchdat)
opFISTil_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -395,7 +395,7 @@ opFISTil_a32(uint32_t fetchdat)
#endif
static int
opFISTPil_a16(uint32_t fetchdat)
opFISTPil_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -426,7 +426,7 @@ opFISTPil_a32(uint32_t fetchdat)
#endif
static int
opFLDe_a16(uint32_t fetchdat)
opFLDe_a16(UNUSED(uint32_t fetchdat))
{
double t;
FP_ENTER();
@@ -459,7 +459,7 @@ opFLDe_a32(uint32_t fetchdat)
#endif
static int
opFSTPe_a16(uint32_t fetchdat)
opFSTPe_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -490,7 +490,7 @@ opFSTPe_a32(uint32_t fetchdat)
#endif
static int
opFLDd_a16(uint32_t fetchdat)
opFLDd_a16(UNUSED(uint32_t fetchdat))
{
x87_td t;
FP_ENTER();
@@ -523,7 +523,7 @@ opFLDd_a32(uint32_t fetchdat)
#endif
static int
opFSTd_a16(uint32_t fetchdat)
opFSTd_a16(UNUSED(uint32_t fetchdat))
{
x87_td t;
FP_ENTER();
@@ -552,7 +552,7 @@ opFSTd_a32(uint32_t fetchdat)
#endif
static int
opFSTPd_a16(uint32_t fetchdat)
opFSTPd_a16(UNUSED(uint32_t fetchdat))
{
x87_td t;
FP_ENTER();
@@ -587,7 +587,7 @@ opFSTPd_a32(uint32_t fetchdat)
#endif
static int
opFLDs_a16(uint32_t fetchdat)
opFLDs_a16(UNUSED(uint32_t fetchdat))
{
x87_ts ts;
FP_ENTER();
@@ -620,7 +620,7 @@ opFLDs_a32(uint32_t fetchdat)
#endif
static int
opFSTs_a16(uint32_t fetchdat)
opFSTs_a16(UNUSED(uint32_t fetchdat))
{
x87_ts ts;
FP_ENTER();
@@ -649,7 +649,7 @@ opFSTs_a32(uint32_t fetchdat)
#endif
static int
opFSTPs_a16(uint32_t fetchdat)
opFSTPs_a16(UNUSED(uint32_t fetchdat))
{
x87_ts ts;
FP_ENTER();

View File

@@ -12,7 +12,7 @@ opFI(uint32_t fetchdat)
}
#else
static int
opFSTSW_AX(uint32_t fetchdat)
opFSTSW_AX(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -24,7 +24,7 @@ opFSTSW_AX(uint32_t fetchdat)
#endif
static int
opFNOP(uint32_t fetchdat)
opFNOP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -34,7 +34,7 @@ opFNOP(uint32_t fetchdat)
}
static int
opFXTRACT(uint32_t fetchdat)
opFXTRACT(UNUSED(uint32_t fetchdat))
{
x87_conv_t test;
int64_t exp80;
@@ -56,7 +56,7 @@ opFXTRACT(uint32_t fetchdat)
}
static int
opFCLEX(uint32_t fetchdat)
opFCLEX(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -67,7 +67,7 @@ opFCLEX(uint32_t fetchdat)
}
static int
opFINIT(uint32_t fetchdat)
opFINIT(UNUSED(uint32_t fetchdat))
{
uint64_t *p;
FP_ENTER();
@@ -208,7 +208,7 @@ FSTOR(void)
return cpu_state.abrt;
}
static int
opFSTOR_a16(uint32_t fetchdat)
opFSTOR_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -429,7 +429,7 @@ FSAVE(void)
return cpu_state.abrt;
}
static int
opFSAVE_a16(uint32_t fetchdat)
opFSAVE_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -450,7 +450,7 @@ opFSAVE_a32(uint32_t fetchdat)
#endif
static int
opFSTSW_a16(uint32_t fetchdat)
opFSTSW_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -516,7 +516,7 @@ opFXCH(uint32_t fetchdat)
}
static int
opFCHS(uint32_t fetchdat)
opFCHS(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -528,7 +528,7 @@ opFCHS(uint32_t fetchdat)
}
static int
opFABS(uint32_t fetchdat)
opFABS(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -540,7 +540,7 @@ opFABS(uint32_t fetchdat)
}
static int
opFTST(uint32_t fetchdat)
opFTST(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -555,7 +555,7 @@ opFTST(uint32_t fetchdat)
}
static int
opFXAM(uint32_t fetchdat)
opFXAM(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -579,7 +579,7 @@ opFXAM(uint32_t fetchdat)
}
static int
opFLD1(uint32_t fetchdat)
opFLD1(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -590,7 +590,7 @@ opFLD1(uint32_t fetchdat)
}
static int
opFLDL2T(uint32_t fetchdat)
opFLDL2T(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -601,7 +601,7 @@ opFLDL2T(uint32_t fetchdat)
}
static int
opFLDL2E(uint32_t fetchdat)
opFLDL2E(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -612,7 +612,7 @@ opFLDL2E(uint32_t fetchdat)
}
static int
opFLDPI(uint32_t fetchdat)
opFLDPI(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -623,7 +623,7 @@ opFLDPI(uint32_t fetchdat)
}
static int
opFLDEG2(uint32_t fetchdat)
opFLDEG2(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -634,7 +634,7 @@ opFLDEG2(uint32_t fetchdat)
}
static int
opFLDLN2(uint32_t fetchdat)
opFLDLN2(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -645,7 +645,7 @@ opFLDLN2(uint32_t fetchdat)
}
static int
opFLDZ(uint32_t fetchdat)
opFLDZ(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -657,7 +657,7 @@ opFLDZ(uint32_t fetchdat)
}
static int
opF2XM1(uint32_t fetchdat)
opF2XM1(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -669,7 +669,7 @@ opF2XM1(uint32_t fetchdat)
}
static int
opFYL2X(uint32_t fetchdat)
opFYL2X(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -682,7 +682,7 @@ opFYL2X(uint32_t fetchdat)
}
static int
opFYL2XP1(uint32_t fetchdat)
opFYL2XP1(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -695,7 +695,7 @@ opFYL2XP1(uint32_t fetchdat)
}
static int
opFPTAN(uint32_t fetchdat)
opFPTAN(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -709,7 +709,7 @@ opFPTAN(uint32_t fetchdat)
}
static int
opFPATAN(uint32_t fetchdat)
opFPATAN(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -722,7 +722,7 @@ opFPATAN(uint32_t fetchdat)
}
static int
opFDECSTP(uint32_t fetchdat)
opFDECSTP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -737,7 +737,7 @@ opFDECSTP(uint32_t fetchdat)
}
static int
opFINCSTP(uint32_t fetchdat)
opFINCSTP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -752,7 +752,7 @@ opFINCSTP(uint32_t fetchdat)
}
static int
opFPREM(uint32_t fetchdat)
opFPREM(UNUSED(uint32_t fetchdat))
{
int64_t temp64;
FP_ENTER();
@@ -773,7 +773,7 @@ opFPREM(uint32_t fetchdat)
}
static int
opFPREM1(uint32_t fetchdat)
opFPREM1(UNUSED(uint32_t fetchdat))
{
int64_t temp64;
FP_ENTER();
@@ -794,7 +794,7 @@ opFPREM1(uint32_t fetchdat)
}
static int
opFSQRT(uint32_t fetchdat)
opFSQRT(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -807,7 +807,7 @@ opFSQRT(uint32_t fetchdat)
#ifndef FPU_8087
static int
opFSINCOS(uint32_t fetchdat)
opFSINCOS(UNUSED(uint32_t fetchdat))
{
double td;
FP_ENTER();
@@ -824,7 +824,7 @@ opFSINCOS(uint32_t fetchdat)
#endif
static int
opFRNDINT(uint32_t fetchdat)
opFRNDINT(UNUSED(uint32_t fetchdat))
{
double dst0;
@@ -839,7 +839,7 @@ opFRNDINT(uint32_t fetchdat)
}
static int
opFSCALE(uint32_t fetchdat)
opFSCALE(UNUSED(uint32_t fetchdat))
{
int64_t temp64;
FP_ENTER();
@@ -855,7 +855,7 @@ opFSCALE(uint32_t fetchdat)
#ifndef FPU_8087
static int
opFSIN(uint32_t fetchdat)
opFSIN(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -868,7 +868,7 @@ opFSIN(uint32_t fetchdat)
}
static int
opFCOS(uint32_t fetchdat)
opFCOS(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -909,7 +909,7 @@ FLDENV(void)
}
static int
opFLDENV_a16(uint32_t fetchdat)
opFLDENV_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -930,7 +930,7 @@ opFLDENV_a32(uint32_t fetchdat)
#endif
static int
opFLDCW_a16(uint32_t fetchdat)
opFLDCW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
FP_ENTER();
@@ -1011,7 +1011,7 @@ FSTENV(void)
}
static int
opFSTENV_a16(uint32_t fetchdat)
opFSTENV_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -1032,7 +1032,7 @@ opFSTENV_a32(uint32_t fetchdat)
#endif
static int
opFSTCW_a16(uint32_t fetchdat)
opFSTCW_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);

View File

@@ -235,7 +235,7 @@ fpu_load_environment(void)
}
static int
sf_FLDCW_a16(uint32_t fetchdat)
sf_FLDCW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t tempw;
@@ -288,7 +288,7 @@ sf_FLDCW_a32(uint32_t fetchdat)
#endif
static int
sf_FNSTCW_a16(uint32_t fetchdat)
sf_FNSTCW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t cwd = i387_get_control_word();
@@ -317,7 +317,7 @@ sf_FNSTCW_a32(uint32_t fetchdat)
#endif
static int
sf_FNSTSW_a16(uint32_t fetchdat)
sf_FNSTSW_a16(UNUSED(uint32_t fetchdat))
{
uint16_t swd = i387_get_status_word();
@@ -359,7 +359,7 @@ sf_FI(uint32_t fetchdat)
}
#else
static int
sf_FNSTSW_AX(uint32_t fetchdat)
sf_FNSTSW_AX(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -371,7 +371,7 @@ sf_FNSTSW_AX(uint32_t fetchdat)
#endif
static int
sf_FRSTOR_a16(uint32_t fetchdat)
sf_FRSTOR_a16(UNUSED(uint32_t fetchdat))
{
floatx80 tmp;
int offset;
@@ -414,7 +414,7 @@ sf_FRSTOR_a32(uint32_t fetchdat)
#endif
static int
sf_FNSAVE_a16(uint32_t fetchdat)
sf_FNSAVE_a16(UNUSED(uint32_t fetchdat))
{
floatx80 stn;
int offset;
@@ -488,7 +488,7 @@ sf_FNSAVE_a32(uint32_t fetchdat)
#endif
static int
sf_FNCLEX(uint32_t fetchdat)
sf_FNCLEX(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -499,7 +499,7 @@ sf_FNCLEX(uint32_t fetchdat)
}
static int
sf_FNINIT(uint32_t fetchdat)
sf_FNINIT(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
cpu_state.pc++;
@@ -525,7 +525,7 @@ sf_FNINIT(uint32_t fetchdat)
}
static int
sf_FLDENV_a16(uint32_t fetchdat)
sf_FLDENV_a16(UNUSED(uint32_t fetchdat))
{
int tag;
@@ -572,7 +572,7 @@ sf_FLDENV_a32(uint32_t fetchdat)
#endif
static int
sf_FNSTENV_a16(uint32_t fetchdat)
sf_FNSTENV_a16(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
fetch_ea_16(fetchdat);
@@ -605,7 +605,7 @@ sf_FNSTENV_a32(uint32_t fetchdat)
#endif
static int
sf_FNOP(uint32_t fetchdat)
sf_FNOP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
FPU_check_pending_exceptions();

View File

@@ -1,7 +1,7 @@
#define sf_FPU(name, optype, a_size, load_var, rw, use_var, is_nan, cycle_postfix) \
static int sf_FADD##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \
@@ -31,7 +31,7 @@ next_ins:
} \
static int sf_FDIV##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \
@@ -61,7 +61,7 @@ next_ins:
} \
static int sf_FDIVR##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \
@@ -91,7 +91,7 @@ next_ins:
} \
static int sf_FMUL##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \
@@ -121,7 +121,7 @@ next_ins:
} \
static int sf_FSUB##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \
@@ -151,7 +151,7 @@ next_ins:
} \
static int sf_FSUBR##name##_a##a_size(uint32_t fetchdat) \
{ \
floatx80 a, result; \
floatx80 a, result; \
struct softfloat_status_t status; \
optype temp; \
FP_ENTER(); \

View File

@@ -460,7 +460,7 @@ sf_FTST(uint32_t fetchdat)
}
static int
sf_FXAM(uint32_t fetchdat)
sf_FXAM(UNUSED(uint32_t fetchdat))
{
floatx80 reg;
int sign;

View File

@@ -81,7 +81,7 @@ sf_FABS(uint32_t fetchdat)
}
static int
sf_FDECSTP(uint32_t fetchdat)
sf_FDECSTP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
FPU_check_pending_exceptions();
@@ -94,7 +94,7 @@ sf_FDECSTP(uint32_t fetchdat)
}
static int
sf_FINCSTP(uint32_t fetchdat)
sf_FINCSTP(UNUSED(uint32_t fetchdat))
{
FP_ENTER();
FPU_check_pending_exceptions();

View File

@@ -313,7 +313,7 @@ mtouch_process_commands(mouse_microtouch_t *dev)
}
static void
mtouch_write(serial_t *serial, void *priv, uint8_t data)
mtouch_write(UNUSED(serial_t *serial), void *priv, uint8_t data)
{
mouse_microtouch_t *dev = (mouse_microtouch_t *) priv;
@@ -495,7 +495,7 @@ mtouch_poll_global(void)
}
void *
mtouch_init(const device_t *info)
mtouch_init(UNUSED(const device_t *info))
{
mouse_microtouch_t *dev = calloc(1, sizeof(mouse_microtouch_t));

View File

@@ -30,7 +30,7 @@
#include <86box/plat_unused.h>
static uint8_t
nec_mate_unk_read(UNUSED(uint16_t addr), void *priv)
nec_mate_unk_read(UNUSED(uint16_t addr), UNUSED(void *priv))
{
/* Expected by this NEC machine.
@@ -49,7 +49,7 @@ nec_mate_unk_close(void *priv)
}
static void *
nec_mate_unk_init(const device_t *info)
nec_mate_unk_init(UNUSED(const device_t *info))
{
/* We have to return something non-NULL. */
uint8_t *dev = (uint8_t *) calloc(1, sizeof(uint8_t));

View File

@@ -61,7 +61,7 @@ novell_cardkey_read(uint16_t port, void *priv)
return val ^ 0xFF;
}
void* novell_cardkey_init(const device_t* info)
void* novell_cardkey_init(UNUSED(const device_t* info))
{
char sernumstr[13] = { '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 0 };
int i = 0;

View File

@@ -386,7 +386,7 @@ ide_atapi_get_period(uint8_t channel)
}
static void
ide_irq_update(ide_board_t *dev, int log)
ide_irq_update(ide_board_t *dev, UNUSED(int log))
{
ide_t *ide;
uint8_t set;
@@ -1894,7 +1894,7 @@ ide_read_data(ide_t *ide)
}
static uint8_t
ide_status(ide_t *ide, ide_t *ide_other, int ch)
ide_status(ide_t *ide, UNUSED(ide_t *ide_other), UNUSED(int ch))
{
uint8_t ret;
@@ -3207,7 +3207,7 @@ mcide_mca_reset(void *priv)
}
static void
mcide_reset(void *priv)
mcide_reset(UNUSED(void *priv))
{
for (uint8_t i = 0; i < 2; i++) {
if (ide_boards[i] != NULL)

View File

@@ -44,7 +44,7 @@ lba_enhancer_close(void* priv)
}
void *
lba_enhancer_init(const device_t *info)
lba_enhancer_init(UNUSED(const device_t *info))
{
lba_enhancer_t *dev = (lba_enhancer_t *) calloc(1, sizeof(lba_enhancer_t));

View File

@@ -1975,7 +1975,7 @@ mo_global_init(void)
}
static int
mo_get_max(const ide_t *ide, const int ide_has_dma, const int type)
mo_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
{
int ret;
@@ -1999,7 +1999,7 @@ mo_get_max(const ide_t *ide, const int ide_has_dma, const int type)
}
static int
mo_get_timings(const ide_t *ide, const int ide_has_dma, const int type)
mo_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
{
int ret;

View File

@@ -2062,7 +2062,7 @@ zip_global_init(void)
}
static int
zip_get_max(const ide_t *ide, const int ide_has_dma, const int type)
zip_get_max(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
{
int ret;
@@ -2086,7 +2086,7 @@ zip_get_max(const ide_t *ide, const int ide_has_dma, const int type)
}
static int
zip_get_timings(const ide_t *ide, const int ide_has_dma, const int type)
zip_get_timings(UNUSED(const ide_t *ide), const int ide_has_dma, const int type)
{
int ret;

View File

@@ -30,6 +30,7 @@
#include <86box/fdd.h>
#include <86box/fdc.h>
#include <86box/fdc_ext.h>
#include <86box/plat_unused.h>
#define DEVICE_COMPATICARD_I 0
#define DEVICE_COMPATICARD_II 1
@@ -57,7 +58,7 @@ typedef struct compaticard_s {
} compaticard_t;
static void
compaticard_out(uint16_t port, uint8_t val, void *priv)
compaticard_out(UNUSED(uint16_t port), uint8_t val, void *priv)
{
compaticard_t *dev = (compaticard_t *) priv;
@@ -65,7 +66,7 @@ compaticard_out(uint16_t port, uint8_t val, void *priv)
}
static uint8_t
compaticard_in(uint16_t port, void *priv)
compaticard_in(UNUSED(uint16_t port), void *priv)
{
compaticard_t *dev = (compaticard_t *) priv;
uint8_t ret = (dev->cr_2 &CR_2_MASK);

View File

@@ -469,7 +469,7 @@ track_flags(int drive)
}
static void
set_sector(int drive, int side, uint8_t c, uint8_t h, uint8_t r, uint8_t n)
set_sector(int drive, int side, uint8_t c, UNUSED(uint8_t h), uint8_t r, UNUSED(uint8_t n))
{
pcjs_t *dev = images[drive];

View File

@@ -646,7 +646,7 @@ static const device_config_t tmacm_config[] = {
{ "" }
}
},
{ "", "", -1 }
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format on
};

View File

@@ -133,12 +133,12 @@ bswap64s(uint64_t *s)
return endian##_bswap(v, size); \
} \
\
static __inline void endian##size##_to_cpus(type *p) \
static __inline void endian##size##_to_cpus(UNUSED(type *p)) \
{ \
endian##_bswaps(p, size) \
} \
\
static __inline void cpu_to_##endian##size##s(type *p) \
static __inline void cpu_to_##endian##size##s(UNUSED(type *p)) \
{ \
endian##_bswaps(p, size) \
} \

View File

@@ -104,8 +104,7 @@ enum {
#define CDV EMU_VERSION_EX
static const struct
{
static const struct cdrom_drive_types_s {
const char vendor[9];
const char model[17];
const char revision[5];
@@ -204,19 +203,19 @@ static const struct
Unusual 2.23x according to Google, I'm rounding it upwards to 3x.
Assumed caddy based on the DM-3024.
*/
{ "TEXEL", "CD-ROM DM-3028", "1.06", "texel_3028", BUS_TYPE_SCSI, 2, 3, 36, 1 }, /* Caddy. */
{ "TEXEL", "CD-ROM DM-3028", "1.06", "texel_3028", BUS_TYPE_SCSI, 2, 3, 36, 1, { -1, -1, -1, -1 } }, /* Caddy. */
/*
The characteristics are a complete guesswork because I can't find
this one on Google.
Also, INQUIRY length is always 96 on these Toshiba drives.
*/
{ "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "toshiba_xm", BUS_TYPE_SCSI, 2, 2, 96, 0 }, /* Tray. */
{ "TOSHIBA", "CD-ROM XM-3201B", "3232", "toshiba_3201b", BUS_TYPE_SCSI, 1, 1, 96, 1 }, /* Caddy. */
{ "TOSHIBA", "CD-ROM XM-3301TA", "0272", "toshiba_3301ta", BUS_TYPE_SCSI, 2, 2, 96, 0 }, /* Tray. */
{ "TOSHIBA", "CD-ROM XM-5701TA", "3136", "toshiba_5701a", BUS_TYPE_SCSI, 2, 12, 96, 0 }, /* Tray. */
{ "TOSHIBA", "DVD-ROM SD-M1401", "1008", "toshiba_m1401", BUS_TYPE_SCSI, 2, 40, 96, 0 }, /* Tray. */
{ "", "", "", "", BUS_TYPE_NONE, 0, -1, 0, 0 }
{ "TOSHIBA", "CD-ROM DRIVE:XM", "3433", "toshiba_xm", BUS_TYPE_SCSI, 2, 2, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */
{ "TOSHIBA", "CD-ROM XM-3201B", "3232", "toshiba_3201b", BUS_TYPE_SCSI, 1, 1, 96, 1, { -1, -1, -1, -1 } }, /* Caddy. */
{ "TOSHIBA", "CD-ROM XM-3301TA", "0272", "toshiba_3301ta", BUS_TYPE_SCSI, 2, 2, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */
{ "TOSHIBA", "CD-ROM XM-5701TA", "3136", "toshiba_5701a", BUS_TYPE_SCSI, 2, 12, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */
{ "TOSHIBA", "DVD-ROM SD-M1401", "1008", "toshiba_m1401", BUS_TYPE_SCSI, 2, 40, 96, 0, { -1, -1, -1, -1 } }, /* Tray. */
{ "", "", "", "", BUS_TYPE_NONE, 0, -1, 0, 0, { -1, -1, -1, -1 } }
};
/* To shut up the GCC compilers. */

View File

@@ -38,6 +38,7 @@
#include <86box/mem.h>
#include <86box/rom.h>
#include <86box/vid_cga.h>
#include <86box/plat_unused.h>
#define GRID_APPROM_SELECT 0x440
#define GRID_APPROM_ENABLE 0x405
@@ -263,7 +264,7 @@ static uint8_t grid_io_read(uint16_t port, void *priv) {
}
static void *
grid_init(const device_t *info)
grid_init(UNUSED(const device_t *info))
{
grid_t *dev = calloc(1, sizeof(grid_t));

View File

@@ -56,7 +56,6 @@
#include <86box/thread.h>
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/bswap.h>
#include <86box/plat_unused.h>
/* Maximum number of times we report a link down to the guest (failure to send frame) */

View File

@@ -60,7 +60,6 @@
#include <86box/timer.h>
#include <86box/network.h>
#include <86box/net_dp8390.h>
#include <86box/bswap.h>
#include <86box/plat_unused.h>
typedef struct threec503_t {

Some files were not shown because too many files have changed in this diff Show More