Proper implementation of Arm::Translate

This commit is contained in:
MerryMage 2016-07-04 21:37:50 +08:00
parent d743adf518
commit 14388ea690
29 changed files with 276 additions and 90 deletions

View file

@ -2,8 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_dec.h"
#include "tests/skyeye_interpreter/skyeye_common/armsupp.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_dec.h"
#include "skyeye_interpreter/skyeye_common/armsupp.h"
const InstructionSetEncodingItem arm_instruction[] = {
{ "vmla", 5, ARMVFP2, { 23, 27, 0x1C, 20, 21, 0x0, 9, 11, 0x5, 6, 6, 0, 4, 4, 0 }},

View file

@ -10,13 +10,13 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_dec.h"
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_interpreter.h"
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_thumb.h"
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_run.h"
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "tests/skyeye_interpreter/skyeye_common/armsupp.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_dec.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_interpreter.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_thumb.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_run.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/armsupp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"
enum {
COND = (1 << 0),
@ -3184,11 +3184,11 @@ static ARM_INST_PTR INTERPRETER_TRANSLATE(yield)(unsigned int inst, int index)
// Floating point VFPv3 structures and instructions
#define VFP_INTERPRETER_STRUCT
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#include "skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#undef VFP_INTERPRETER_STRUCT
#define VFP_INTERPRETER_TRANS
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#include "skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#undef VFP_INTERPRETER_TRANS
typedef ARM_INST_PTR (*transop_fp_t)(unsigned int, int);
@ -6859,7 +6859,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
}
#define VFP_INTERPRETER_IMPL
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#include "skyeye_interpreter/skyeye_common/vfp/vfpinstr.cpp"
#undef VFP_INTERPRETER_IMPL
END:

View file

@ -18,7 +18,7 @@
#pragma once
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
/**
* Checks if the PC is being read, and if so, word-aligns it.

View file

@ -5,8 +5,8 @@
// We can provide simple Thumb simulation by decoding the Thumb instruction into its corresponding
// ARM instruction, and using the existing ARM simulator.
#include "tests/skyeye_interpreter/dyncom/arm_dyncom_thumb.h"
#include "tests/skyeye_interpreter/skyeye_common/armsupp.h"
#include "skyeye_interpreter/dyncom/arm_dyncom_thumb.h"
#include "skyeye_interpreter/skyeye_common/armsupp.h"
// Decode a 16bit Thumb instruction. The instruction is in the low 16-bits of the tinstr field,
// with the following Thumb instruction held in the high 16-bits. Passing in two Thumb instructions

View file

@ -4,8 +4,8 @@
#include <algorithm>
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"
namespace Common {
inline u16 swap16(u16 data) {return (data >> 8) | (data << 8);}

View file

@ -22,7 +22,7 @@
#include "common/common_types.h"
#include "interface/interface.h"
#include "tests/skyeye_interpreter/skyeye_common/arm_regformat.h"
#include "skyeye_interpreter/skyeye_common/arm_regformat.h"
// Signal levels
enum {

View file

@ -17,9 +17,9 @@
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/skyeye_common/arm_regformat.h"
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "tests/skyeye_interpreter/skyeye_common/armsupp.h"
#include "skyeye_interpreter/skyeye_common/arm_regformat.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/armsupp.h"
// Unsigned sum of absolute difference
u8 ARMul_UnsignedAbsoluteDifference(u8 left, u8 right)

View file

@ -23,9 +23,9 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"
void VFPInit(ARMul_State* state)
{

View file

@ -20,7 +20,7 @@
#pragma once
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp_helper.h" /* for references to cdp SoftFloat functions */
#include "skyeye_interpreter/skyeye_common/vfp/vfp_helper.h" /* for references to cdp SoftFloat functions */
#define VFP_DEBUG_UNTESTED(x) LOG_TRACE(Core_ARM11, "in func %s, " #x " untested", __FUNCTION__);
#define CHECK_VFP_ENABLED

View file

@ -34,8 +34,8 @@
#include <cstdio>
#include "common/common_types.h"
#include "tests/skyeye_interpreter/skyeye_common/armstate.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "skyeye_interpreter/skyeye_common/armstate.h"
#include "skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#define do_div(n, base) {n/=base;}

View file

@ -53,9 +53,9 @@
#include <algorithm>
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp_helper.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp_helper.h"
#include "skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
static struct vfp_double vfp_double_default_qnan = {
2047,

View file

@ -57,9 +57,9 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp_helper.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "tests/skyeye_interpreter/skyeye_common/vfp/vfp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp_helper.h"
#include "skyeye_interpreter/skyeye_common/vfp/asm_vfp.h"
#include "skyeye_interpreter/skyeye_common/vfp/vfp.h"
static struct vfp_single vfp_single_default_qnan = {
255,