This commit is contained in:
Nguyen Anh Quynh 2016-12-28 13:49:04 +08:00
commit 0aea7f8602
3 changed files with 10 additions and 7 deletions

View File

@ -13,7 +13,7 @@
// These are masks of supported modes for each cpu/arch.
// They should be updated when changes are made to the uc_mode enum typedef.
#define UC_MODE_ARM_MASK (UC_MODE_ARM|UC_MODE_THUMB|UC_MODE_LITTLE_ENDIAN)
#define UC_MODE_ARM_MASK (UC_MODE_ARM|UC_MODE_THUMB|UC_MODE_LITTLE_ENDIAN|UC_MODE_MCLASS)
#define UC_MODE_MIPS_MASK (UC_MODE_MIPS32|UC_MODE_MIPS64|UC_MODE_LITTLE_ENDIAN|UC_MODE_BIG_ENDIAN)
#define UC_MODE_X86_MASK (UC_MODE_16|UC_MODE_32|UC_MODE_64|UC_MODE_LITTLE_ENDIAN)
#define UC_MODE_PPC_MASK (UC_MODE_PPC64|UC_MODE_BIG_ENDIAN)

View File

@ -19,8 +19,11 @@
static int tosa_init(struct uc_struct *uc, MachineState *machine)
{
//cpu_arm_init(uc, "pxa255");
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15"); // FIXME
if (uc->mode & UC_MODE_MCLASS) {
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-m3");
} else {
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15");
}
return 0;
}

View File

@ -1,16 +1,16 @@
@echo on
:: This script invokes the visual studio linker to construct a static library file that can be used outside of mingw.
:: The unicorn.def file that it references below is produced by the mingw compiler via a linker flag.
:: This script invokes the Visual Studio linker to construct a static library file that can be used outside of Mingw.
:: The unicorn.def file that it references below is produced by the Mingw compiler via a linker flag.
:: The arch (x86 or x64) we are working on should be passed via the first argument to this script.
:: Look up the Visual Studio install path via the registry
:: http://stackoverflow.com/questions/445167/how-can-i-get-the-value-of-a-registry-key-from-within-a-batch-script
:: If anyone ever tells you that windows is a reasonable operating system, they are wrong
:: If anyone ever tells you that Windows is a reasonable operating system, they are wrong
FOR /F "usebackq tokens=3*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0" /v InstallDir`) DO (
set appdir=%%A %%B
)
:: Add the visual studio binaries to our path and run the linker
:: Add the Visual Studio binaries to our path and run the linker
call "%appdir%..\..\VC\vcvarsall.bat" %1
call lib /machine:%1 /def:unicorn.def