diff options
-rw-r--r-- | macho/pstartup.a | 15 | ||||
-rw-r--r-- | pstartup.a | 9 |
2 files changed, 24 insertions, 0 deletions
diff --git a/macho/pstartup.a b/macho/pstartup.a index 319891e..7512861 100644 --- a/macho/pstartup.a +++ b/macho/pstartup.a @@ -74,6 +74,21 @@ LINUX = 0 ; rlwnm. &bit,&byte,&bit_n_in_byte,24,24 ; .endmacro + .macro tstmbit_ + rlwinm $2,$1,32-$5-3,3+$5,31 + lbzx $4,$0,$2 + rlwinm $1,$1,32-$5,29,31 + rlwnm. $3,$4,$1,24,24 + .endmacro + +; same as tstmbit, but modifies bit_n register +; &vector 0,&bit_n 1,&byte_offset 2,&bit 3,&byte 4,&shift 5 +; rlwinm &byte_offset,&bit_n,32-&shift-3,3+&shift,31 +; lbzx &byte,&vector,&byte_offset +; rlwinm &bit_n,&bit_n,32-&shift,29,31 +; rlwnm. &bit,&byte,&bit_n,24,24 +; endm + .macro clrmbit rlwinm $2,$1,32-$6-3,3+$6,31 lbzx $4,$0,$2 @@ -24,6 +24,15 @@ endm macro +; same as tstmbit, but modifies bit_n register + tstmbit_ &vector,&bit_n,&byte_offset,&bit,&byte,&shift + rlwinm &byte_offset,&bit_n,32-&shift-3,3+&shift,31 + lbzx &byte,&vector,&byte_offset + rlwinm &bit_n,&bit_n,32-&shift,29,31 + rlwnm. &bit,&byte,&bit_n,24,24 + endm + + macro clrmbit &vector,&bit_n,&byte_offset,&bit,&byte,&scratch,&shift rlwinm &byte_offset,&bit_n,32-&shift-3,3+&shift,31 lbzx &byte,&vector,&byte_offset |