PPC branch+call trick: filter first 4MB only
filteri.cpp filter/ppcbxx.h stub/ppc_bxx.S committer: jreiser <jreiser> 1114229877 +0000
This commit is contained in:
+7
-2
@@ -36,8 +36,13 @@ ppcbxx: # (*f_unf)(xo->buf, out_len, h.b_cto8, h.b_ftid);
|
||||
|
||||
#define ptr0 a4
|
||||
|
||||
cmpli cr0,ftid,0xd0; bnelr- cr0 # if (0xd0!=ftid) return;
|
||||
rlwinm. len,len,32-2,2,31; beqlr- cr0 # if (0==(len>>=2)) return;
|
||||
cmpli cr0,ftid,0xd0; bnelr- cr0 # if (0xd0!=ftid) return;
|
||||
rlwinm. len,len,32-2,2,31; beqlr- cr0 # if (0==(len>>=2)) return;
|
||||
lis r0,-(~0<<(32-16- (2+6+ W_CTO))) # limit in 32-bit words
|
||||
cmpl cr0,len,r0
|
||||
blt cr0,L5
|
||||
mr len,r0
|
||||
L5:
|
||||
addi cto8,cto8,18<<W_CTO # cat(bxx_opcode, cto8)
|
||||
movr ptr0,ptr # save base address
|
||||
addi ptr,ptr,-4 # prepare for 'lwzu'
|
||||
|
||||
Reference in New Issue
Block a user