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

Re: [f-cpu] (!) a few noteworthy things



hello,

John Graley wrote:
> > then on bypass the new value will be
> >  a) 0xFEDCBA98765432EF (there must be another MUX to select
> > between the old
> >      and new value)
> >  b) 0x00000000000000EF
> >  c) 0xFFFFFFFFFFFFFFEF
> >  d) 0x0123456789ABCDEF
> >  e) 0x??????????????EF
> 
> Assuming you can use 8-bit SIMD instructions on data of the form
> 0x??????????????xy in order to obtain correct results for the bottom
> 8 bits, neglecting the other bits, then you should use option e.
that's why i proposed it and it's the usual behaviour in most algorithms.

> This is only inadequate in places where the program is converting a short
> data type to a longer type (when you need b for unsigned and c for signed),
> and this occurs fairly infrequently in program code, so it would be wasteful
> to do it every time.
sign extension is often used by compilers and they handle that well,
at least with the usual platforms. it seems however that sign extension
is not yet provided by FC0's execution units.

> Instead you should have explicit cast instructions for b and c.
this operation is pretty straight-forward to perform and hardwire,
but it's not clear whether Michael's SHL can do it easily.

At least we should define its behaviour in the instruction set part
of the manual.

regards,

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