Unverified Commit e1e79539 authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Revert "Rebase rec-ARM: (#1036)" (#1040)

This reverts commit d58c8fef.
parent d58c8fef
Pipeline #15571 passed with stages
in 19 minutes and 34 seconds
......@@ -23,7 +23,7 @@
//#include <sstream>
#include "arm7.h"
#include "arm_emitter/arm_coding.h"
#include "rec-ARM/arm_coding.h"
#include "deps/vixl/aarch64/macro-assembler-aarch64.h"
using namespace vixl::aarch64;
//#include "deps/vixl/aarch32/disasm-aarch32.h"
......
......@@ -602,7 +602,7 @@ u8 ARM7_TCB[ICacheSize+4096] __attribute__((section("__TEXT, .text")));
#error ARM7_TCB ALLOC
#endif
#include "arm_emitter/arm_emitter.h"
#include "rec-ARM/arm_emitter.h"
#undef I
......
......@@ -160,14 +160,13 @@ ADD.SP.REG 0x008D0000
return ((i/2)<<8) | immv;
}
}
return -1;
}
static u32 ARMImmid8r4(u32 imm8r4)
{
u32 rv = ARMImmid8r4_enc(imm8r4);
verify(rv!=-1);
return rv;
}
......
......@@ -309,4 +309,4 @@ EAPI POP(u32 RegList, ConditionCode CC=AL)
};
};
\ No newline at end of file
......@@ -627,7 +627,7 @@ namespace ARM
eFSReg SnS=(eFSReg)(Sn*2);
eFSReg SmS=(eFSReg)(Sm*2);
verify((int)Sd < 32 && (int)Sn < 32 && (int)Sm < 32);
verify(Sd<32 && Sn<32 && Sm<32);
VDIV_VFP(SdS,SnS,SmS);
}
......
......@@ -13,27 +13,26 @@ namespace ARM
inline static ptrdiff_t Literal(unat FnAddr)
inline static ptrdiff_t Literal(size_t FnAddr)
{
u8* pc_addr = (u8*)EMIT_GET_PTR();
return (ptrdiff_t)((ptrdiff_t)FnAddr - ((ptrdiff_t)pc_addr+8));
//return -(ptrdiff_t)((pc_addr+8)-(ptrdiff_t)FnAddr);
}
EAPI CALL(unat FnAddr, ConditionCode CC=AL)
EAPI CALL(size_t FnAddr, ConditionCode CC=AL)
{
bool isThumb = FnAddr & 1;
FnAddr &= ~1;
ptrdiff_t lit = Literal(FnAddr);
ptrdiff_t lit = Literal(FnAddr);
if(0==lit) {
printf("Error, Compiler caught NULL literal, CALL(%08zX)\n", FnAddr);
printf("Error, Compiler caught NULL literal, CALL(%08X)\n", FnAddr);
verify(false);
return;
}
if( (lit<-33554432) || (lit>33554428) ) // ..28 for BL ..30 for BLX
{
printf("Warning, CALL(%08zX) is out of range for literal(%08zX)\n", FnAddr, lit);
printf("Warning, CALL(%08X) is out of range for literal(%08X)\n", FnAddr, lit);
// verify(false);
MOV32(IP, FnAddr, CC);
......@@ -51,13 +50,13 @@ namespace ARM
EAPI JUMP(unat FnAddr, ConditionCode CC=AL)
EAPI JUMP(size_t FnAddr, ConditionCode CC=AL)
{
bool isThumb = FnAddr & 1;
FnAddr &= ~1;
verify(!isThumb);
ptrdiff_t lit = Literal(FnAddr);
ptrdiff_t lit = Literal(FnAddr);
/*if(0==lit) {
printf("Error, Compiler caught NULL literal, JUMP(%08X)\n", FnAddr);
......@@ -66,7 +65,7 @@ namespace ARM
}*/
if( (lit<-33554432) || (lit>33554428) ) // ..28 for BL ..30 for BLX
{
printf("Warning, %zX is out of range for imm jump! \n", FnAddr);
printf("Warning, %X is out of range for imm jump! \n", FnAddr);
//verify(false);
MOV32(IP, FnAddr, CC);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment