On 3/16/09, Paolo Bonzini <bonz...@gnu.org> wrote: > AND R1, R0, #31 > MOV R2, R2, SHIFT R1 > ANDS R1, R0, #32 > MOVNE R2, R2, SHIFT #31 > MOVNE R2, R2, SHIFT #1 > > or > > ANDS R1, R0, #32 > MOVNE R2, R2, SHIFT #-32 > SUB R1, R1, R0 ; R1 = (x >= 32 ? 32 - x : -x) > MOV R2, R2, SHIFT R1
Thanks for the tips. Yes, I was contemplating cooking up something like that, hobbled by the fact that if you use maverick instructions conditionally you either have to put seven nops either side of them or risk death by astonishment. M