This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: help for arm avr bfin cris frv h8300 m68k mcore mmix pdp11 rs6000 sh vax


On 3/16/09, Paolo Bonzini <bonzini@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]