From: Luke Kenneth Casson Leighton Date: Tue, 25 Jun 2019 07:48:35 +0000 (+0100) Subject: shuffle TODO X-Git-Tag: convert-csv-opcode-to-binary~4464 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4451797d669ae23e3a3f532252d9cbed858d1015;p=libreriscv.git shuffle TODO --- diff --git a/simple_v_extension/sv_prefix_proposal.rst b/simple_v_extension/sv_prefix_proposal.rst index 327bf0c35..4cc779b99 100644 --- a/simple_v_extension/sv_prefix_proposal.rst +++ b/simple_v_extension/sv_prefix_proposal.rst @@ -621,25 +621,31 @@ in STATE must be zero, and, in the UNIX Platform, an illegal exception Additional Instructions ======================= -Add instructions to convert between integer types. - -Add instructions to `swizzle`_ elements in sub-vectors. Note that the sub-vector -lengths of the source and destination won't necessarily match. +* Add instructions to convert between integer types. +* Add instructions to `swizzle`_ elements in sub-vectors. Note that + the sub-vector lengths of the source and destination won't necessarily + match. +* Add instructions to transpose (2-4)x(2-4) element matrices. +* Add instructions to insert or extract a sub-vector from a vector, with + the index allowed to be both immediate and from a register (*immediate + can be covered by twin-predication, register might be, by virtue of + predicates being registers*) +* Add a register gather instruction (aka MV.X: regfile[rd] = + regfile[regfile[rs1]]) + +subelement swizzle example: + + velswizzle x32, x64, SRCSUBVL=3, DESTSUBVL=4, ELTYPE=u8, elements=[0, 0, 2, 1] .. _swizzle: https://www.khronos.org/opengl/wiki/Data_Type_(GLSL)#Swizzling -Add instructions to transpose (2-4)x(2-4) element matrices. - -Add instructions to insert or extract a sub-vector from a vector, with -the index allowed to be both immediate and from a register (*immediate -can be covered by twin-predication, register might be, by virtue of -predicates being registers*) - -Add a register gather instruction (aka MV.X: regfile[rd] = -regfile[regfile[rs1]]) - questions ========= Moved to the discussion page (link at top of this page) +TODO +==== + +Work out a way to do sub-element swizzling. + diff --git a/simple_v_extension/sv_prefix_proposal/discussion.mdwn b/simple_v_extension/sv_prefix_proposal/discussion.mdwn index f8e05d0b4..a8e0e7395 100644 --- a/simple_v_extension/sv_prefix_proposal/discussion.mdwn +++ b/simple_v_extension/sv_prefix_proposal/discussion.mdwn @@ -145,6 +145,12 @@ doesn't need to pessimize. Additionally, swizzles almost always have constant element selectors. MV.X is meant more as a last-resort instruction that is better than load/store, but worse than everything else. +> ok, then we'll need a way to do that. given that it needs to apply +> to, well... everything, basically, i'm tempted to recommend it be +> done as a CSR and/or as (another) table in VBLOCK. +> the reason is, it's just too much to expect to massively duplicate +> literally every single opcode in existence, adding swizzle. + ---- Is vectorised srcbase ok as a gather scatter and ok substitute for