mirror of https://github.com/inolen/redream.git
linux build fixes
This commit is contained in:
parent
cfbb128380
commit
56d039e643
|
@ -197,7 +197,7 @@ endif()
|
|||
source_group_by_dir(REDREAM_SOURCES)
|
||||
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(REDREAM_COMPILE_FLAGS -std=c++11 -fno-operator-names -Wall -Wextra -Werror -Wno-unused-parameter)
|
||||
set(REDREAM_COMPILE_FLAGS -std=c++11 -fno-operator-names -Wall -Wextra -Werror -Wno-unused-parameter -Wno-strict-aliasing)
|
||||
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
|
||||
|
||||
|
|
|
@ -364,7 +364,8 @@ static int gdb_server_create_listen(gdb_server_t *sv, int port) {
|
|||
}
|
||||
|
||||
// bind the socket to an address / port
|
||||
struct sockaddr_in listen_addr_in = {};
|
||||
struct sockaddr_in listen_addr_in;
|
||||
memset(&listen_addr_in, 0, sizeof(listen_addr_in));
|
||||
listen_addr_in.sin_family = AF_INET;
|
||||
listen_addr_in.sin_port = htons(port);
|
||||
listen_addr_in.sin_addr.s_addr = INADDR_ANY;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include "core/config.h"
|
||||
|
||||
namespace re {
|
||||
|
|
|
@ -67,11 +67,11 @@ T AICA::ReadWave(uint32_t addr) {
|
|||
if (sizeof(T) == 4) {
|
||||
// FIXME temp hacks to get Crazy Taxi 1 booting
|
||||
if (addr == 0x104 || addr == 0x284 || addr == 0x288) {
|
||||
return 0x54494e49;
|
||||
return static_cast<T>(0x54494e49);
|
||||
}
|
||||
// FIXME temp hacks to get Crazy Taxi 2 booting
|
||||
if (addr == 0x5c) {
|
||||
return 0x54494e49;
|
||||
return static_cast<T>(0x54494e49);
|
||||
}
|
||||
// FIXME temp hacks to get PoP booting
|
||||
if (addr == 0xb200 || addr == 0xb210 || addr == 0xb220 || addr == 0xb230 ||
|
||||
|
@ -82,7 +82,7 @@ T AICA::ReadWave(uint32_t addr) {
|
|||
addr == 0xb340 || addr == 0xb350 || addr == 0xb360 || addr == 0xb370 ||
|
||||
addr == 0xb380 || addr == 0xb390 || addr == 0xb3a0 || addr == 0xb3b0 ||
|
||||
addr == 0xb3c0 || addr == 0xb3d0 || addr == 0xb3e0 || addr == 0xb3f0) {
|
||||
return 0x0;
|
||||
return static_cast<T>(0x0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <stdio.h>
|
||||
#include "core/assert.h"
|
||||
#include "hw/gdrom/disc.h"
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ HOLLY_W32_DELEGATE(SB_C2DST) {
|
|||
}
|
||||
|
||||
// FIXME what are SB_LMMODE0 / SB_LMMODE1
|
||||
DTR dtr = {};
|
||||
DTR dtr;
|
||||
dtr.channel = 2;
|
||||
dtr.rw = false;
|
||||
dtr.addr = SB_C2DSTAT;
|
||||
|
@ -287,7 +287,7 @@ HOLLY_W32_DELEGATE(SB_GDST) {
|
|||
uint8_t sector_data[SECTOR_SIZE];
|
||||
int n = gdrom_->ReadDMA(sector_data, sizeof(sector_data));
|
||||
|
||||
DTR dtr = {};
|
||||
DTR dtr;
|
||||
dtr.channel = 0;
|
||||
dtr.rw = true;
|
||||
dtr.data = sector_data;
|
||||
|
|
|
@ -95,7 +95,7 @@ void SH4::Run(const std::chrono::nanoseconds &delta) {
|
|||
PROFILER_RUNTIME("SH4::Execute");
|
||||
|
||||
// execute at least 1 cycle. the tests rely on this to step block by block
|
||||
int64_t cycles = std::max(NANO_TO_CYCLES(delta, SH4_CLOCK_FREQ), 1ll);
|
||||
int64_t cycles = std::max(NANO_TO_CYCLES(delta, SH4_CLOCK_FREQ), INT64_C(1));
|
||||
|
||||
// set current sh4 instance for CompilePC
|
||||
s_current_cpu = this;
|
||||
|
|
|
@ -21,6 +21,8 @@ static const int MAX_MIPS_SAMPLES = 10;
|
|||
|
||||
// data transfer request
|
||||
struct DTR {
|
||||
DTR() : channel(0), rw(false), data(nullptr), addr(0), size(0) {}
|
||||
|
||||
int channel;
|
||||
// when rw is true, addr is the dst address
|
||||
// when rw is false, addr is the src address
|
||||
|
|
|
@ -2006,7 +2006,7 @@ EMITTER(FSCA) {
|
|||
|
||||
b.StoreRegisterF(n, b.LoadHost(addr, VALUE_F32));
|
||||
b.StoreRegisterF(n + 1,
|
||||
b.LoadHost(b.Add(addr, b.AllocConstant(4ll)), VALUE_F32));
|
||||
b.LoadHost(b.Add(addr, b.AllocConstant(INT64_C(4))), VALUE_F32));
|
||||
}
|
||||
|
||||
// FTRV XMTRX,FVn PR=0 1111nn0111111101
|
||||
|
|
|
@ -53,7 +53,7 @@ static void SignalHandler(int signo, siginfo_t *info, void *ctx) {
|
|||
Exception ex;
|
||||
ex.type = signo == SIGSEGV ? EX_ACCESS_VIOLATION : EX_INVALID_INSTRUCTION;
|
||||
ex.fault_addr = reinterpret_cast<uintptr_t>(info->si_addr);
|
||||
ex.pc = uctx->uc_mcontext->gregs[REG_RIP];
|
||||
ex.pc = uctx->uc_mcontext.gregs[REG_RIP];
|
||||
CopyStateTo(&uctx->uc_mcontext, &ex.thread_state);
|
||||
|
||||
// call exception handler, letting it potentially update the thread state
|
||||
|
|
|
@ -1759,9 +1759,6 @@ void MicroProfileImpl::DrawBox(int x0, int y0, int x1, int y1, uint32_t color,
|
|||
6);
|
||||
|
||||
if (type == BOX_FLAT) {
|
||||
CHECK(x0 <= x1);
|
||||
CHECK(y0 <= y1);
|
||||
|
||||
Q0(vertex, xy[0], (float)x0);
|
||||
Q0(vertex, xy[1], (float)y0);
|
||||
Q0(vertex, color, color);
|
||||
|
|
|
@ -16,7 +16,13 @@ using namespace re::hw::sh4;
|
|||
using namespace re::jit;
|
||||
using namespace re::jit::frontend::sh4;
|
||||
|
||||
void re::hw::sh4::RunSH4Test(const SH4Test &test);
|
||||
namespace re {
|
||||
namespace hw {
|
||||
namespace sh4 {
|
||||
void RunSH4Test(const SH4Test &test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum {
|
||||
UNINITIALIZED_REG = 0xbaadf00d,
|
||||
|
|
Loading…
Reference in New Issue