[raspi-internals] Re: VPU mnemonic alignment

  • From: Herman Hermitage <hermanhermitage@xxxxxxxxxxx>
  • To: "raspi-internals@xxxxxxxxxxxxx" <raspi-internals@xxxxxxxxxxxxx>
  • Date: Thu, 26 May 2016 11:48:24 +1200

The changes for the scalar instructions are:(Preferred form marked with a *, 
except where * is a multiplier :)
If we could get gas to the point where it assembles the broadcom *.s files that 
would be a great!
I will be updating the wiki and .arch file today.
I'll follow up with the vector instructions soon.
Known===
addscale rd, [ra, ] rb lsl n: (syntax)  addscale rd, [ra,] rb << n  addscale 
rd, [ra,] rb * m      ; where m is a power of 2
bic: (alias)  bic  *bitclear
bhg: (alias)  bchg  *bitflip
bset: (alias)  bset  *bitset
btst: (alias)  btst  *btest
cbinc: (rename)  cbadd1
cbchg: (rename)  cbadd2
cbdec: (rename)  cbadd3
exts: (rename)  signext
extu: (rename)  bmask
lsl: (alias)  lsl    *shl
lsls: (alias)  lsls  *shls
pop: (rename)  ldm rb-rm, [lr,] (sp++)
push: (rename)  stm rb-rm, [pc,] (--sp)
rsb: (rename)  rsub
set: (pseudo-instruction)  mov rd, #1
subscale rd, [ra, ] rb lsl n : (syntax)  subscale rd, [ra, ] rb << n  subscale 
rd, [ra, ] rb * m
tbb/tbh rd: (syntax)  switch rd  .case pcrel1 /* relative to the address of 
first case */  .case pcrel2 /* relative to the address of first case */  ...  
.endswitch
(byte or short form determined based on max pcrel)

Not 100% confirmed:===
test: (pseudo, see in vc_image_yuvuv128_asm.s)  cmp rd, 0 ;unconfirmed
clipsh: (alias, see vc_asm_ops.h)  clamp16  *clipsh

/0xHH

From: hermanhermitage@xxxxxxxxxxx
To: raspi-internals@xxxxxxxxxxxxx
Subject: [raspi-internals] VPU mnemonic alignment
Date: Sun, 2 Mar 2014 12:11:00 +1200

Ok, in the Broadcom release there is a nice easter egg of VPU assembler 
source both in *.s and also _vasm() inlines.

There is a lot of lovely VPU source there...

I've put a listing below (some macros etc pollute it).  This should be enough 
to do an alignment of mnemonics between what we were using and what is used 
in real life VPU source.

hh


for i in `find . -name *.s`; do (cat $i | sed -e 's/^[ \t]*//' | expand | 
grep -v ':' | grep -v '^;' | grep -v '\.' | grep -v "{{{" | grep -v "}}}" | 
cut -f1 -d' ') ; done | sort | uniq
--

add
addcmpb
addcmpbeq
addcmpbge
addcmpbgt
addcmpbhi
addcmpbhs
addcmpble
addcmpblo
addcmpbls
addcmpblt
addcmpbne
adds
addscale
and
asr
assertne
b
beq
bge
bgt
bic
bitclear
bitflip
bitset
bkpt
bl
ble
blo
bls
blt
bmask
bne
btest
cbadd1
cbadd2
cbclr
cmp
count
di
ei
eor
est
fmul
get_horiz_offset16
get_vert_offset16
int
inttofloat
ld
ldb
ldh
ldm
ldsb
lsr
max
min
mov
moveit
msb
mul
neg
nop
not
or
ror
rsub
rti
sethi
shl
shls
st
stb
sth
stm
sub
subscale
switch
v16add
v16addc
v16adds
v16and
v16asr
v16bic
v16bitplanes
v16dist
v16eor
v16even
v16getaccs16
v16indexwriteml
v16interh
v16interl
v16ld
v16lookupml
v16lsr
v16max
v16min
v16mov
v16mul
v16mulm
v16odd
v16or
v16ror
v16rsub
v16rsubs
v16shl
v16sign
v16st
v16sub
v32add
v32and
v32asr
v32bic
v32clip2
v32eor
v32even
v32getacc
v32getaccs32
v32interh
v32interl
v32ld
v32lookupml
v32lsr
v32max
v32memread
v32memwrite
v32min
v32mov
v32msb
v32odd
v32or
v32ror
v32shl
v32shls
v32signasl
v32signasls
v32st
v32sub
v8indexwriteml
v8ld
v8lookupml
v8st
vadd
vadds
vand
vasr
vbitplanes
vbitrev
vc_image_height
vc_image_image_data
vc_image_pitch
vc_image_width
vclip
vcount
vdist
vdists
veor
version
veven
vfadd
vfloattointn
vfmul
vfrecip
vfrom32h
vfrom32l
vindexwritem
vinterh
vinterl
vinttofloat
vld
vldb
vldh
vldleft
vldright
vldw
vlookupm
vlsr
vmax
vmin
vmov
vmsb
vmul
vmulm
vmulms
vodd
vor
vror
vrsub
vrsubs
vshl
vshls
vst
vst32l
vstleft
vstright
vsub
vsubc
vsubs
vtestmag
vto32h
vto32l                                          
                                          

Other related posts: