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
|
|
|
|
|
|
|
namespace Dynarmic {
|
2016-08-17 10:53:36 -04:00
|
|
|
|
|
|
|
namespace IR {
|
2016-09-05 06:54:09 -04:00
|
|
|
class Block;
|
2016-08-17 10:53:36 -04:00
|
|
|
} // namespace IR
|
|
|
|
|
2018-01-01 15:23:56 +00:00
|
|
|
namespace A32 {
|
2016-07-04 21:37:50 +08:00
|
|
|
|
2018-01-01 15:23:56 +00:00
|
|
|
class LocationDescriptor;
|
2016-09-01 04:46:35 -04:00
|
|
|
|
2016-12-21 20:48:05 +00:00
|
|
|
using MemoryReadCodeFuncType = u32 (*)(u32 vaddr);
|
2016-07-04 21:37:50 +08:00
|
|
|
|
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.
|
2016-12-21 20:48:05 +00:00
|
|
|
* @param memory_read_code The function we should use to read emulated memory.
|
2016-08-12 18:17:31 +01:00
|
|
|
* @return A translated basic block in the intermediate representation.
|
|
|
|
*/
|
2018-01-01 15:23:56 +00:00
|
|
|
IR::Block Translate(LocationDescriptor descriptor, MemoryReadCodeFuncType memory_read_code);
|
2016-07-04 21:37:50 +08:00
|
|
|
|
2018-01-01 15:23:56 +00:00
|
|
|
} // namespace A32
|
2016-07-04 21:37:50 +08:00
|
|
|
} // namespace Dynarmic
|