[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rep:Re: Rep:Re: [f-cpu] signed cmpl



> Sorry, I misunderstood. But on the other hand, 6 bits aren't much for
> most purposes - you would have to `loadcons*' more often...
>
> >>>Only our gcc expert could answer. So, does 32 to -32 number (or 0 to
> 64) immediat instruction could cover most immediat instructions used by
> gcc ?
> nicO

Because I test majority of things with vsprintf.c from linux kernel
just now it is not too objective. There is 275 immediates used in the
file. Here is usage of constant NOT IN -32...31 range:
     13 addi
     21 andi
      3 cmplei
      1 cmplesi
      2 ori
     33 xor.ori

and these are IN range:
    140 addi
     23 andi
      1 cmplei
     13 cmplesi
      3 cmplsi
      4 nxor.andi
      7 ori
      4 shiftli
      7 xor.ori

So that 202 insns ARE in 6bit range but these was constants 1 and -1
often (addi) - I didn't implemented INC/DEC yet. There was 82 of such.
As conclusion from 275 immediates 120 (202-82) can be coded into
6 bits.
devik

*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/