From 206819bd98a0107906ddc7fadf612b690dbb5527 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sun, 22 Jan 2017 21:27:17 +0800 Subject: [PATCH] cleanup after msvc port --- qemu/hw/core/machine.c | 4 +- qemu/hw/core/qdev.c | 16 +- qemu/hw/i386/pc.c | 10 +- qemu/hw/intc/apic_common.c | 8 +- qemu/include/elf.h | 6 +- qemu/include/qemu/osdep.h | 94 ----- qemu/memory.c | 6 +- qemu/qom/cpu.c | 10 +- qemu/softmmu_template.h | 34 +- qemu/target-arm/arm-semi.c | 432 -------------------- qemu/target-i386/cpu.c | 14 +- qemu/target-i386/fpu_helper.c | 1 - qemu/target-i386/svm_helper.c | 18 +- qemu/target-i386/translate.c | 80 ++-- qemu/target-m68k/m68k-semi.c | 114 ------ samples/mem_apis.c | 2 - samples/sample_arm.c | 2 - samples/sample_arm64.c | 2 - samples/sample_batch_reg.c | 1 - samples/sample_m68k.c | 2 - samples/sample_mips.c | 2 - samples/sample_sparc.c | 2 - samples/sample_x86_32_gdt_and_seg_regs.c | 2 - samples/shellcode.c | 2 - tests/regress/block_test.c | 2 - tests/regress/eflags_noset.c | 1 - tests/regress/eflags_nosync.c | 1 - tests/regress/emu_clear_errors.c | 2 - tests/regress/emu_stop_in_hook_overrun.c | 2 - tests/regress/hook_extrainvoke.c | 1 - tests/regress/invalid_read_in_cpu_tb_exec.c | 1 - tests/regress/mem_64_c.c | 1 - tests/regress/mem_double_unmap.c | 2 - tests/regress/mem_exec.c | 2 - tests/regress/mem_fuzz.c | 2 - tests/regress/mem_nofree.c | 1 - tests/regress/mem_protect.c | 2 - tests/regress/mem_unmap.c | 2 - tests/regress/memleak_arm.c | 2 - tests/regress/memleak_arm64.c | 2 - tests/regress/memleak_m68k.c | 2 - tests/regress/memleak_mips.c | 2 - tests/regress/memleak_sparc.c | 2 - tests/regress/memleak_x86.c | 2 - tests/regress/mips_branch_likely_issue.c | 2 - tests/regress/mips_delay_slot_code_hook.c | 2 - tests/regress/nr_mem_test.c | 2 - tests/regress/rep_movsb.c | 2 - tests/regress/ro_mem_test.c | 2 - tests/regress/rw_hookstack.c | 1 - tests/regress/threaded_emu_start.c | 2 - tests/regress/timeout_segfault.c | 2 - tests/unit/test_gdt_idt_x86.c | 2 - tests/unit/test_hang.c | 2 +- tests/unit/test_hookcounts.c | 2 +- tests/unit/test_mem_high.c | 2 +- tests/unit/test_multihook.c | 2 +- tests/unit/test_pc_change.c | 2 +- tests/unit/test_tb_x86.c | 2 +- tests/unit/test_x86.c | 2 +- tests/unit/test_x86_rip_bug.c | 2 - tests/unit/test_x86_shl_enter_leave.c | 2 +- tests/unit/test_x86_soft_paging.c | 2 +- 63 files changed, 117 insertions(+), 818 deletions(-) delete mode 100644 qemu/target-arm/arm-semi.c delete mode 100644 qemu/target-m68k/m68k-semi.c diff --git a/qemu/hw/core/machine.c b/qemu/hw/core/machine.c index 6320fd60..fa36062b 100644 --- a/qemu/hw/core/machine.c +++ b/qemu/hw/core/machine.c @@ -23,7 +23,7 @@ static void machine_finalize(struct uc_struct *uc, Object *obj, void *opaque) static const TypeInfo machine_info = { TYPE_MACHINE, TYPE_OBJECT, - + sizeof(MachineClass), sizeof(MachineState), NULL, @@ -31,7 +31,7 @@ static const TypeInfo machine_info = { machine_initfn, NULL, machine_finalize, - + NULL, NULL, diff --git a/qemu/hw/core/qdev.c b/qemu/hw/core/qdev.c index ca75d19d..8b98f2af 100644 --- a/qemu/hw/core/qdev.c +++ b/qemu/hw/core/qdev.c @@ -282,21 +282,21 @@ Object *qdev_get_machine(struct uc_struct *uc) static const TypeInfo device_type_info = { TYPE_DEVICE, TYPE_OBJECT, - + sizeof(DeviceClass), sizeof(DeviceState), NULL, - + device_initfn, device_post_init, device_finalize, - + NULL, device_class_init, device_class_base_init, NULL, - + true, }; @@ -319,21 +319,21 @@ static void qbus_finalize(struct uc_struct *uc, Object *obj, void *opaque) static const TypeInfo bus_info = { TYPE_BUS, TYPE_OBJECT, - + sizeof(BusClass), sizeof(BusState), NULL, - + qbus_initfn, NULL, qbus_finalize, - + NULL, bus_class_init, NULL, NULL, - + true, }; diff --git a/qemu/hw/i386/pc.c b/qemu/hw/i386/pc.c index d5f3ac1e..6377bee3 100644 --- a/qemu/hw/i386/pc.c +++ b/qemu/hw/i386/pc.c @@ -149,9 +149,9 @@ static void pc_machine_class_init(struct uc_struct *uc, ObjectClass *oc, void *d } static const TypeInfo pc_machine_info = { - TYPE_PC_MACHINE, + TYPE_PC_MACHINE, TYPE_MACHINE, - + sizeof(PCMachineClass), sizeof(PCMachineState), NULL, @@ -161,16 +161,16 @@ static const TypeInfo pc_machine_info = { NULL, NULL, - + pc_machine_class_init, NULL, NULL, true, - + NULL, NULL, - + // should this be added somehow? //.interfaces = (InterfaceInfo[]) { { } }, }; diff --git a/qemu/hw/intc/apic_common.c b/qemu/hw/intc/apic_common.c index f80b7351..ad7b35aa 100644 --- a/qemu/hw/intc/apic_common.c +++ b/qemu/hw/intc/apic_common.c @@ -164,7 +164,7 @@ void apic_init_reset(struct uc_struct *uc, DeviceState *dev) void apic_designate_bsp(struct uc_struct *uc, DeviceState *dev) { APICCommonState *s; - + if (dev == NULL) { return; } @@ -249,7 +249,7 @@ static void apic_common_class_init(struct uc_struct *uc, ObjectClass *klass, voi static const TypeInfo apic_common_type = { TYPE_APIC_COMMON, TYPE_DEVICE, - + sizeof(APICCommonClass), sizeof(APICCommonState), NULL, @@ -257,13 +257,13 @@ static const TypeInfo apic_common_type = { NULL, NULL, NULL, - + NULL, apic_common_class_init, NULL, NULL, - + true, }; diff --git a/qemu/include/elf.h b/qemu/include/elf.h index 3eeb6001..dc543423 100644 --- a/qemu/include/elf.h +++ b/qemu/include/elf.h @@ -1,5 +1,5 @@ -#ifndef _QEMU_ELF_H -#define _QEMU_ELF_H +#ifndef QEMU_ELF_H +#define QEMU_ELF_H /* * i386 ELF relocation types @@ -537,4 +537,4 @@ #define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */ #define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */ -#endif /* _QEMU_ELF_H */ \ No newline at end of file +#endif /* QEMU_ELF_H */ diff --git a/qemu/include/qemu/osdep.h b/qemu/include/qemu/osdep.h index 3c77fcfb..5387816d 100644 --- a/qemu/include/qemu/osdep.h +++ b/qemu/include/qemu/osdep.h @@ -17,8 +17,6 @@ #define WEXITSTATUS(x) (x) #endif -#include "unicorn/platform.h" - #if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10 /* [u]int_fast*_t not in */ typedef unsigned char uint_fast8_t; @@ -110,67 +108,6 @@ void *qemu_anon_ram_alloc(size_t size, uint64_t *align); void qemu_vfree(void *ptr); void qemu_anon_ram_free(void *ptr, size_t size); -#define QEMU_MADV_INVALID -1 - -#if defined(CONFIG_MADVISE) - -#define QEMU_MADV_WILLNEED MADV_WILLNEED -#define QEMU_MADV_DONTNEED MADV_DONTNEED -#ifdef MADV_DONTFORK -#define QEMU_MADV_DONTFORK MADV_DONTFORK -#else -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#endif -#ifdef MADV_MERGEABLE -#define QEMU_MADV_MERGEABLE MADV_MERGEABLE -#else -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#endif -#ifdef MADV_UNMERGEABLE -#define QEMU_MADV_UNMERGEABLE MADV_UNMERGEABLE -#else -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#endif -#ifdef MADV_DODUMP -#define QEMU_MADV_DODUMP MADV_DODUMP -#else -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#endif -#ifdef MADV_DONTDUMP -#define QEMU_MADV_DONTDUMP MADV_DONTDUMP -#else -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#endif -#ifdef MADV_HUGEPAGE -#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE -#else -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID -#endif - -#elif defined(CONFIG_POSIX_MADVISE) - -#define QEMU_MADV_WILLNEED POSIX_MADV_WILLNEED -#define QEMU_MADV_DONTNEED POSIX_MADV_DONTNEED -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID - -#else /* no-op */ - -#define QEMU_MADV_WILLNEED QEMU_MADV_INVALID -#define QEMU_MADV_DONTNEED QEMU_MADV_INVALID -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID - -#endif - #if defined(__HAIKU__) && defined(__i386__) #define FMT_pid "%ld" #elif defined(WIN64) @@ -179,35 +116,6 @@ void qemu_anon_ram_free(void *ptr, size_t size); #define FMT_pid "%d" #endif -#ifdef _WIN32 -static inline void qemu_timersub(const struct timeval *val1, - const struct timeval *val2, - struct timeval *res) -{ - res->tv_sec = val1->tv_sec - val2->tv_sec; - if (val1->tv_usec < val2->tv_usec) { - res->tv_sec--; - res->tv_usec = val1->tv_usec - val2->tv_usec + 1000 * 1000; - } else { - res->tv_usec = val1->tv_usec - val2->tv_usec; - } -} -#else -#define qemu_timersub timersub -#endif - -void qemu_set_cloexec(int fd); - -void qemu_set_version(const char *); -const char *qemu_get_version(void); - -void fips_set_state(bool requested); -bool fips_get_state(void); - -/* Get the saved exec dir. - * Caller needs to release the returned string by g_free() */ -char *qemu_get_exec_dir(void); - /** * qemu_getauxval: * @type: the auxiliary vector key to lookup @@ -217,6 +125,4 @@ char *qemu_get_exec_dir(void); */ unsigned long qemu_getauxval(unsigned long type); -void qemu_set_tty_echo(int fd, bool echo); - #endif diff --git a/qemu/memory.c b/qemu/memory.c index 36b8fc19..85dbeaad 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -1095,9 +1095,9 @@ static bool unassigned_mem_accepts(void *opaque, hwaddr addr, const MemoryRegionOps unassigned_mem_ops = { NULL, NULL, - + DEVICE_NATIVE_ENDIAN, - + {0,0,false,unassigned_mem_accepts}, }; @@ -1875,7 +1875,7 @@ typedef QTAILQ_HEAD(queue, MemoryRegionList) MemoryRegionListHead; static const TypeInfo memory_region_info = { TYPE_MEMORY_REGION, TYPE_OBJECT, - + 0, sizeof(MemoryRegion), NULL, diff --git a/qemu/qom/cpu.c b/qemu/qom/cpu.c index cea48afc..2c3a1935 100644 --- a/qemu/qom/cpu.c +++ b/qemu/qom/cpu.c @@ -260,21 +260,21 @@ static void cpu_class_init(struct uc_struct *uc, ObjectClass *klass, void *data) static const TypeInfo cpu_type_info = { TYPE_CPU, TYPE_DEVICE, - + sizeof(CPUClass), sizeof(CPUState), NULL, - + cpu_common_initfn, NULL, NULL, - + NULL, - + cpu_class_init, NULL, NULL, - + true, }; diff --git a/qemu/softmmu_template.h b/qemu/softmmu_template.h index 6903e7d1..9f81e0f4 100644 --- a/qemu/softmmu_template.h +++ b/qemu/softmmu_template.h @@ -1,14 +1,26 @@ -/* * Software MMU support * * Generate helpers used by TCG for qemu_ld/st ops -and code load * functions. * * Included from target op helpers and exec.c. * * -Copyright (c) 2003 Fabrice Bellard * * This library is free software; you can -redistribute it and/or * modify it under the terms of the GNU Lesser General -Public * License as published by the Free Software Foundation; either * version -2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more -details. * * You should have received a copy of the GNU Lesser General Public * -License along with this library; if not, see . */ +/* + * Software MMU support + * + * Generate helpers used by TCG for qemu_ld/st ops and code load + * functions. + * + * Included from target op helpers and exec.c. + * + * Copyright (c) 2003 Fabrice Bellard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ /* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */ #include "qemu/timer.h" diff --git a/qemu/target-arm/arm-semi.c b/qemu/target-arm/arm-semi.c deleted file mode 100644 index fa7d8906..00000000 --- a/qemu/target-arm/arm-semi.c +++ /dev/null @@ -1,432 +0,0 @@ -/* - * Arm "Angel" semihosting syscalls - * - * Copyright (c) 2005, 2007 CodeSourcery. - * Written by Paul Brook. - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#include -#include -#include -#include "unicorn/platform.h" -#include -#include -#include - -#include "cpu.h" -#ifdef CONFIG_USER_ONLY -#include "qemu.h" - -#define ARM_ANGEL_HEAP_SIZE (128 * 1024 * 1024) -#else -#include "qemu-common.h" -#include "hw/arm/arm.h" -#endif - -#define TARGET_SYS_OPEN 0x01 -#define TARGET_SYS_CLOSE 0x02 -#define TARGET_SYS_WRITEC 0x03 -#define TARGET_SYS_WRITE0 0x04 -#define TARGET_SYS_WRITE 0x05 -#define TARGET_SYS_READ 0x06 -#define TARGET_SYS_READC 0x07 -#define TARGET_SYS_ISTTY 0x09 -#define TARGET_SYS_SEEK 0x0a -#define TARGET_SYS_FLEN 0x0c -#define TARGET_SYS_TMPNAM 0x0d -#define TARGET_SYS_REMOVE 0x0e -#define TARGET_SYS_RENAME 0x0f -#define TARGET_SYS_CLOCK 0x10 -#define TARGET_SYS_TIME 0x11 -#define TARGET_SYS_SYSTEM 0x12 -#define TARGET_SYS_ERRNO 0x13 -#define TARGET_SYS_GET_CMDLINE 0x15 -#define TARGET_SYS_HEAPINFO 0x16 -#define TARGET_SYS_EXIT 0x18 - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -#define GDB_O_RDONLY 0x000 -#define GDB_O_WRONLY 0x001 -#define GDB_O_RDWR 0x002 -#define GDB_O_APPEND 0x008 -#define GDB_O_CREAT 0x200 -#define GDB_O_TRUNC 0x400 -#define GDB_O_BINARY 0 - -static int open_modeflags[12] = { - O_RDONLY, - O_RDONLY | O_BINARY, - O_RDWR, - O_RDWR | O_BINARY, - O_WRONLY | O_CREAT | O_TRUNC, - O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, - O_RDWR | O_CREAT | O_TRUNC, - O_RDWR | O_CREAT | O_TRUNC | O_BINARY, - O_WRONLY | O_CREAT | O_APPEND, - O_WRONLY | O_CREAT | O_APPEND | O_BINARY, - O_RDWR | O_CREAT | O_APPEND, - O_RDWR | O_CREAT | O_APPEND | O_BINARY -}; - -#ifdef CONFIG_USER_ONLY -static inline uint32_t set_swi_errno(TaskState *ts, uint32_t code) -{ - if (code == (uint32_t)-1) - ts->swi_errno = errno; - return code; -} -#else -static inline uint32_t set_swi_errno(CPUARMState *env, uint32_t code) -{ - return code; -} - -#include "exec/softmmu-semi.h" -#endif - -#if !defined(CONFIG_USER_ONLY) -static target_ulong syscall_err; -#endif - -/* Read the input value from the argument block; fail the semihosting - * call if the memory read fails. - */ -#define GET_ARG(n) do { \ - if (get_user_ual(arg ## n, args + (n) * 4)) { \ - return (uint32_t)-1; \ - } \ -} while (0) - -ram_addr_t ram_size = 0x10000; // qq - -#define SET_ARG(n, val) put_user_ual(val, args + (n) * 4) -uint32_t do_arm_semihosting(CPUARMState *env) -{ - ARMCPU *cpu = arm_env_get_cpu(env); - CPUState *cs = CPU(cpu); - target_ulong args; - target_ulong arg0, arg1, arg2; - char * s; - int nr; - uint32_t ret; - uint32_t len; -#ifdef CONFIG_USER_ONLY - TaskState *ts = cs->opaque; -#else - CPUARMState *ts = env; -#endif - - nr = env->regs[0]; - args = env->regs[1]; - switch (nr) { - case TARGET_SYS_OPEN: - GET_ARG(0); - GET_ARG(1); - GET_ARG(2); - s = lock_user_string(arg0); - if (!s) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - if (arg1 >= 12) { - unlock_user(s, arg0, 0); - return (uint32_t)-1; - } - if (strcmp(s, ":tt") == 0) { - int result_fileno = arg1 < 4 ? STDIN_FILENO : STDOUT_FILENO; - unlock_user(s, arg0, 0); - return result_fileno; - } - ret = set_swi_errno(ts, open(s, open_modeflags[arg1], 0644)); - unlock_user(s, arg0, 0); - return ret; - case TARGET_SYS_CLOSE: - GET_ARG(0); - return set_swi_errno(ts, close(arg0)); - case TARGET_SYS_WRITEC: - { - char c; - - if (get_user_u8(c, args)) - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - /* Write to debug console. stderr is near enough. */ - return write(STDERR_FILENO, &c, 1); - } - case TARGET_SYS_WRITE0: - if (!(s = lock_user_string(args))) - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - len = strlen(s); - ret = write(STDERR_FILENO, s, len); - unlock_user(s, args, 0); - return ret; - case TARGET_SYS_WRITE: - GET_ARG(0); - GET_ARG(1); - GET_ARG(2); - len = arg2; - s = lock_user(VERIFY_READ, arg1, len, 1); - if (!s) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - ret = set_swi_errno(ts, write(arg0, s, len)); - unlock_user(s, arg1, 0); - if (ret == (uint32_t)-1) - return -1; - return len - ret; - case TARGET_SYS_READ: - GET_ARG(0); - GET_ARG(1); - GET_ARG(2); - len = arg2; - s = lock_user(VERIFY_WRITE, arg1, len, 0); - if (!s) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - do { - ret = set_swi_errno(ts, read(arg0, s, len)); - } while (ret == -1 && errno == EINTR); - unlock_user(s, arg1, len); - if (ret == (uint32_t)-1) - return -1; - return len - ret; - case TARGET_SYS_READC: - /* XXX: Read from debug console. Not implemented. */ - return 0; - case TARGET_SYS_ISTTY: - GET_ARG(0); - return isatty(arg0); - case TARGET_SYS_SEEK: - GET_ARG(0); - GET_ARG(1); - ret = set_swi_errno(ts, lseek(arg0, arg1, SEEK_SET)); - if (ret == (uint32_t)-1) - return -1; - return 0; - case TARGET_SYS_FLEN: - GET_ARG(0); - struct stat buf; - ret = set_swi_errno(ts, fstat(arg0, &buf)); - if (ret == (uint32_t)-1) - return -1; - return buf.st_size; - case TARGET_SYS_TMPNAM: - /* XXX: Not implemented. */ - return -1; - case TARGET_SYS_REMOVE: - GET_ARG(0); - GET_ARG(1); - s = lock_user_string(arg0); - if (!s) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - ret = set_swi_errno(ts, remove(s)); - unlock_user(s, arg0, 0); - return ret; - case TARGET_SYS_RENAME: - GET_ARG(0); - GET_ARG(1); - GET_ARG(2); - //GET_ARG(3); - char *s2; - s = lock_user_string(arg0); - s2 = lock_user_string(arg2); - if (!s || !s2) - /* FIXME - should this error code be -TARGET_EFAULT ? */ - ret = (uint32_t)-1; - else - ret = set_swi_errno(ts, rename(s, s2)); - if (s2) - unlock_user(s2, arg2, 0); - if (s) - unlock_user(s, arg0, 0); - return ret; - case TARGET_SYS_CLOCK: - return clock() / (CLOCKS_PER_SEC / 100); - case TARGET_SYS_TIME: - return set_swi_errno(ts, time(NULL)); - case TARGET_SYS_SYSTEM: - GET_ARG(0); - GET_ARG(1); - s = lock_user_string(arg0); - if (!s) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - ret = set_swi_errno(ts, system(s)); - unlock_user(s, arg0, 0); - return ret; - case TARGET_SYS_ERRNO: -#ifdef CONFIG_USER_ONLY - return ts->swi_errno; -#else - return syscall_err; -#endif - case TARGET_SYS_GET_CMDLINE: - { - /* Build a command-line from the original argv. - * - * The inputs are: - * * arg0, pointer to a buffer of at least the size - * specified in arg1. - * * arg1, size of the buffer pointed to by arg0 in - * bytes. - * - * The outputs are: - * * arg0, pointer to null-terminated string of the - * command line. - * * arg1, length of the string pointed to by arg0. - */ - - char *output_buffer; - size_t input_size; - size_t output_size; - int status = 0; - GET_ARG(0); - GET_ARG(1); - input_size = arg1; - /* Compute the size of the output string. */ -#if !defined(CONFIG_USER_ONLY) - output_size = strlen(ts->boot_info->kernel_filename) - + 1 /* Separating space. */ - + strlen(ts->boot_info->kernel_cmdline) - + 1; /* Terminating null byte. */ -#else - unsigned int i; - - output_size = ts->info->arg_end - ts->info->arg_start; - if (!output_size) { - /* We special-case the "empty command line" case (argc==0). - Just provide the terminating 0. */ - output_size = 1; - } -#endif - - if (output_size > input_size) { - /* Not enough space to store command-line arguments. */ - return -1; - } - - /* Adjust the command-line length. */ - if (SET_ARG(1, output_size - 1)) { - /* Couldn't write back to argument block */ - return -1; - } - - /* Lock the buffer on the ARM side. */ - output_buffer = lock_user(VERIFY_WRITE, arg0, output_size, 0); - if (!output_buffer) { - return -1; - } - - /* Copy the command-line arguments. */ -#if !defined(CONFIG_USER_ONLY) - pstrcpy(output_buffer, output_size, ts->boot_info->kernel_filename); - pstrcat(output_buffer, output_size, " "); - pstrcat(output_buffer, output_size, ts->boot_info->kernel_cmdline); -#else - if (output_size == 1) { - /* Empty command-line. */ - output_buffer[0] = '\0'; - goto out; - } - - if (copy_from_user(output_buffer, ts->info->arg_start, - output_size)) { - status = -1; - goto out; - } - - /* Separate arguments by white spaces. */ - for (i = 0; i < output_size - 1; i++) { - if (output_buffer[i] == 0) { - output_buffer[i] = ' '; - } - } - out: -#endif - /* Unlock the buffer on the ARM side. */ - unlock_user(output_buffer, arg0, output_size); - - return status; - } - case TARGET_SYS_HEAPINFO: - { - uint32_t *ptr; - uint32_t limit; - GET_ARG(0); - -#ifdef CONFIG_USER_ONLY - /* Some C libraries assume the heap immediately follows .bss, so - allocate it using sbrk. */ - if (!ts->heap_limit) { - abi_ulong ret; - - ts->heap_base = do_brk(0); - limit = ts->heap_base + ARM_ANGEL_HEAP_SIZE; - /* Try a big heap, and reduce the size if that fails. */ - for (;;) { - ret = do_brk(limit); - if (ret >= limit) { - break; - } - limit = (ts->heap_base >> 1) + (limit >> 1); - } - ts->heap_limit = limit; - } - - ptr = lock_user(VERIFY_WRITE, arg0, 16, 0); - if (!ptr) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - ptr[0] = tswap32(ts->heap_base); - ptr[1] = tswap32(ts->heap_limit); - ptr[2] = tswap32(ts->stack_base); - ptr[3] = tswap32(0); /* Stack limit. */ - unlock_user(ptr, arg0, 16); -#else - limit = ram_size; - ptr = lock_user(VERIFY_WRITE, arg0, 16, 0); - if (!ptr) { - /* FIXME - should this error code be -TARGET_EFAULT ? */ - return (uint32_t)-1; - } - /* TODO: Make this use the limit of the loaded application. */ - ptr[0] = tswap32(limit / 2); - ptr[1] = tswap32(limit); - ptr[2] = tswap32(limit); /* Stack base */ - ptr[3] = tswap32(0); /* Stack limit. */ - unlock_user(ptr, arg0, 16); -#endif - return 0; - } - case TARGET_SYS_EXIT: - //gdb_exit(env, 0); - exit(0); - default: - fprintf(stderr, "qemu: Unsupported SemiHosting SWI 0x%02x\n", nr); - cpu_dump_state(cs, stderr, fprintf, 0); - abort(); - } -} diff --git a/qemu/target-i386/cpu.c b/qemu/target-i386/cpu.c index 895366cb..7f574a3f 100644 --- a/qemu/target-i386/cpu.c +++ b/qemu/target-i386/cpu.c @@ -1842,7 +1842,7 @@ static void x86_register_cpudef_type(struct uc_struct *uc, X86CPUDefinition *def TypeInfo ti = { typename, TYPE_X86_CPU, - + 0, 0, NULL, @@ -1850,9 +1850,9 @@ static void x86_register_cpudef_type(struct uc_struct *uc, X86CPUDefinition *def NULL, NULL, NULL, - + def, - + x86_cpu_cpudef_class_init, }; @@ -2604,21 +2604,21 @@ void x86_cpu_register_types(void *opaque) const TypeInfo x86_cpu_type_info = { TYPE_X86_CPU, TYPE_CPU, - + sizeof(X86CPUClass), sizeof(X86CPU), opaque, - + x86_cpu_initfn, NULL, NULL, - + NULL, x86_cpu_common_class_init, NULL, NULL, - + true, }; diff --git a/qemu/target-i386/fpu_helper.c b/qemu/target-i386/fpu_helper.c index 53381901..70018740 100644 --- a/qemu/target-i386/fpu_helper.c +++ b/qemu/target-i386/fpu_helper.c @@ -759,7 +759,6 @@ void helper_fprem1(CPUX86State *env) st1 = floatx80_to_double(env, ST1); if (isinf(st0) || isnan(st0) || isnan(st1) || (st1 == 0.0)) { - ST0 = double_to_floatx80(env, NAN); /* NaN */ env->fpus &= ~0x4700; /* (C3,C2,C1,C0) <-- 0000 */ return; diff --git a/qemu/target-i386/svm_helper.c b/qemu/target-i386/svm_helper.c index 00e7db3a..085749d5 100644 --- a/qemu/target-i386/svm_helper.c +++ b/qemu/target-i386/svm_helper.c @@ -486,27 +486,27 @@ void helper_svm_check_intercept_param(CPUX86State *env, uint32_t type, if (likely(!(env->hflags & HF_SVMI_MASK))) { return; } - if( (int32_t)type >= SVM_EXIT_READ_CR0 && type <= SVM_EXIT_READ_CR0 + 8 ) { + if ( (int32_t)type >= SVM_EXIT_READ_CR0 && type <= SVM_EXIT_READ_CR0 + 8 ) { if (env->intercept_cr_read & (1 << (type - SVM_EXIT_READ_CR0))) { helper_vmexit(env, type, param); } - } else if( type >= SVM_EXIT_WRITE_CR0 && type <= SVM_EXIT_WRITE_CR0 + 8 ) { + } else if ( type >= SVM_EXIT_WRITE_CR0 && type <= SVM_EXIT_WRITE_CR0 + 8 ) { if (env->intercept_cr_write & (1 << (type - SVM_EXIT_WRITE_CR0))) { helper_vmexit(env, type, param); } - } else if( type >= SVM_EXIT_READ_DR0 && type <= SVM_EXIT_READ_DR0 + 7 ) { + } else if ( type >= SVM_EXIT_READ_DR0 && type <= SVM_EXIT_READ_DR0 + 7 ) { if (env->intercept_dr_read & (1 << (type - SVM_EXIT_READ_DR0))) { helper_vmexit(env, type, param); } - } else if( type >= SVM_EXIT_WRITE_DR0 && type <= SVM_EXIT_WRITE_DR0 + 7 ) { + } else if ( type >= SVM_EXIT_WRITE_DR0 && type <= SVM_EXIT_WRITE_DR0 + 7 ) { if (env->intercept_dr_write & (1 << (type - SVM_EXIT_WRITE_DR0))) { helper_vmexit(env, type, param); } - } else if( type >= SVM_EXIT_EXCP_BASE && type <= SVM_EXIT_EXCP_BASE + 31 ) { + } else if ( type >= SVM_EXIT_EXCP_BASE && type <= SVM_EXIT_EXCP_BASE + 31 ) { if (env->intercept_exceptions & (1 << (type - SVM_EXIT_EXCP_BASE))) { helper_vmexit(env, type, param); } - } else if( type == SVM_EXIT_MSR ) { + } else if ( type == SVM_EXIT_MSR ) { if (env->intercept & (1ULL << (SVM_EXIT_MSR - SVM_EXIT_INTR))) { /* FIXME: this should be read in at vmrun (faster this way?) */ uint64_t addr = ldq_phys(cs->as, env->vm_vmcb + @@ -515,14 +515,14 @@ void helper_svm_check_intercept_param(CPUX86State *env, uint32_t type, uint32_t t0, t1; uint32_t ecx = (uint32_t)env->regs[R_ECX]; - if( (int32_t)ecx >= 0 && ecx <= 0x1fff ) { + if ( (int32_t)ecx >= 0 && ecx <= 0x1fff ) { t0 = (env->regs[R_ECX] * 2) % 8; t1 = (env->regs[R_ECX] * 2) / 8; - } else if( ecx >= 0xc0000000 && ecx <= 0xc0001fff ) { + } else if ( ecx >= 0xc0000000 && ecx <= 0xc0001fff ) { t0 = (8192 + env->regs[R_ECX] - 0xc0000000) * 2; t1 = (t0 / 8); t0 %= 8; - } else if( ecx >= 0xc0010000 && ecx <= 0xc0011fff ) { + } else if ( ecx >= 0xc0010000 && ecx <= 0xc0011fff ) { t0 = (16384 + env->regs[R_ECX] - 0xc0010000) * 2; t1 = (t0 / 8); t0 %= 8; diff --git a/qemu/target-i386/translate.c b/qemu/target-i386/translate.c index 65f75564..9cf8d3e8 100644 --- a/qemu/target-i386/translate.c +++ b/qemu/target-i386/translate.c @@ -1000,38 +1000,38 @@ static CCPrepare gen_prepare_eflags_c(DisasContext *s, TCGv reg) t1 = gen_ext_tl(tcg_ctx, cpu_tmp0, cpu_cc_src, size, false); t0 = gen_ext_tl(tcg_ctx, reg, cpu_cc_dst, size, false); add_sub: - return ccprepare_make(TCG_COND_LTU, t0,t1, 0,-1, true,false); + return ccprepare_make(TCG_COND_LTU, t0, t1, 0, -1, true, false); case CC_OP_LOGICB: case CC_OP_LOGICW: case CC_OP_LOGICL: case CC_OP_LOGICQ: case CC_OP_CLR: - return ccprepare_make(TCG_COND_NEVER, 0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_NEVER, 0, 0, 0, -1, false, false); case CC_OP_INCB: case CC_OP_INCW: case CC_OP_INCL: case CC_OP_INCQ: case CC_OP_DECB: case CC_OP_DECW: case CC_OP_DECL: case CC_OP_DECQ: - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,-1, false,true ); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, -1, false, true); case CC_OP_SHLB: case CC_OP_SHLW: case CC_OP_SHLL: case CC_OP_SHLQ: /* (CC_SRC >> (DATA_BITS - 1)) & 1 */ size = s->cc_op - CC_OP_SHLB; shift = (8 << size) - 1; - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,(target_ulong)(1 << shift), false,false); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, (target_ulong)(1 << shift), false, false); case CC_OP_MULB: case CC_OP_MULW: case CC_OP_MULL: case CC_OP_MULQ: - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,-1, false,false ); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, -1, false, false); case CC_OP_BMILGB: case CC_OP_BMILGW: case CC_OP_BMILGL: case CC_OP_BMILGQ: size = s->cc_op - CC_OP_BMILGB; t0 = gen_ext_tl(tcg_ctx, reg, cpu_cc_src, size, false); - return ccprepare_make(TCG_COND_EQ, t0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_EQ, t0, 0, 0, -1, false, false); case CC_OP_ADCX: case CC_OP_ADCOX: - return ccprepare_make(TCG_COND_NE, cpu_cc_dst,0, 0,-1, false,true); + return ccprepare_make(TCG_COND_NE, cpu_cc_dst, 0, 0, -1, false, true); case CC_OP_EFLAGS: case CC_OP_SARB: case CC_OP_SARW: case CC_OP_SARL: case CC_OP_SARQ: /* CC_SRC & 1 */ - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_C, false,false); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_C, false, false); default: /* The need to compute only C from CC_OP_DYNAMIC is important @@ -1039,7 +1039,7 @@ static CCPrepare gen_prepare_eflags_c(DisasContext *s, TCGv reg) gen_update_cc_op(s); gen_helper_cc_compute_c(tcg_ctx, reg, cpu_cc_dst, cpu_cc_src, cpu_cc_src2, cpu_cc_op); - return ccprepare_make(TCG_COND_NE, reg,0, 0,-1, false,true); + return ccprepare_make(TCG_COND_NE, reg, 0, 0, -1, false, true); } } @@ -1050,7 +1050,7 @@ static CCPrepare gen_prepare_eflags_p(DisasContext *s, TCGv reg) TCGv cpu_cc_src = *(TCGv *)tcg_ctx->cpu_cc_src; gen_compute_eflags(s); - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_P, false,false); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_P, false, false); } /* compute eflags.S to reg */ @@ -1068,14 +1068,14 @@ static CCPrepare gen_prepare_eflags_s(DisasContext *s, TCGv reg) case CC_OP_ADCX: case CC_OP_ADOX: case CC_OP_ADCOX: - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_S, false,false); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_S, false, false); case CC_OP_CLR: - return ccprepare_make(TCG_COND_NEVER, 0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_NEVER, 0, 0, 0, -1, false, false); default: { TCGMemOp size = (s->cc_op - CC_OP_ADDB) & 3; TCGv t0 = gen_ext_tl(tcg_ctx, reg, cpu_cc_dst, size, true); - return ccprepare_make(TCG_COND_LT, t0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_LT, t0, 0, 0, -1, false, false); } } } @@ -1090,12 +1090,12 @@ static CCPrepare gen_prepare_eflags_o(DisasContext *s, TCGv reg) switch (s->cc_op) { case CC_OP_ADOX: case CC_OP_ADCOX: - return ccprepare_make(TCG_COND_NE, cpu_cc_src2,0, 0,-1, false,true); + return ccprepare_make(TCG_COND_NE, cpu_cc_src2, 0, 0, -1, false, true); case CC_OP_CLR: - return ccprepare_make(TCG_COND_NEVER, 0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_NEVER, 0, 0, 0, -1, false, false); default: gen_compute_eflags(s); - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_O, false,false ); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_O, false, false); } } @@ -1114,14 +1114,14 @@ static CCPrepare gen_prepare_eflags_z(DisasContext *s, TCGv reg) case CC_OP_ADCX: case CC_OP_ADOX: case CC_OP_ADCOX: - return ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_Z, false,false); + return ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_Z, false, false); case CC_OP_CLR: - return ccprepare_make(TCG_COND_ALWAYS, 0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_ALWAYS, 0, 0, 0, -1, false, false); default: { TCGMemOp size = (s->cc_op - CC_OP_ADDB) & 3; TCGv t0 = gen_ext_tl(tcg_ctx, reg, cpu_cc_dst, size, false); - return ccprepare_make(TCG_COND_EQ, t0,0, 0,-1, false,false); + return ccprepare_make(TCG_COND_EQ, t0, 0, 0, -1, false, false); } } } @@ -1155,7 +1155,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg) tcg_gen_mov_tl(tcg_ctx, cpu_tmp4, cpu_cc_srcT); gen_extu(tcg_ctx, size, cpu_tmp4); t0 = gen_ext_tl(tcg_ctx, cpu_tmp0, cpu_cc_src, size, false); - cc = ccprepare_make(TCG_COND_LEU, cpu_tmp4,t0, 0,-1, true,false); + cc = ccprepare_make(TCG_COND_LEU, cpu_tmp4, t0, 0, -1, true, false); break; case JCC_L: @@ -1167,7 +1167,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg) tcg_gen_mov_tl(tcg_ctx, cpu_tmp4, cpu_cc_srcT); gen_exts(tcg_ctx, size, cpu_tmp4); t0 = gen_ext_tl(tcg_ctx, cpu_tmp0, cpu_cc_src, size, true); - cc = ccprepare_make(cond, cpu_tmp4,t0, 0,-1, true,false); + cc = ccprepare_make(cond, cpu_tmp4, t0, 0, -1, true, false); break; default: @@ -1190,7 +1190,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg) break; case JCC_BE: gen_compute_eflags(s); - cc = ccprepare_make(TCG_COND_NE, cpu_cc_src,0, 0,CC_Z | CC_C, false,false); + cc = ccprepare_make(TCG_COND_NE, cpu_cc_src, 0, 0, CC_Z | CC_C, false, false); break; case JCC_S: cc = gen_prepare_eflags_s(s, reg); @@ -1205,7 +1205,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg) } tcg_gen_shri_tl(tcg_ctx, reg, cpu_cc_src, 4); /* CC_O -> CC_S */ tcg_gen_xor_tl(tcg_ctx, reg, reg, cpu_cc_src); - cc = ccprepare_make(TCG_COND_NE, reg,0, 0,CC_S, false,false); + cc = ccprepare_make(TCG_COND_NE, reg, 0, 0, CC_S, false, false); break; default: case JCC_LE: @@ -1215,7 +1215,7 @@ static CCPrepare gen_prepare_cc(DisasContext *s, int b, TCGv reg) } tcg_gen_shri_tl(tcg_ctx, reg, cpu_cc_src, 4); /* CC_O -> CC_S */ tcg_gen_xor_tl(tcg_ctx, reg, reg, cpu_cc_src); - cc = ccprepare_make(TCG_COND_NE, reg,0, 0,CC_S | CC_Z, false,false); + cc = ccprepare_make(TCG_COND_NE, reg, 0, 0, CC_S | CC_Z, false, false); break; } break; @@ -3019,7 +3019,7 @@ typedef void (*SSEFunc_0_eppt)(TCGContext *s, TCGv_ptr env, TCGv_ptr reg_a, TCGv static const SSEFunc_0_epp sse_op_table1[256][4] = { // filler: 0x00 - 0x0e {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}, - + /* 3DNow! extensions */ { SSE_DUMMY }, /* femms */ { SSE_DUMMY }, /* pf. . . */ @@ -3033,10 +3033,10 @@ static const SSEFunc_0_epp sse_op_table1[256][4] = { { gen_helper_punpckhdq_xmm, gen_helper_punpckhqdq_xmm }, { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, /* movhps, movhpd, movshdup */ { SSE_SPECIAL, SSE_SPECIAL }, /* movhps, movhpd */ - + // filler: 0x18 - 0x27 {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, - + /* pure SSE operations */ { SSE_SPECIAL, SSE_SPECIAL }, /* movaps, movapd */ { SSE_SPECIAL, SSE_SPECIAL }, /* movaps, movapd */ @@ -3046,18 +3046,18 @@ static const SSEFunc_0_epp sse_op_table1[256][4] = { { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, /* cvtps2pi, cvtpd2pi, cvtsd2si, cvtss2si */ { gen_helper_ucomiss, gen_helper_ucomisd }, { gen_helper_comiss, gen_helper_comisd }, - + // filler: 0x30 - 0x37 {0},{0},{0},{0},{0},{0},{0},{0}, - + /* SSSE3, SSE4, MOVBE, CRC32, BMI1, BMI2, ADX. */ { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, {0}, // filler: 0x39 { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, - + // filler: 0x3b - 0x4f {0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, - + /* pure SSE operations */ { SSE_SPECIAL, SSE_SPECIAL }, /* movmskps, movmskpd */ SSE_FOP(sqrt), @@ -3112,14 +3112,14 @@ static const SSEFunc_0_epp sse_op_table1[256][4] = { { NULL, gen_helper_hsubpd, NULL, gen_helper_hsubps }, { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, /* movd, movd, , movq */ { SSE_SPECIAL, SSE_SPECIAL, SSE_SPECIAL }, /* movq, movdqa, movdqu */ - + // filler: 0x80 - 0xc1 {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0},{0},{0},{0},{0},{0},{0}, {0},{0}, - + SSE_FOP(cmpeq), // filler: 0xc3 @@ -3128,13 +3128,13 @@ static const SSEFunc_0_epp sse_op_table1[256][4] = { /* MMX ops and their SSE extensions */ { SSE_SPECIAL, SSE_SPECIAL }, /* pinsrw */ { SSE_SPECIAL, SSE_SPECIAL }, /* pextrw */ - + { (SSEFunc_0_epp)gen_helper_shufps, (SSEFunc_0_epp)gen_helper_shufpd }, /* XXX: casts */ // filler: 0xc7 - 0xcf {0}, {0},{0},{0},{0},{0},{0},{0},{0}, - + /* MMX ops and their SSE extensions */ { NULL, gen_helper_addsubpd, NULL, gen_helper_addsubps }, MMX_OP2(psrlw), @@ -3422,7 +3422,7 @@ static const struct SSEOpHelper_epp sse_op_table6[256] = { SSE41_OP(pmulld), SSE41_OP(phminposuw), // filler: 0x42 - 0xda - {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, + {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, {{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0},{{0},0}, @@ -4851,16 +4851,14 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b, if( (b >= 0x50 && b <= 0x5a) || (b >= 0x5c && b <= 0x5f) || - b == 0xc2 ) - { + b == 0xc2 ) { /* Most sse scalar operations. */ if (b1 == 2) { sz = 2; } else if (b1 == 3) { sz = 3; } - } - else if( b == 0x2e || /* ucomis[sd] */ + } else if( b == 0x2e || /* ucomis[sd] */ b == 0x2f ) /* comis[sd] */ { if (b1 == 0) { @@ -8461,7 +8459,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, s->prefix &= ~(PREFIX_REPZ | PREFIX_REPNZ | PREFIX_DATA); case 0x110: case 0x111: case 0x112: case 0x113: case 0x114: case 0x115: case 0x116: case 0x117: //case 0x110 ... 0x117: case 0x128: case 0x129: case 0x12a: case 0x12b: case 0x12c: case 0x12d: case 0x12e: case 0x12f: //case 0x128 ... 0x12f: - case 0x138: case 0x139: case 0x13a: + case 0x138: case 0x139: case 0x13a: // case 0x150 ... 0x179: case 0x150: case 0x151: case 0x152: case 0x153: case 0x154: case 0x155: case 0x156: case 0x157: case 0x158: case 0x159: case 0x15a: case 0x15b: case 0x15c: case 0x15d: case 0x15e: case 0x15f: diff --git a/qemu/target-m68k/m68k-semi.c b/qemu/target-m68k/m68k-semi.c deleted file mode 100644 index 7b2b25d7..00000000 --- a/qemu/target-m68k/m68k-semi.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * m68k/ColdFire Semihosting syscall interface - * - * Copyright (c) 2005-2007 CodeSourcery. - * - * 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; either version 2 of the License, or - * (at your option) any later version. - * - * 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 for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#include -#include -#include -#include -#include "unicorn/platform.h" -#include -#include -#include - -#include "cpu.h" -#if defined(CONFIG_USER_ONLY) -#include "qemu.h" -#define SEMIHOSTING_HEAP_SIZE (128 * 1024 * 1024) -#else -#include "qemu-common.h" -#include "exec/softmmu-semi.h" -#endif -#include "sysemu/sysemu.h" - -#define HOSTED_EXIT 0 -#define HOSTED_INIT_SIM 1 -#define HOSTED_OPEN 2 -#define HOSTED_CLOSE 3 -#define HOSTED_READ 4 -#define HOSTED_WRITE 5 -#define HOSTED_LSEEK 6 -#define HOSTED_RENAME 7 -#define HOSTED_UNLINK 8 -#define HOSTED_STAT 9 -#define HOSTED_FSTAT 10 -#define HOSTED_GETTIMEOFDAY 11 -#define HOSTED_ISATTY 12 -#define HOSTED_SYSTEM 13 - -static void translate_stat(CPUM68KState *env, target_ulong addr, struct stat *s) -{ -} - -static void m68k_semi_return_u32(CPUM68KState *env, uint32_t ret, uint32_t err) -{ - target_ulong args = env->dregs[1]; - if (put_user_u32(ret, args) || - put_user_u32(err, args + 4)) { - /* The m68k semihosting ABI does not provide any way to report this - * error to the guest, so the best we can do is log it in qemu. - * It is always a guest error not to pass us a valid argument block. - */ - qemu_log_mask(LOG_GUEST_ERROR, "m68k-semihosting: return value " - "discarded because argument block not writable\n"); - } -} - -static void m68k_semi_return_u64(CPUM68KState *env, uint64_t ret, uint32_t err) -{ - target_ulong args = env->dregs[1]; - if (put_user_u32(ret >> 32, args) || - put_user_u32(ret, args + 4) || - put_user_u32(err, args + 8)) { - /* No way to report this via m68k semihosting ABI; just log it */ - qemu_log_mask(LOG_GUEST_ERROR, "m68k-semihosting: return value " - "discarded because argument block not writable\n"); - } -} - -static int m68k_semi_is_fseek; - -static void m68k_semi_cb(CPUState *cs, target_ulong ret, target_ulong err) -{ - M68kCPU *cpu = M68K_CPU(cs->uc, cs); - CPUM68KState *env = &cpu->env; - - if (m68k_semi_is_fseek) { - /* FIXME: We've already lost the high bits of the fseek - return value. */ - m68k_semi_return_u64(env, ret, err); - m68k_semi_is_fseek = 0; - } else { - m68k_semi_return_u32(env, ret, err); - } -} - -/* Read the input value from the argument block; fail the semihosting - * call if the memory read fails. - */ -#define GET_ARG(n) do { \ - if (get_user_ual(arg ## n, args + (n) * 4)) { \ - result = -1; \ - errno = EFAULT; \ - goto failed; \ - } \ -} while (0) - -void do_m68k_semihosting(CPUM68KState *env, int nr) -{ -} diff --git a/samples/mem_apis.c b/samples/mem_apis.c index d79378c8..a60ba3d8 100644 --- a/samples/mem_apis.c +++ b/samples/mem_apis.c @@ -38,8 +38,6 @@ // posix specific includes #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_arm.c b/samples/sample_arm.c index b516f847..92fee0af 100644 --- a/samples/sample_arm.c +++ b/samples/sample_arm.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_arm64.c b/samples/sample_arm64.c index 1ce39124..bf1d117e 100644 --- a/samples/sample_arm64.c +++ b/samples/sample_arm64.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_batch_reg.c b/samples/sample_batch_reg.c index 5d3d55d2..9d4a7e64 100644 --- a/samples/sample_batch_reg.c +++ b/samples/sample_batch_reg.c @@ -1,4 +1,3 @@ -#include "unicorn/platform.h" #include #include #include diff --git a/samples/sample_m68k.c b/samples/sample_m68k.c index 272ef3e2..16568114 100644 --- a/samples/sample_m68k.c +++ b/samples/sample_m68k.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_mips.c b/samples/sample_mips.c index efe4012b..6290dfdd 100644 --- a/samples/sample_mips.c +++ b/samples/sample_mips.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_sparc.c b/samples/sample_sparc.c index 09770916..f1e74dc7 100644 --- a/samples/sample_sparc.c +++ b/samples/sample_sparc.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/samples/sample_x86_32_gdt_and_seg_regs.c b/samples/sample_x86_32_gdt_and_seg_regs.c index 42851d4a..19a8fae9 100644 --- a/samples/sample_x86_32_gdt_and_seg_regs.c +++ b/samples/sample_x86_32_gdt_and_seg_regs.c @@ -20,11 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#include "unicorn/platform.h" #include #include #include -#include "unicorn/platform.h" #pragma pack(push, 1) struct SegmentDescriptor { diff --git a/samples/shellcode.c b/samples/shellcode.c index 4e95c774..0e0c878a 100644 --- a/samples/shellcode.c +++ b/samples/shellcode.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/block_test.c b/tests/regress/block_test.c index 3b8c270e..5af825f3 100644 --- a/tests/regress/block_test.c +++ b/tests/regress/block_test.c @@ -1,8 +1,6 @@ #include -#include "unicorn/platform.h" #include #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/eflags_noset.c b/tests/regress/eflags_noset.c index bcaf6fe9..9d4f2291 100644 --- a/tests/regress/eflags_noset.c +++ b/tests/regress/eflags_noset.c @@ -1,6 +1,5 @@ #include #include -#include "unicorn/platform.h" #include #include diff --git a/tests/regress/eflags_nosync.c b/tests/regress/eflags_nosync.c index ae7cae10..37b79504 100644 --- a/tests/regress/eflags_nosync.c +++ b/tests/regress/eflags_nosync.c @@ -1,4 +1,3 @@ -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/emu_clear_errors.c b/tests/regress/emu_clear_errors.c index dccac5b9..7f03ec37 100644 --- a/tests/regress/emu_clear_errors.c +++ b/tests/regress/emu_clear_errors.c @@ -1,8 +1,6 @@ #include -#include "unicorn/platform.h" #include #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/emu_stop_in_hook_overrun.c b/tests/regress/emu_stop_in_hook_overrun.c index 1ec4953a..81ea93fd 100644 --- a/tests/regress/emu_stop_in_hook_overrun.c +++ b/tests/regress/emu_stop_in_hook_overrun.c @@ -22,8 +22,6 @@ Test for uc_emu_stop() in code hook not always stopping the emu at the current i // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #include "pthread.h" #endif // _MSC_VER diff --git a/tests/regress/hook_extrainvoke.c b/tests/regress/hook_extrainvoke.c index 2f595a37..8fd486f1 100644 --- a/tests/regress/hook_extrainvoke.c +++ b/tests/regress/hook_extrainvoke.c @@ -1,6 +1,5 @@ #include #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/invalid_read_in_cpu_tb_exec.c b/tests/regress/invalid_read_in_cpu_tb_exec.c index 6a7d4843..01e8a980 100644 --- a/tests/regress/invalid_read_in_cpu_tb_exec.c +++ b/tests/regress/invalid_read_in_cpu_tb_exec.c @@ -1,4 +1,3 @@ -#include "unicorn/platform.h" #include static void hook_block(uc_engine *uc, uint64_t address, uint32_t size, void *user_data) { diff --git a/tests/regress/mem_64_c.c b/tests/regress/mem_64_c.c index 5c3f4d91..9e84242c 100644 --- a/tests/regress/mem_64_c.c +++ b/tests/regress/mem_64_c.c @@ -1,5 +1,4 @@ #include -#include "unicorn/platform.h" #include uint64_t starts[] = {0x10000000, 0x110004000ll}; diff --git a/tests/regress/mem_double_unmap.c b/tests/regress/mem_double_unmap.c index b97a209a..a592f8a3 100644 --- a/tests/regress/mem_double_unmap.c +++ b/tests/regress/mem_double_unmap.c @@ -1,7 +1,5 @@ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/mem_exec.c b/tests/regress/mem_exec.c index c86920a1..3c248ba4 100644 --- a/tests/regress/mem_exec.c +++ b/tests/regress/mem_exec.c @@ -19,9 +19,7 @@ */ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/mem_fuzz.c b/tests/regress/mem_fuzz.c index b0096a7e..e54c8a3c 100644 --- a/tests/regress/mem_fuzz.c +++ b/tests/regress/mem_fuzz.c @@ -1,7 +1,5 @@ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/mem_nofree.c b/tests/regress/mem_nofree.c index 7c10e851..0a23091c 100644 --- a/tests/regress/mem_nofree.c +++ b/tests/regress/mem_nofree.c @@ -1,6 +1,5 @@ #include #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/mem_protect.c b/tests/regress/mem_protect.c index 598446ca..78eb360c 100644 --- a/tests/regress/mem_protect.c +++ b/tests/regress/mem_protect.c @@ -19,9 +19,7 @@ */ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/mem_unmap.c b/tests/regress/mem_unmap.c index b37bac3d..f2447e55 100644 --- a/tests/regress/mem_unmap.c +++ b/tests/regress/mem_unmap.c @@ -20,9 +20,7 @@ */ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/memleak_arm.c b/tests/regress/memleak_arm.c index d0e744e5..0e2e9aa9 100644 --- a/tests/regress/memleak_arm.c +++ b/tests/regress/memleak_arm.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/memleak_arm64.c b/tests/regress/memleak_arm64.c index 4ddb9f69..1ce62771 100644 --- a/tests/regress/memleak_arm64.c +++ b/tests/regress/memleak_arm64.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/memleak_m68k.c b/tests/regress/memleak_m68k.c index 084045e1..e8cbb7cd 100644 --- a/tests/regress/memleak_m68k.c +++ b/tests/regress/memleak_m68k.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/memleak_mips.c b/tests/regress/memleak_mips.c index ccf01eb7..d0244bbe 100644 --- a/tests/regress/memleak_mips.c +++ b/tests/regress/memleak_mips.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/memleak_sparc.c b/tests/regress/memleak_sparc.c index 2a4e4f67..049ebda5 100644 --- a/tests/regress/memleak_sparc.c +++ b/tests/regress/memleak_sparc.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/memleak_x86.c b/tests/regress/memleak_x86.c index 2572ddd4..a336af45 100644 --- a/tests/regress/memleak_x86.c +++ b/tests/regress/memleak_x86.c @@ -21,8 +21,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/mips_branch_likely_issue.c b/tests/regress/mips_branch_likely_issue.c index d1b2fe57..6da33ced 100644 --- a/tests/regress/mips_branch_likely_issue.c +++ b/tests/regress/mips_branch_likely_issue.c @@ -22,8 +22,6 @@ // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #include "pthread.h" #endif // _MSC_VER diff --git a/tests/regress/mips_delay_slot_code_hook.c b/tests/regress/mips_delay_slot_code_hook.c index 8eafd96f..4a407aec 100644 --- a/tests/regress/mips_delay_slot_code_hook.c +++ b/tests/regress/mips_delay_slot_code_hook.c @@ -27,8 +27,6 @@ but that the code hook is just not occurring. // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #endif // _MSC_VER diff --git a/tests/regress/nr_mem_test.c b/tests/regress/nr_mem_test.c index 3279d87d..34a8814d 100644 --- a/tests/regress/nr_mem_test.c +++ b/tests/regress/nr_mem_test.c @@ -18,9 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/rep_movsb.c b/tests/regress/rep_movsb.c index e96cae49..436a02b9 100644 --- a/tests/regress/rep_movsb.c +++ b/tests/regress/rep_movsb.c @@ -20,9 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #define __STDC_FORMAT_MACROS -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include #include #include diff --git a/tests/regress/ro_mem_test.c b/tests/regress/ro_mem_test.c index 8d73bf58..0197877b 100644 --- a/tests/regress/ro_mem_test.c +++ b/tests/regress/ro_mem_test.c @@ -18,9 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "unicorn/platform.h" #include -#include "unicorn/platform.h" #include diff --git a/tests/regress/rw_hookstack.c b/tests/regress/rw_hookstack.c index 39d2b2f2..73dcc64b 100644 --- a/tests/regress/rw_hookstack.c +++ b/tests/regress/rw_hookstack.c @@ -1,6 +1,5 @@ #include #include -#include "unicorn/platform.h" #include #define ADDRESS 0x1000000 diff --git a/tests/regress/threaded_emu_start.c b/tests/regress/threaded_emu_start.c index fd3152c0..21233b5c 100644 --- a/tests/regress/threaded_emu_start.c +++ b/tests/regress/threaded_emu_start.c @@ -33,8 +33,6 @@ background. // posix specific #else // _MSC_VER -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #include "pthread.h" #endif // _MSC_VER diff --git a/tests/regress/timeout_segfault.c b/tests/regress/timeout_segfault.c index 48e55d13..43abde0c 100644 --- a/tests/regress/timeout_segfault.c +++ b/tests/regress/timeout_segfault.c @@ -9,8 +9,6 @@ call to uc_emu_start(). See issue #78 for more details: https://github.com/unicorn-engine/unicorn/issues/78 */ -#include "unicorn/platform.h" - #include diff --git a/tests/unit/test_gdt_idt_x86.c b/tests/unit/test_gdt_idt_x86.c index 6772aa64..b95a4e4f 100644 --- a/tests/unit/test_gdt_idt_x86.c +++ b/tests/unit/test_gdt_idt_x86.c @@ -1,9 +1,7 @@ #include -#include "unicorn/platform.h" #include #include #include -#include "unicorn/platform.h" /** * Assert that err matches expect diff --git a/tests/unit/test_hang.c b/tests/unit/test_hang.c index 02171b4e..98198f3c 100644 --- a/tests/unit/test_hang.c +++ b/tests/unit/test_hang.c @@ -5,7 +5,7 @@ #include "unicorn_test.h" #include -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" uint64_t trunc_page(uint64_t addr) { diff --git a/tests/unit/test_hookcounts.c b/tests/unit/test_hookcounts.c index 327095a9..9e9e4a8a 100644 --- a/tests/unit/test_hookcounts.c +++ b/tests/unit/test_hookcounts.c @@ -4,7 +4,7 @@ // emulation by counts of instruction code // #include "unicorn_test.h" -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #define DEBUG 1 diff --git a/tests/unit/test_mem_high.c b/tests/unit/test_mem_high.c index dfa88207..c57f6121 100644 --- a/tests/unit/test_mem_high.c +++ b/tests/unit/test_mem_high.c @@ -7,7 +7,7 @@ #include "unicorn_test.h" #include #include -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" /* Called before every test to set up a new instance */ static int setup(void **state) diff --git a/tests/unit/test_multihook.c b/tests/unit/test_multihook.c index 0f69b35b..86f6df63 100644 --- a/tests/unit/test_multihook.c +++ b/tests/unit/test_multihook.c @@ -1,5 +1,5 @@ #include "unicorn_test.h" -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #define OK(x) uc_assert_success(x) diff --git a/tests/unit/test_pc_change.c b/tests/unit/test_pc_change.c index 1f04fd35..85656319 100644 --- a/tests/unit/test_pc_change.c +++ b/tests/unit/test_pc_change.c @@ -1,6 +1,6 @@ // Test PC change during the callback. by Nguyen Anh Quynh, 2016 #include "unicorn_test.h" -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #define OK(x) uc_assert_success(x) diff --git a/tests/unit/test_tb_x86.c b/tests/unit/test_tb_x86.c index 675a3925..5bf0173b 100644 --- a/tests/unit/test_tb_x86.c +++ b/tests/unit/test_tb_x86.c @@ -8,7 +8,7 @@ #include #include #include -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #define RIP_NEXT_TO_THE_SELFMODIFY_OPCODE (1) diff --git a/tests/unit/test_x86.c b/tests/unit/test_x86.c index 85a7da41..f890a26f 100644 --- a/tests/unit/test_x86.c +++ b/tests/unit/test_x86.c @@ -1,5 +1,5 @@ #include "unicorn_test.h" -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #define OK(x) uc_assert_success(x) diff --git a/tests/unit/test_x86_rip_bug.c b/tests/unit/test_x86_rip_bug.c index b3e31a32..65f5f813 100644 --- a/tests/unit/test_x86_rip_bug.c +++ b/tests/unit/test_x86_rip_bug.c @@ -1,5 +1,3 @@ -#include "unicorn/platform.h" -#include "unicorn/platform.h" #include #include "unicorn_test.h" diff --git a/tests/unit/test_x86_shl_enter_leave.c b/tests/unit/test_x86_shl_enter_leave.c index 1ba8fcbc..7d862b9a 100644 --- a/tests/unit/test_x86_shl_enter_leave.c +++ b/tests/unit/test_x86_shl_enter_leave.c @@ -1,4 +1,4 @@ -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" #include #include "unicorn_test.h" diff --git a/tests/unit/test_x86_soft_paging.c b/tests/unit/test_x86_soft_paging.c index 6b303588..c3b9d0a9 100644 --- a/tests/unit/test_x86_soft_paging.c +++ b/tests/unit/test_x86_soft_paging.c @@ -1,5 +1,5 @@ #include "unicorn_test.h" -#include "unicorn/platform.h" +#include "unicorn/unicorn.h" /* Two tests here for software paging