mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 18:19:36 +01:00
Merge pull request #15369 from unknownbrackets/include-cleanup
Global: Reduce includes of common headers
This commit is contained in:
179 files changed
+187
-390
No files matched your search
@@ -18,7 +18,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include "Common.h"
|
||||
|
||||
// x86/x64 ABI:s, and helpers to help follow them when JIT-ing code.
|
||||
// All convensions return values in EAX (+ possibly EDX).
|
||||
|
||||
@@ -53,11 +53,11 @@ bool IsPowerOfTwo(uint64_t x) {
|
||||
|
||||
bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift) {
|
||||
if (input < 4096) {
|
||||
if (val) *val = input;
|
||||
if (val) *val = (uint32_t)input;
|
||||
if (shift) *shift = false;
|
||||
return true;
|
||||
} else if ((input & 0xFFF000) == input) {
|
||||
if (val) *val = input >> 12;
|
||||
if (val) *val = (uint32_t)(input >> 12);
|
||||
if (shift) *shift = true;
|
||||
return true;
|
||||
}
|
||||
@@ -1963,7 +1963,7 @@ void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize)
|
||||
// TODO: Make some more systemic use of MOVN, but this will take care of most cases.
|
||||
// Small negative integer. Use MOVN
|
||||
if (!Is64Bit(Rd) && (imm | 0xFFFF0000) == imm) {
|
||||
MOVN(Rd, ~imm, SHIFT_0);
|
||||
MOVN(Rd, (u32)(~imm), SHIFT_0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "Common/ArmCommon.h"
|
||||
#include "Common/BitSet.h"
|
||||
#include "Common/CodeBlock.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
#define DYNA_REC JIT
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#if PPSSPP_ARCH(ARM)
|
||||
|
||||
#include "ArmEmitter.h"
|
||||
#include "ArmABI.h"
|
||||
|
||||
using namespace ArmGen;
|
||||
// If passing arguments, don't use this.
|
||||
void ARMXEmitter::ARMABI_CallFunction(void *func)
|
||||
{
|
||||
PUSH(5, R0, R1, R2, R3, _LR);
|
||||
ARMABI_MOVI2R(R14, (u32)func);
|
||||
BL(R14);
|
||||
POP(5, R0, R1, R2, R3, _LR);
|
||||
}
|
||||
void ARMXEmitter::ARMABI_CallFunctionC(void *func, u32 Arg)
|
||||
{
|
||||
PUSH(5, R0, R1, R2, R3, _LR);
|
||||
ARMABI_MOVI2R(R14, (u32)func);
|
||||
ARMABI_MOVI2R(R0, Arg);
|
||||
BL(R14);
|
||||
POP(5, R0, R1, R2, R3, _LR);
|
||||
}
|
||||
|
||||
void ARMXEmitter::ARMABI_CallFunctionCNoSave(void *func, u32 Arg)
|
||||
{
|
||||
PUSH(1, _LR);
|
||||
ARMABI_MOVI2R(R14, (u32)func);
|
||||
ARMABI_MOVI2R(R0, Arg);
|
||||
BL(R14);
|
||||
POP(1, _LR);
|
||||
}
|
||||
|
||||
void ARMXEmitter::ARMABI_CallFunctionCC(void *func, u32 Arg1, u32 Arg2)
|
||||
{
|
||||
PUSH(5, R0, R1, R2, R3, _LR);
|
||||
ARMABI_MOVI2R(R14, (u32)func);
|
||||
ARMABI_MOVI2R(R0, Arg1);
|
||||
ARMABI_MOVI2R(R1, Arg2);
|
||||
BL(R14);
|
||||
POP(5, R0, R1, R2, R3, _LR);
|
||||
|
||||
}
|
||||
void ARMXEmitter::ARMABI_CallFunctionCCC(void *func, u32 Arg1, u32 Arg2, u32 Arg3)
|
||||
{
|
||||
PUSH(5, R0, R1, R2, R3, _LR);
|
||||
ARMABI_MOVI2R(R14, (u32)func);
|
||||
ARMABI_MOVI2R(R0, Arg1);
|
||||
ARMABI_MOVI2R(R1, Arg2);
|
||||
ARMABI_MOVI2R(R2, Arg3);
|
||||
BL(R14);
|
||||
POP(5, R0, R1, R2, R3, _LR);
|
||||
}
|
||||
|
||||
void ARMXEmitter::ARMABI_PushAllCalleeSavedRegsAndAdjustStack() {
|
||||
// Note: 4 * 4 = 16 bytes, so alignment is preserved.
|
||||
PUSH(4, R0, R1, R2, R3);
|
||||
}
|
||||
|
||||
void ARMXEmitter::ARMABI_PopAllCalleeSavedRegsAndAdjustStack() {
|
||||
POP(4, R0, R1, R2, R3);
|
||||
}
|
||||
|
||||
const char *conditions[] = {"EQ", "NEQ", "CS", "CC", "MI", "PL", "VS", "VC", "HI", "LS", "GE", "LT", "GT", "LE", "AL" };
|
||||
static void ShowCondition(u32 cond)
|
||||
{
|
||||
printf("Condition: %s[%d]\n", conditions[cond], (int)cond);
|
||||
}
|
||||
void ARMXEmitter::ARMABI_ShowConditions()
|
||||
{
|
||||
const u8 *ptr = GetCodePtr();
|
||||
FixupBranch cc[15];
|
||||
for(u32 a = 0; a < 15; ++a)
|
||||
cc[a] = B_CC((CCFlags)a);
|
||||
|
||||
for(u32 a = 0; a < 15; ++a)
|
||||
{
|
||||
SetJumpTarget(cc[a]);
|
||||
ARMABI_CallFunctionC((void*)&ShowCondition, a);
|
||||
if(a != 14)
|
||||
B(ptr + ((a + 1) * 4));
|
||||
}
|
||||
}
|
||||
// NZCVQ is stored in the lower five bits of the Flags variable
|
||||
// GE values are in the lower four bits of the GEval variable
|
||||
|
||||
void ARMXEmitter::UpdateAPSR(bool NZCVQ, u8 Flags, bool GE, u8 GEval)
|
||||
{
|
||||
if(NZCVQ && GE)
|
||||
{
|
||||
// Can't update GE with the other ones with a immediate
|
||||
// Got to use a scratch register
|
||||
u32 Imm = (Flags << 27) | ((GEval & 0xF) << 16);
|
||||
ARMABI_MOVI2R(R14, Imm);
|
||||
_MSR(true, true, R14);
|
||||
}
|
||||
else {
|
||||
if (NZCVQ)
|
||||
{
|
||||
Operand2 value(Flags << 1, 3);
|
||||
_MSR(true, false, value);
|
||||
} else if (GE)
|
||||
{
|
||||
Operand2 value(GEval << 2, 9);
|
||||
_MSR(false, true, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,36 +0,0 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _JIT_ARMABI_H_
|
||||
#define _JIT_ARMABI_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
// I've been using R8 as a trash register, I don't know if I should choose a
|
||||
// better register or statically allocate some later, for now I'll just thrash
|
||||
// R8 and down the road think about the other ones.
|
||||
// TODO: Look at what all registers are being used for.
|
||||
|
||||
// ARMv7 uses registers for arguments to instructions
|
||||
// R0 is also used for returns from instructions
|
||||
// R1 is used as return along with R0 if it is a double size
|
||||
|
||||
#define ARM_PARAM1 R0
|
||||
#define ARM_PARAM2 R1
|
||||
#define ARM_PARAM3 R2
|
||||
#define ARM_PARAM4 R3
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/ArmCommon.h"
|
||||
#include "Common/CodeBlock.h"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "ppsspp_config.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/ConsoleListener.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
template <typename T, typename U>
|
||||
class InitConstMap
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#include "Common/Data/Convert/ColorConvNEON.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
|
||||
// TODO: More NEON color conversion funcs.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "Common/Data/Format/JSONReader.h"
|
||||
#include "Common/File/VFS/VFS.h"
|
||||
#include "Common/File/Path.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/Data/Format/JSONReader.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
namespace json {
|
||||
|
||||
@@ -21,6 +22,17 @@ JsonReader::JsonReader(const std::string &filename) {
|
||||
}
|
||||
}
|
||||
|
||||
bool JsonReader::parse() {
|
||||
char *error_pos;
|
||||
int status = jsonParse(buffer_, &error_pos, &root_, alloc_);
|
||||
if (status != JSON_OK) {
|
||||
ERROR_LOG(IO, "Error at (%i): %s\n%s\n\n", (int)(error_pos - buffer_), jsonStrError(status), error_pos);
|
||||
return false;
|
||||
}
|
||||
ok_ = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
int JsonGet::numChildren() const {
|
||||
int count = 0;
|
||||
if (value_.getTag() == JSON_OBJECT || value_.getTag() == JSON_ARRAY) {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "ext/gason/gason.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
namespace json {
|
||||
|
||||
@@ -69,16 +68,7 @@ public:
|
||||
const JsonValue rootValue() const { return root_; }
|
||||
|
||||
private:
|
||||
bool parse() {
|
||||
char *error_pos;
|
||||
int status = jsonParse(buffer_, &error_pos, &root_, alloc_);
|
||||
if (status != JSON_OK) {
|
||||
ERROR_LOG(IO, "Error at (%i): %s\n%s\n\n", (int)(error_pos - buffer_), jsonStrError(status), error_pos);
|
||||
return false;
|
||||
}
|
||||
ok_ = true;
|
||||
return true;
|
||||
}
|
||||
bool parse();
|
||||
|
||||
char *buffer_ = nullptr;
|
||||
JsonAllocator alloc_;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
// OR it contains ONLY other chunks
|
||||
// otherwise the scheme breaks.
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
class RIFFReader {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/File/Path.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "CPUDetect.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
#ifndef _DOLPHIN_FAKE_CODEGEN_
|
||||
#define _DOLPHIN_FAKE_CODEGEN_
|
||||
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CodeBlock.h"
|
||||
|
||||
// VCVT flags
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
#include "Common/File/FileDescriptor.h"
|
||||
#include "Common/Log.h"
|
||||
@@ -83,8 +83,8 @@ size_t Write(int fd, const std::string &str) {
|
||||
|
||||
bool WaitUntilReady(int fd, double timeout, bool for_write) {
|
||||
struct timeval tv;
|
||||
tv.tv_sec = floor(timeout);
|
||||
tv.tv_usec = (timeout - floor(timeout)) * 1000000.0;
|
||||
tv.tv_sec = (long)floor(timeout);
|
||||
tv.tv_usec = (long)((timeout - floor(timeout)) * 1000000.0);
|
||||
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
#include <fstream>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <time.h>
|
||||
#include <cstdint>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/File/Path.h"
|
||||
|
||||
// Some functions here support Android content URIs. These are marked as such.
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Common/Log.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Common/GPU/Shader.h"
|
||||
#include "Common/GPU/ShaderWriter.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
const char *vulkan_glsl_preamble_fs =
|
||||
"#version 450\n"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Common/GPU/Shader.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/GPUCommon.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Common/GPU/Vulkan/VulkanContext.h"
|
||||
|
||||
// Forward declaration
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "VulkanLoader.h"
|
||||
|
||||
// Simple scoped based profiler, initially meant for instant one-time tasks like texture uploads
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include <cstdint>
|
||||
#include "Common/Input/InputState.h"
|
||||
#include "Common/Math/geom2d.h"
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
// For more detailed and configurable input, implement NativeTouch, NativeKey and NativeAxis and do your
|
||||
// own mapping. Might later move the mapping system from PPSSPP to native.
|
||||
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "StringUtils.h"
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "Common/Math/math_util.h"
|
||||
#include "curves.h"
|
||||
|
||||
#include "Common/Common.h"
|
||||
|
||||
float linearInOut(int t, int fadeInLength, int solidLength, int fadeOutLength) {
|
||||
if (t < 0) return 0;
|
||||
if (t < fadeInLength) {
|
||||
@@ -37,7 +35,7 @@ float linearOut(int t, int fadeOutLength) {
|
||||
float ease(float val) {
|
||||
if (val > 1.0f) return 1.0f;
|
||||
if (val < 0.0f) return 0.0f;
|
||||
return ((-cosf(val * PI)) + 1.0f) * 0.5;
|
||||
return (float)(((-cosf(val * PI)) + 1.0f) * 0.5);
|
||||
}
|
||||
|
||||
float ease(int t, int fadeLength)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
// This class lets you create a block of anonymous RAM, and then arbitrarily map views into it.
|
||||
// Multiple views can mirror the same section of the block, which makes it very convient for emulating
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ppsspp_config.h"
|
||||
#if PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64)
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
|
||||
@@ -18,11 +18,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Common/CodeBlock.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace MIPSGen {
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <mutex>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ void DrawBuffer::RectOutline(float x, float y, float w, float h, uint32_t color,
|
||||
void DrawBuffer::MultiVGradient(float x, float y, float w, float h, GradientStop *stops, int numStops) {
|
||||
for (int i = 0; i < numStops - 1; i++) {
|
||||
float t0 = stops[i].t, t1 = stops[i+1].t;
|
||||
uint32_t c0 = stops[i].t, c1 = stops[i+1].t;
|
||||
uint32_t c0 = stops[i].color, c1 = stops[i+1].color;
|
||||
RectVGradient(x, y + h * t0, w, h * (t1 - t0), c0, c1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Buffer.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "Common/Thread/Channel.h"
|
||||
#include "Common/Thread/ThreadManager.h"
|
||||
#include "Common/Log.h"
|
||||
|
||||
template<class T>
|
||||
class PromiseTask : public Task {
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "Common.h"
|
||||
#include "x64Emitter.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/x64Emitter.h"
|
||||
|
||||
// This simple class creates a wrapper around a C/C++ function that saves all fp state
|
||||
// before entering it, and restores it upon exit. This is required to be able to selectively
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
// See header for documentation.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "Common/Data/Color/RGBAUtil.h"
|
||||
#include "Common/UI/UI.h"
|
||||
#include "Common/UI/Context.h"
|
||||
#include "Common/Render/TextureAtlas.h"
|
||||
#include "Common/Render/DrawBuffer.h"
|
||||
|
||||
// TODO: UI should probably not own these.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
struct LSInstructionInfo
|
||||
{
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/CodeBlock.h"
|
||||
|
||||
|
||||
+2
-2
@@ -188,8 +188,8 @@ bool UpdateScreenScale(int width, int height) {
|
||||
pixel_in_dps_x = 1.0f / g_dpi_scale_x;
|
||||
pixel_in_dps_y = 1.0f / g_dpi_scale_y;
|
||||
|
||||
int new_dp_xres = width * g_dpi_scale_x;
|
||||
int new_dp_yres = height * g_dpi_scale_y;
|
||||
int new_dp_xres = (int)(width * g_dpi_scale_x);
|
||||
int new_dp_yres = (int)(height * g_dpi_scale_y);
|
||||
|
||||
bool dp_changed = new_dp_xres != dp_xres || new_dp_yres != dp_yres;
|
||||
bool px_changed = pixel_xres != width || pixel_yres != height;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <string>
|
||||
|
||||
#include "Core/Compatibility.h"
|
||||
#include "Core/Config.h"
|
||||
|
||||
enum GPUCore {
|
||||
GPUCORE_GLES,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <atomic>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Debugger/WebSocket/GameSubscriber.h"
|
||||
#include "Core/Debugger/WebSocket/WebSocketUtils.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Render/TextureAtlas.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <algorithm>
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <algorithm>
|
||||
#include "Common/CommonWindows.h"
|
||||
#endif
|
||||
#include <TimeUtil.h>
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
///////////////////////
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include <vector>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
enum PBPSubFile {
|
||||
|
||||
@@ -780,12 +780,12 @@ u32 DiskCachingFileLoaderCache::DetermineMaxBlocks() {
|
||||
}
|
||||
// This might be smaller than what's free, but if they try to launch a second game,
|
||||
// they'll be happier when it can be cached too.
|
||||
return freeBlocksWithFlex;
|
||||
return (u32)freeBlocksWithFlex;
|
||||
}
|
||||
|
||||
// Might be lower than LOWER_BOUND, but that's okay. That means not enough space.
|
||||
// We abandon the idea of flex since there's not enough space free anyway.
|
||||
return freeBlocks;
|
||||
return (u32)freeBlocks;
|
||||
}
|
||||
|
||||
u32 DiskCachingFileLoaderCache::CountCachedFiles() {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/File/Path.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/Loaders.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <ctype.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Core/HDRemaster.h"
|
||||
|
||||
bool g_RemasterMode;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Data/Convert/SmallDataConvert.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/File/Path.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define TCP_MAXSEG 2
|
||||
#endif // defined(HAVE_LIBNX) || PPSSPP_PLATFORM(SWITCH)
|
||||
|
||||
#include <algorithm>
|
||||
#include <mutex>
|
||||
#include <cstring>
|
||||
|
||||
@@ -60,6 +61,7 @@
|
||||
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
|
||||
+3
-3
@@ -38,14 +38,14 @@
|
||||
#define PACK __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <climits>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/Net/Resolve.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
||||
+1
-2
@@ -17,8 +17,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
class PointerWrap;
|
||||
class KernelObject;
|
||||
|
||||
@@ -27,6 +25,7 @@ void __IoDoState(PointerWrap &p);
|
||||
void __IoShutdown();
|
||||
|
||||
struct ScePspDateTime;
|
||||
struct tm;
|
||||
|
||||
u32 sceIoIoctl(u32 id, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include "ext/jpge/jpgd.h"
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ static u32 sceAacInit(u32 id)
|
||||
|
||||
aac->Channels = 2;
|
||||
aac->MaxOutputSample = aac->PCMBufSize / 4;
|
||||
aac->SetReadPos(aac->startPos);
|
||||
aac->SetReadPos((int)aac->startPos);
|
||||
aac->audioType = PSP_CODEC_AAC;
|
||||
|
||||
// create aac decoder
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
// This is a direct port of Coldbird's code from http://code.google.com/p/aemu/
|
||||
// All credit goes to him!
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Reporting.h"
|
||||
|
||||
@@ -81,7 +81,7 @@ int PowerCpuMhzToHz(int desired, int pllHz) {
|
||||
}
|
||||
|
||||
// We match the PSP's HLE funcs better when we have the same float error, it seems.
|
||||
return (float)(freq / 1000000.0f) * 1000000;
|
||||
return (int)((float)(freq / 1000000.0f) * 1000000);
|
||||
}
|
||||
|
||||
int PowerPllMhzToHz(int mhz) {
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
// Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include "Core/HLE/sceUsbCam.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include "ext/jpge/jpgd.h"
|
||||
#include "ext/jpge/jpge.h"
|
||||
|
||||
+9
-9
@@ -19,7 +19,7 @@
|
||||
#include <cmath>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
@@ -75,10 +75,10 @@ static void CalculateFPS() {
|
||||
|
||||
if (now >= lastFpsTime + 1.0) {
|
||||
double frames = (numVBlanks - lastFpsFrame);
|
||||
actualFps = (actualFlips - lastActualFlips);
|
||||
actualFps = (float)(actualFlips - lastActualFlips);
|
||||
|
||||
fps = frames / (now - lastFpsTime);
|
||||
flips = 60.0 * (double)(gpuStats.numFlips - lastNumFlips) / frames;
|
||||
flips = (float)(60.0 * (double)(gpuStats.numFlips - lastNumFlips) / frames);
|
||||
|
||||
lastFpsFrame = numVBlanks;
|
||||
lastNumFlips = gpuStats.numFlips;
|
||||
@@ -105,17 +105,17 @@ static void CalculateFPS() {
|
||||
|
||||
// TODO: Also average actualFps
|
||||
void __DisplayGetFPS(float *out_vps, float *out_fps, float *out_actual_fps) {
|
||||
*out_vps = fps;
|
||||
*out_vps = (float)fps;
|
||||
*out_fps = flips;
|
||||
*out_actual_fps = actualFps;
|
||||
}
|
||||
|
||||
void __DisplayGetVPS(float *out_vps) {
|
||||
*out_vps = fps;
|
||||
*out_vps = (float)fps;
|
||||
}
|
||||
|
||||
void __DisplayGetAveragedFPS(float *out_vps, float *out_fps) {
|
||||
float avg = 0.0;
|
||||
double avg = 0.0;
|
||||
if (fpsHistoryValid > 0) {
|
||||
for (int i = 0; i < fpsHistoryValid; ++i) {
|
||||
avg += fpsHistory[i];
|
||||
@@ -123,7 +123,7 @@ void __DisplayGetAveragedFPS(float *out_vps, float *out_fps) {
|
||||
avg /= (double)fpsHistoryValid;
|
||||
}
|
||||
|
||||
*out_vps = *out_fps = avg;
|
||||
*out_vps = *out_fps = (float)avg;
|
||||
}
|
||||
|
||||
int __DisplayGetFlipCount() {
|
||||
@@ -147,7 +147,7 @@ uint64_t DisplayFrameStartTicks() {
|
||||
}
|
||||
|
||||
uint32_t __DisplayGetCurrentHcount() {
|
||||
const int ticksIntoFrame = CoreTiming::GetTicks() - frameStartTicks;
|
||||
const int ticksIntoFrame = (int)(CoreTiming::GetTicks() - frameStartTicks);
|
||||
const int ticksPerVblank = CoreTiming::GetClockFrequencyHz() / 60 / hCountPerVblank;
|
||||
// Can't seem to produce a 0 on real hardware, offsetting by 1 makes things look right.
|
||||
return 1 + (ticksIntoFrame / ticksPerVblank);
|
||||
@@ -279,7 +279,7 @@ int DisplayCalculateFrameSkip() {
|
||||
int frameSkipNum;
|
||||
if (g_Config.iFrameSkipType == 1) {
|
||||
// Calculate the frames to skip dynamically using the set percentage of the current fps
|
||||
frameSkipNum = ceil(flips * (static_cast<double>(g_Config.iFrameSkip) / 100.00));
|
||||
frameSkipNum = (int)ceil(flips * (static_cast<double>(g_Config.iFrameSkip) / 100.00));
|
||||
} else {
|
||||
// Use the set number of frames to skip
|
||||
frameSkipNum = g_Config.iFrameSkip;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <thread>
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/Compatibility.h"
|
||||
#include "Core/FileSystems/MetaFileSystem.h"
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ public:
|
||||
inline void Step();
|
||||
|
||||
int GetHeight() const {
|
||||
return height_ > (s64)PSP_SAS_ENVELOPE_HEIGHT_MAX ? PSP_SAS_ENVELOPE_HEIGHT_MAX : height_;
|
||||
return (int)(height_ > (s64)PSP_SAS_ENVELOPE_HEIGHT_MAX ? PSP_SAS_ENVELOPE_HEIGHT_MAX : height_);
|
||||
}
|
||||
bool NeedsKeyOn() const {
|
||||
return state_ == STATE_KEYON;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <cstring>
|
||||
#include <atomic>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/System/System.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/HLE/sceKernelMemory.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <cstring>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Core/MIPS/JitCommon/JitBlockCache.h"
|
||||
#include "Core/MIPS/JitCommon/JitCommon.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "ext/xxhash.h"
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -656,12 +656,12 @@ void JitBlockCache::ComputeStats(BlockCacheStats &bcStats) const {
|
||||
bcStats.maxBloatBlock = b->originalAddress;
|
||||
}
|
||||
totalBloat += bloat;
|
||||
bcStats.bloatMap[bloat] = b->originalAddress;
|
||||
bcStats.bloatMap[(float)bloat] = b->originalAddress;
|
||||
}
|
||||
bcStats.numBlocks = num_blocks_;
|
||||
bcStats.minBloat = minBloat;
|
||||
bcStats.maxBloat = maxBloat;
|
||||
bcStats.avgBloat = totalBloat / (double)num_blocks_;
|
||||
bcStats.minBloat = (float)minBloat;
|
||||
bcStats.maxBloat = (float)maxBloat;
|
||||
bcStats.avgBloat = (float)(totalBloat / (double)num_blocks_);
|
||||
}
|
||||
|
||||
JitBlockDebugInfo JitBlockCache::GetBlockDebugInfo(int blockNum) const {
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "Common/Math/math_util.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include "Common/Data/Random/Rng.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
// #include "Core/CoreParameter.h"
|
||||
#include "Core/Opcode.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "Common/BitSet.h"
|
||||
#include "Common/BitScan.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
|
||||
@@ -634,7 +634,7 @@ namespace MIPSInt
|
||||
case 20: d[i] = powf(2.0f, s[i]); break; //vexp2
|
||||
case 21: d[i] = logf(s[i])/log(2.0f); break; //vlog2
|
||||
case 22: d[i] = USE_VPFU_SQRT ? vfpu_sqrt(s[i]) : fabsf(sqrtf(s[i])); break; //vsqrt
|
||||
case 23: d[i] = asinf(s[i]) / M_PI_2; break; //vasin
|
||||
case 23: d[i] = (float)(asinf(s[i]) / M_PI_2); break; //vasin
|
||||
case 24: d[i] = -1.0f / s[i]; break; // vnrcp
|
||||
case 26: { d[i] = -vfpu_sin(s[i]); } break; // vnsin
|
||||
case 28: d[i] = 1.0f / powf(2.0, s[i]); break; // vrexp2
|
||||
|
||||
@@ -832,7 +832,7 @@ static inline uint32_t mant_mul(uint32_t a, uint32_t b) {
|
||||
if (m & 0x007FFFFF) {
|
||||
m += 0x01437000;
|
||||
}
|
||||
return m >> 23;
|
||||
return (uint32_t)(m >> 23);
|
||||
}
|
||||
|
||||
float vfpu_rsqrt(float a) {
|
||||
|
||||
@@ -55,7 +55,7 @@ extern float vfpu_cos(float);
|
||||
extern void vfpu_sincos(float, float&, float&);
|
||||
|
||||
inline float vfpu_asin(float angle) {
|
||||
return asinf(angle) / M_PI_2;
|
||||
return (float)(asinf(angle) / M_PI_2);
|
||||
}
|
||||
|
||||
inline float vfpu_clamp(float v, float min, float max) {
|
||||
|
||||
@@ -181,10 +181,12 @@ void Jit::GenerateFixedCode(JitOptions &jo) {
|
||||
#if PPSSPP_ARCH(X86)
|
||||
ADD(32, R(EAX), ImmPtr(GetBasePtr()));
|
||||
#elif PPSSPP_ARCH(AMD64)
|
||||
if (jo.reserveR15ForAsm)
|
||||
if (jo.reserveR15ForAsm) {
|
||||
ADD(64, R(RAX), R(JITBASEREG));
|
||||
else
|
||||
ADD(64, R(EAX), Imm32(jitbase));
|
||||
} else {
|
||||
// See above, reserveR15ForAsm is used when above 0x7FFFFFFF.
|
||||
ADD(64, R(EAX), Imm32((u32)jitbase));
|
||||
}
|
||||
#endif
|
||||
JMPptr(R(EAX));
|
||||
SetJumpTarget(notfound);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/BitSet.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/MIPS/x86/Jit.h"
|
||||
#include "Core/MIPS/x86/RegCache.h"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "Core/MIPS/MIPSCodeUtils.h"
|
||||
#include "Core/MIPS/x86/Jit.h"
|
||||
|
||||
+3
-2
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/MemFault.h"
|
||||
#include "Core/MemMap.h"
|
||||
@@ -118,7 +119,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
|
||||
|
||||
// OK, a guest executable did a bad access. Take care of it.
|
||||
|
||||
uint32_t guestAddress = hostAddress - baseAddress;
|
||||
uint32_t guestAddress = (uint32_t)(hostAddress - baseAddress);
|
||||
|
||||
// TODO: Share the struct between the various analyzers, that will allow us to share most of
|
||||
// the implementations here.
|
||||
@@ -173,7 +174,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
|
||||
// TODO: Do the other archs and platforms.
|
||||
#if PPSSPP_ARCH(AMD64) && PPSSPP_PLATFORM(WINDOWS)
|
||||
// We know which register the address is in, look in Asm.cpp.
|
||||
targetAddr = context->Rax;
|
||||
targetAddr = (uint32_t)context->Rax;
|
||||
#endif
|
||||
Core_ExecException(targetAddr, currentMIPS->pc, ExecExceptionType::JUMP);
|
||||
// Redirect execution to a crash handler that will switch to CoreState::CORE_RUNTIME_ERROR immediately.
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
// Includes
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Swap.h"
|
||||
#include "Core/Opcode.h"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "Core/MemMap.h"
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/File/Path.h"
|
||||
|
||||
@@ -17,12 +17,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/File/Path.h"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#else
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/Util/AudioFormat.h"
|
||||
#include "Core/Util/AudioFormatNEON.h"
|
||||
|
||||
|
||||
@@ -120,14 +120,14 @@ void DecodeBitMasks(int immN, int imms, int immr, uint64_t *tmask, uint64_t *wma
|
||||
// if len < 1 then ReservedValue();
|
||||
// assert M >= (1 << len);
|
||||
// Determine S, R and S - R parameters
|
||||
int levels = Ones(len);
|
||||
int levels = (int)Ones(len);
|
||||
uint32_t S = imms & levels;
|
||||
uint32_t R = immr & levels;
|
||||
int diff = S - R; // 6-bit subtract with borrow
|
||||
int esize = 1 << len;
|
||||
int d = diff & Ones(len - 1);
|
||||
uint32_t welem = Ones(S + 1);
|
||||
uint32_t telem = Ones(d + 1);
|
||||
uint32_t welem = (uint32_t)Ones(S + 1);
|
||||
uint32_t telem = (uint32_t)Ones(d + 1);
|
||||
if (wmask) {
|
||||
uint64_t rotated = ROR(welem, R, esize);
|
||||
*wmask = Replicate(rotated, esize);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "Common/Serialize/Serializer.h"
|
||||
#include "Common/Serialize/SerializeFuncs.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HDRemaster.h"
|
||||
#include "Core/Host.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "Common/Render/TextureAtlas.h"
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Common.h"
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "Common/Net/Resolve.h"
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Core/WaveFile.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
|
||||
Loaded 100 of 179 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user