2016-07-04 21:37:50 +08:00
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2016 MerryMage
|
|
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
|
|
* General Public License version 2 or any later version.
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-08-17 10:53:36 -04:00
|
|
|
#include "common/common_types.h"
|
2016-07-04 21:37:50 +08:00
|
|
|
#include "frontend/arm_types.h"
|
|
|
|
|
|
|
|
namespace Dynarmic {
|
2016-08-17 10:53:36 -04:00
|
|
|
|
|
|
|
namespace IR {
|
|
|
|
class Block;
|
|
|
|
} // namespace IR
|
|
|
|
|
2016-07-04 21:37:50 +08:00
|
|
|
namespace Arm {
|
|
|
|
|
|
|
|
using MemoryRead32FuncType = u32 (*)(u32 vaddr);
|
|
|
|
|
2016-08-12 18:17:31 +01:00
|
|
|
/**
|
|
|
|
* This function translates instructions in memory into our intermediate representation.
|
|
|
|
* @param descriptor The starting location of the basic block. Includes information like PC, Thumb state, &c.
|
|
|
|
* @param memory_read_32 The function we should use to read emulated memory.
|
|
|
|
* @return A translated basic block in the intermediate representation.
|
|
|
|
*/
|
2016-07-04 21:37:50 +08:00
|
|
|
IR::Block Translate(LocationDescriptor descriptor, MemoryRead32FuncType memory_read_32);
|
|
|
|
|
|
|
|
} // namespace Arm
|
|
|
|
} // namespace Dynarmic
|