Cleanup to link assembler on arm unittest builds.

This commit is contained in:
Unknown W. Brackets 2014-12-07 15:20:34 -08:00
parent 57910f2af6
commit 58ff826b73
4 changed files with 13 additions and 13 deletions

View File

@ -942,9 +942,7 @@ DataType SymbolMap::GetDataType(u32 startAddress) const {
return it->second.type;
}
#if defined(_WIN32)
void SymbolMap::getLabels(std::vector<LabelDefinition>& dest) const
void SymbolMap::GetLabels(std::vector<LabelDefinition> &dest) const
{
lock_guard guard(lock_);
for (auto it = activeLabels.begin(); it != activeLabels.end(); it++) {
@ -955,6 +953,8 @@ void SymbolMap::getLabels(std::vector<LabelDefinition>& dest) const
}
}
#if defined(_WIN32)
struct DefaultSymbol {
u32 address;
const char* name;

View File

@ -26,9 +26,7 @@
#include "Common/CommonTypes.h"
#ifdef _WIN32
#include "ext/armips/Core/Assembler.h"
#endif
enum SymbolType {
ST_NONE = 0,
@ -85,8 +83,8 @@ public:
#ifdef _WIN32
void FillSymbolListBox(HWND listbox, SymbolType symType) const;
void getLabels(std::vector<LabelDefinition>& dest) const;
#endif
void GetLabels(std::vector<LabelDefinition> &dest) const;
void AddModule(const char *name, u32 address, u32 size);
void UnloadModule(u32 address, u32 size);

View File

@ -9,20 +9,20 @@
#include "Core/MIPS/JitCommon/JitCommon.h"
#include "Core/Debugger/SymbolMap.h"
#ifdef _WIN32
#if defined(_WIN32) || defined(ANDROID)
#include "ext/armips/Core/Assembler.h"
#endif
namespace MIPSAsm
{
std::wstring errorText;
static std::wstring errorText;
std::wstring GetAssembleError()
{
return errorText;
}
#ifdef _WIN32
#if defined(_WIN32) || defined(ANDROID)
class PspAssemblerFile: public AssemblerFile
{
public:
@ -65,7 +65,7 @@ private:
bool MipsAssembleOpcode(const char* line, DebugInterface* cpu, u32 address)
{
#ifdef _WIN32
#if defined(_WIN32) || defined(ANDROID)
PspAssemblerFile file;
StringList errors;
@ -79,7 +79,7 @@ bool MipsAssembleOpcode(const char* line, DebugInterface* cpu, u32 address)
args.memoryFile = &file;
args.errorsResult = &errors;
symbolMap.getLabels(args.labels);
symbolMap.GetLabels(args.labels);
errorText = L"";
if (!runArmips(args))
@ -96,6 +96,7 @@ bool MipsAssembleOpcode(const char* line, DebugInterface* cpu, u32 address)
return true;
#else
errorText = L"Unsupported platform";
return false;
#endif
}

View File

@ -18,6 +18,7 @@
#include <algorithm>
#include "base/timeutil.h"
#include "input/input_state.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
#include "Core/MIPS/MIPSCodeUtils.h"
#include "Core/MIPS/MIPSDebugInterface.h"
@ -144,7 +145,7 @@ bool TestJit() {
for (size_t j = 0; j < ARRAY_SIZE(lines); ++j) {
p++;
if (!MIPSAsm::MipsAssembleOpcode(lines[j], currentDebugMIPS, addr)) {
printf("ERROR: %S\n", MIPSAsm::GetAssembleError().c_str());
printf("ERROR: %ls\n", MIPSAsm::GetAssembleError().c_str());
compileSuccess = false;
}
addr += 4;
@ -165,7 +166,7 @@ bool TestJit() {
printf("\n");
double jit_speed, interp_speed;
double jit_speed = 0.0, interp_speed = 0.0;
if (compileSuccess) {
interp_speed = ExecCPUTest();
mipsr4k.UpdateCore(CPU_JIT);