2013-12-19 17:10:14 +00:00
|
|
|
/*
|
|
|
|
* E_Branches.h
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace ARM
|
|
|
|
{
|
|
|
|
|
|
|
|
EAPI B(u32 sImm24, ConditionCode CC=AL)
|
|
|
|
{
|
|
|
|
DECL_Id(0x0A000000);
|
|
|
|
|
|
|
|
SET_CC;
|
|
|
|
I |= ((sImm24>>2)&0xFFFFFF);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI BL(u32 sImm24, ConditionCode CC=AL)
|
|
|
|
{
|
|
|
|
DECL_Id(0x0B000000);
|
|
|
|
|
|
|
|
SET_CC;
|
|
|
|
I |= ((sImm24>>2)&0xFFFFFF);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Note: Either X variant will switch to THUMB* if bit0 of addr is 1
|
|
|
|
//
|
|
|
|
|
|
|
|
EAPI BX(eReg Rm, ConditionCode CC=AL)
|
|
|
|
{
|
|
|
|
DECL_Id(0x012FFF10);
|
|
|
|
|
|
|
|
SET_CC;
|
|
|
|
I |= (Rm&15);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI BLX(eReg Rm, ConditionCode CC=AL) // Form II
|
|
|
|
{
|
|
|
|
DECL_Id(0x012FFF30);
|
|
|
|
|
|
|
|
SET_CC;
|
|
|
|
I |= (Rm&15);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI BXJ(eReg Rm, ConditionCode CC=AL)
|
|
|
|
{
|
|
|
|
DECL_Id(0x012FFF20);
|
|
|
|
|
|
|
|
SET_CC;
|
|
|
|
I |= (Rm&15);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This encoding looks correct, but segfaults, the pc val is align(pc,4) but this should be right in ARM
|
|
|
|
//
|
|
|
|
#if defined(_DEVEL)
|
Partially working dyna for iOS. Very few games working atm.
This works, but is extremelly hacky. Must be started without attached debugger, lldb doesn't want to let go of EXC_BAD_ADDRESS, but reicast really depends on it getting delivered as SIGSEGV/SIGBUS. Also xcode has a really bad day upon seeing the jit code. Oh well.
There's some dynarec bug that causes color corruption on bios logo/boot triagles, TA crash on ikaruga and infinitive loop on crazy taxi. I'd guess some fp-memory-write thingy, abi, or smth. Too bad.
- Force code to compile in arm mode (arm jit -> thumb mem functions is complicated)
- SIGILL, SIGBUS. Works w/o Mach exceptions and EXC_BAD_ADDRESS
- Code buffers move to __TEXT, munmapped && memmapped to actually work
- Primitive input. Button + start, or left (works to get out of bios date screen)
- Fixup emitter for thumb2/interworking (didn't work though, reverted to arm cc)
- Block Manager: Disable mem saving / page fault alloc-on-demand logic
- Move cycle counter to r11, r9 is not clean on iOS. Remove r11 from reg alloc list
- Cache flushes for iOS
- log to log.txt
- load game.chd
2015-01-19 07:52:12 +00:00
|
|
|
EAPI BLX(u32 sImm24, bool toThumb) // Form I * H is derived so not needed, fixup sImm24 so one can just pass a real addr
|
2013-12-19 17:10:14 +00:00
|
|
|
{
|
|
|
|
DECL_Id(0xFA000000);
|
|
|
|
|
Partially working dyna for iOS. Very few games working atm.
This works, but is extremelly hacky. Must be started without attached debugger, lldb doesn't want to let go of EXC_BAD_ADDRESS, but reicast really depends on it getting delivered as SIGSEGV/SIGBUS. Also xcode has a really bad day upon seeing the jit code. Oh well.
There's some dynarec bug that causes color corruption on bios logo/boot triagles, TA crash on ikaruga and infinitive loop on crazy taxi. I'd guess some fp-memory-write thingy, abi, or smth. Too bad.
- Force code to compile in arm mode (arm jit -> thumb mem functions is complicated)
- SIGILL, SIGBUS. Works w/o Mach exceptions and EXC_BAD_ADDRESS
- Code buffers move to __TEXT, munmapped && memmapped to actually work
- Primitive input. Button + start, or left (works to get out of bios date screen)
- Fixup emitter for thumb2/interworking (didn't work though, reverted to arm cc)
- Block Manager: Disable mem saving / page fault alloc-on-demand logic
- Move cycle counter to r11, r9 is not clean on iOS. Remove r11 from reg alloc list
- Cache flushes for iOS
- log to log.txt
- load game.chd
2015-01-19 07:52:12 +00:00
|
|
|
if(toThumb)
|
|
|
|
I |= 1<<24; // SET_H
|
2013-12-19 17:10:14 +00:00
|
|
|
|
|
|
|
I |= ((sImm24>>2)&0xFFFFFF);
|
|
|
|
EMIT_I;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|