Merge remote-tracking branch 'origin/master' into version/4.1
This commit is contained in:
@@ -325,7 +325,7 @@ codegen_backend_init(void)
|
||||
|
||||
codegen_allocator_clean_blocks(block->head_mem_block);
|
||||
|
||||
asm("mrs %0, fpcr\n"
|
||||
asm("mrs %w0, fpcr\n"
|
||||
: "=r"(cpu_state.old_fp_control));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#if defined __aarch64__ || defined _M_ARM64
|
||||
|
||||
# include <inttypes.h>
|
||||
# include <stdint.h>
|
||||
# include <86box/86box.h>
|
||||
# include "cpu.h"
|
||||
@@ -662,7 +663,7 @@ host_arm64_CMNX_IMM(codeblock_t *block, int src_n_reg, uint64_t imm_data)
|
||||
} else if (!(imm_data & 0xfffffffffffff000ull)) {
|
||||
codegen_addlong(block, OPCODE_CMNX_IMM | Rd(REG_XZR) | Rn(src_n_reg) | IMM12(imm_data & 0xfff) | DATPROC_IMM_SHIFT(0));
|
||||
} else
|
||||
fatal("CMNX_IMM %08x\n", imm_data);
|
||||
fatal("CMNX_IMM %016" PRIx64 "\n", imm_data);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -553,7 +553,7 @@ codegen_FABS(codeblock_t *block, uop_t *uop)
|
||||
if (REG_IS_D(dest_size) && REG_IS_D(src_size_a)) {
|
||||
host_arm64_FABS_D(block, dest_reg, src_reg_a);
|
||||
} else
|
||||
fatal("codegen_FABS %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
fatal("codegen_FABS %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -566,7 +566,7 @@ codegen_FCHS(codeblock_t *block, uop_t *uop)
|
||||
if (REG_IS_D(dest_size) && REG_IS_D(src_size_a)) {
|
||||
host_arm64_FNEG_D(block, dest_reg, src_reg_a);
|
||||
} else
|
||||
fatal("codegen_FCHS %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
fatal("codegen_FCHS %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ codegen_FSQRT(codeblock_t *block, uop_t *uop)
|
||||
if (REG_IS_D(dest_size) && REG_IS_D(src_size_a)) {
|
||||
host_arm64_FSQRT_D(block, dest_reg, src_reg_a);
|
||||
} else
|
||||
fatal("codegen_FSQRT %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
fatal("codegen_FSQRT %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1548,7 +1548,7 @@ codegen_PF2ID(codeblock_t *block, uop_t *uop)
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a)) {
|
||||
host_arm64_FCVTZS_V2S(block, dest_reg, src_reg_a);
|
||||
} else
|
||||
fatal("PF2ID %02x %02x\n", uop->dest_reg_a_real);
|
||||
fatal("PF2ID %02x\n", uop->dest_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1655,7 +1655,7 @@ codegen_PFRCP(codeblock_t *block, uop_t *uop)
|
||||
host_arm64_FDIV_S(block, dest_reg, REG_V_TEMP, src_reg_a);
|
||||
host_arm64_DUP_V2S(block, dest_reg, dest_reg, 0);
|
||||
} else
|
||||
fatal("PFRCP %02x %02x\n", uop->dest_reg_a_real);
|
||||
fatal("PFRCP %02x\n", uop->dest_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1672,7 +1672,7 @@ codegen_PFRSQRT(codeblock_t *block, uop_t *uop)
|
||||
host_arm64_FDIV_S(block, dest_reg, dest_reg, REG_V_TEMP);
|
||||
host_arm64_DUP_V2S(block, dest_reg, dest_reg, 0);
|
||||
} else
|
||||
fatal("PFRSQRT %02x %02x\n", uop->dest_reg_a_real);
|
||||
fatal("PFRSQRT %02x\n", uop->dest_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1698,7 +1698,7 @@ codegen_PI2FD(codeblock_t *block, uop_t *uop)
|
||||
if (REG_IS_Q(dest_size) && REG_IS_Q(src_size_a)) {
|
||||
host_arm64_SCVTF_V2S(block, dest_reg, src_reg_a);
|
||||
} else
|
||||
fatal("PI2FD %02x %02x\n", uop->dest_reg_a_real);
|
||||
fatal("PI2FD %02x\n", uop->dest_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -305,7 +306,7 @@ add_to_block_list(codeblock_t *block)
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
if (!block->page_mask)
|
||||
fatal("add_to_block_list - mask = 0 %llx %llx\n", block->page_mask, block->page_mask2);
|
||||
fatal("add_to_block_list - mask = 0 %" PRIx64 " %" PRIx64 "\n", block->page_mask, block->page_mask2);
|
||||
#endif
|
||||
|
||||
if (block_prev_nr) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* Copyright 2023 gloriouscow.
|
||||
* Copyright 2023 Miran Grca.
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
@@ -76,7 +77,11 @@ void
|
||||
queue_set_size(size_t size)
|
||||
{
|
||||
if (size > QUEUE_MAX)
|
||||
#if (defined __amd64__ || defined _M_X64 || defined __aarch64__ || defined _M_ARM64)
|
||||
fatal("Requested prefetch queue of %" PRIi64 " bytes is too big\n", size);
|
||||
#else
|
||||
fatal("Requested prefetch queue of %i bytes is too big\n", size);
|
||||
#endif
|
||||
|
||||
queue.size = size;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2018-2021 Fred N. van Kempen.
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
@@ -1609,7 +1610,7 @@ cpu_set(void)
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal("cpu_set : unknown CPU type %llu\n", cpu_s->cpu_type);
|
||||
fatal("cpu_set : unknown CPU type %" PRIu64 "\n", cpu_s->cpu_type);
|
||||
}
|
||||
|
||||
switch (fpu_type) {
|
||||
|
||||
@@ -60,7 +60,6 @@ static uint16_t latched_irqs = 0x0000;
|
||||
static int shadow = 0;
|
||||
static int elcr_enabled = 0;
|
||||
static int tmr_inited = 0;
|
||||
static int latched = 0;
|
||||
static int pic_pci = 0;
|
||||
|
||||
static void (*update_pending)(void);
|
||||
@@ -239,10 +238,8 @@ pic_update_pending_at(void)
|
||||
}
|
||||
|
||||
static void
|
||||
pic_callback(void *priv)
|
||||
pic_callback(UNUSED(void *priv))
|
||||
{
|
||||
pic_t *dev = (pic_t *) priv;
|
||||
|
||||
update_pending();
|
||||
}
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
setContextMenuPolicy(Qt::PreventContextMenu);
|
||||
/* Remove default Shift+F10 handler, which unfocuses keyboard input even with no context menu. */
|
||||
connect(new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F10), this), &QShortcut::activated, this, [this](){});
|
||||
connect(new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F10), this), &QShortcut::activated, this, [](){});
|
||||
|
||||
connect(this, &MainWindow::initRendererMonitor, this, &MainWindow::initRendererMonitorSlot);
|
||||
connect(this, &MainWindow::initRendererMonitorForNonQtThread, this, &MainWindow::initRendererMonitorSlot, Qt::BlockingQueuedConnection);
|
||||
|
||||
@@ -73,7 +73,7 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
|
||||
|
||||
m_monitor_index = monitor_index;
|
||||
#if defined __unix__ && !defined __HAIKU__
|
||||
mousedata.mouse_type = getenv("EMU86BOX_MOUSE"), char auto_mouse_type[16];
|
||||
mousedata.mouse_type = getenv("EMU86BOX_MOUSE"), auto_mouse_type[16];
|
||||
if (!mousedata.mouse_type || (mousedata.mouse_type[0] == '\0') || !stricmp(mousedata.mouse_type, "auto")) {
|
||||
if (QApplication::platformName().contains("wayland"))
|
||||
strcpy(auto_mouse_type, "wayland");
|
||||
|
||||
@@ -91,6 +91,7 @@ static int host_cpu_features_by_cpuid(void)
|
||||
return features;
|
||||
}
|
||||
|
||||
#if (RESID_USE_SSE==1)
|
||||
static int host_cpu_features(void)
|
||||
{
|
||||
static int features = 0;
|
||||
@@ -152,6 +153,7 @@ static int host_cpu_features(void)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
float SIDFP::kinked_dac(const int x, const float nonlinearity, const int max)
|
||||
{
|
||||
|
||||
@@ -587,7 +587,7 @@ ac97_codec_init(const device_t *info)
|
||||
break;
|
||||
}
|
||||
if (dev->model >= (sizeof(ac97_codecs) / sizeof(ac97_codecs[0]))) {
|
||||
fatal("AC97 Codec %d: Unknown ID %c%c%c%02X\n", ac97_codec_id, (info->local >> 24) & 0xff, (info->local >> 16) & 0xff, (info->local >> 8) & 0xff, info->local & 0xff);
|
||||
fatal("AC97 Codec %d: Unknown ID %c%c%c%02X\n", ac97_codec_id, (uint32_t) ((info->local >> 24) & 0xff), (uint32_t) ((info->local >> 16) & 0xff), (uint32_t) ((info->local >> 8) & 0xff), (uint32_t) (info->local & 0xff));
|
||||
free(dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ typedef struct tgui_t {
|
||||
|
||||
struct
|
||||
{
|
||||
int16_t src_x, src_y;
|
||||
int32_t src_x, src_y;
|
||||
int16_t src_x_clip, src_y_clip;
|
||||
int16_t dst_x, dst_y;
|
||||
int16_t dst_y_clip, dst_x_clip;
|
||||
@@ -129,7 +129,8 @@ typedef struct tgui_t {
|
||||
int offset;
|
||||
uint16_t ger22;
|
||||
|
||||
int16_t err, top, left, bottom, right;
|
||||
int32_t err;
|
||||
int16_t top, left, bottom, right;
|
||||
int x, y, dx, dy;
|
||||
uint32_t src, dst, src_old, dst_old;
|
||||
int pat_x, pat_y;
|
||||
|
||||
@@ -3078,7 +3078,6 @@ xga_init(const device_t *info)
|
||||
svga_t *svga = svga_get_pri();
|
||||
xga_t *xga = &svga->xga;
|
||||
FILE *f;
|
||||
uint32_t temp;
|
||||
uint8_t *rom = NULL;
|
||||
|
||||
xga->ext_mem_addr = device_get_config_hex16("ext_mem_addr");
|
||||
@@ -3100,13 +3099,11 @@ xga_init(const device_t *info)
|
||||
|
||||
f = rom_fopen(xga->type ? XGA2_BIOS_PATH : XGA_BIOS_PATH, "rb");
|
||||
(void) fseek(f, 0L, SEEK_END);
|
||||
temp = ftell(f);
|
||||
(void) fseek(f, 0L, SEEK_SET);
|
||||
|
||||
rom = malloc(xga->bios_rom.sz);
|
||||
memset(rom, 0xff, xga->bios_rom.sz);
|
||||
(void) fread(rom, xga->bios_rom.sz, 1, f);
|
||||
temp -= xga->bios_rom.sz;
|
||||
(void) fclose(f);
|
||||
|
||||
xga->bios_rom.rom = rom;
|
||||
|
||||
Reference in New Issue
Block a user