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

Re: [f-cpu] New EU_SHL Instruction



On Wed, Jan 08, 2003 at 02:36:29PM +0100, I wrote:

[...]
> If you insist, I will investigate whether `sdup r3, r2, r1' can be added.
[...]

Fuck, that was TOO easy - took me 30 seconds to add it :)

Here's the change in the encoding:

>     vsel:
>         31-24   OP_VSEL (replaces OP_SDUP)
>         23-22   size
>         21      s- prefix
>         20-18   unused

Change that line to

        20      -h suffix (duplicates second operand)
        19-18   unused

>         17-12   r3
>         11- 6   r2
>          5- 0   r1

There now are the following identities:

    sdup.sz      r2, r1 <=> svsel.sz  r0, r2, r1 <=> vperm.sz  r0, r2, r1
    sdupi.sz $u, r2, r1 <=> svseli.sz $u, r2, r1 <=> vpermi.sz $u, r2, r1
    sdup.sz  r3, r2, r1 <=> svselh.sz r3, r2, r1 <=> vpermh.sz r3, r2, r1

Note that `-h' has no effect without the `s-' prefix. This is
consistent with the use of `-h' in the bitwise shift/rotate
instructions.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/