1 # Scalar OpenPOWER Audio and Video Opcodes
3 the fundamental principle of SV is a hardware for-loop. therefore the first (and in nearly 100% of cases only) place to put Vector operations is first and foremost in the *scalar* ISA. However only by analysing those scalar opcodes *in* a SV Vectorisation context does it become clear why they are needed and how they may be designed.
5 This page therefore has acompanying discussion at <https://bugs.libre-soc.org/show_bug.cgi?id=230> for evolution of suitable opcodes.
19 vpkpx is a 32-bit to 16-bit 8888 into 1555 conversion
23 a single 32-bit to 16-bit operation should suffice, fitting cleanly into one single scalar op:
26 dest[1 : 5] = src[8 :12]
27 dest[6 :10] = src[16:20]
28 dest[11:15] = src[24:28]
32 signed and unsigned, these are N-to-M (N=64/32/16, M=32/16/8) chop/clamp/sign/zero-extend operations
36 these are 16-bit to 32-bit 1555 to 8888 conversion
40 signed and unsigned, 8/16/32: these are all of the form:
42 result = truncate((a + b + 1) >> 1))
46 unsigned 8/16/32: these are all of the form:
48 result = (src1 > src2) ? truncate(src1-src2) :
51 ### vmaxs* / vmaxu* (and min)
53 signed and unsigned, 8/16/32: these are all of the form:
55 result = (src1 > src2) ? src1 : src2 # max
56 result = (src1 < src2) ? src1 : src2 # min