mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Clean up after the block linker. armdis: add BKPT
This commit is contained in:
parent
e43c7af32c
commit
74d8a9bdba
@ -404,8 +404,19 @@ void JitBlockCache::LinkBlockExits(int i) {
|
||||
int destinationBlock = GetBlockNumberFromStartAddress(b.exitAddress[e]);
|
||||
if (destinationBlock != -1) {
|
||||
#if defined(ARM)
|
||||
const u8 *nextExit = b.exitPtrs[e + 1];
|
||||
if (!nextExit) {
|
||||
nextExit = b.normalEntry + b.codeSize;
|
||||
}
|
||||
ARMXEmitter emit(b.exitPtrs[e]);
|
||||
emit.B(blocks_[destinationBlock].checkedEntry);
|
||||
u32 op = 0;
|
||||
// Overwrite with nops until the next unconditional branch.
|
||||
do {
|
||||
emit.BKPT(1);
|
||||
op = *((const u32 *)emit.GetCodePtr());
|
||||
} while ((op & 0xFF000000) != 0xEA000000);
|
||||
emit.BKPT(1);
|
||||
emit.FlushIcache();
|
||||
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
@ -609,7 +620,7 @@ void JitBlockCache::InvalidateICache(u32 address, const u32 length) {
|
||||
|
||||
int JitBlockCache::GetBlockExitSize() {
|
||||
#if defined(ARM)
|
||||
// TODO
|
||||
// Will depend on the sequence found to encode the destination address.
|
||||
return 0;
|
||||
#elif defined(_M_IX86) || defined(_M_X64)
|
||||
return 15;
|
||||
|
@ -357,11 +357,6 @@ static bool DisasmNeonLDST(uint32_t op, char *text) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool DisasmNeonF3(uint32_t op, char *text) {
|
||||
sprintf(text, "NEON F3");
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool DisasmNeonF2F3(uint32_t op, char *text) {
|
||||
sprintf(text, "NEON F2");
|
||||
if (((op >> 20) & 0xFFC) == 0xF20 || ((op >> 20) & 0xFFC) == 0xF30) {
|
||||
@ -727,6 +722,11 @@ instr_disassemble(word instr, address addr, pDisOptions opts) {
|
||||
mnemonic = "BL";
|
||||
format = "0";
|
||||
break;
|
||||
} else if ((instr & 0x0FF000F0) == 0x01200070) {
|
||||
int imm = ((instr & 0xFFF00) >> 4) | (instr & 0xF);
|
||||
snprintf(result.text, sizeof(result.text), "BKPT %d", imm);
|
||||
result.undefined = 0;
|
||||
return &result;
|
||||
}
|
||||
case 3:
|
||||
if (instr >> 24 == 0xF3) {
|
||||
|
Loading…
Reference in New Issue
Block a user