From 4df6f37a27c4eec64a8337e2237e738bd2ba63b4 Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Wed, 6 Dec 2006 12:30:56 +0000 Subject: add tstmbit_ macro --- macho/pstartup.a | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'macho') 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 -- cgit v1.2.3