ゲームエミュレータとコンパイラ開発元です


working with SVE vectors as usual, and happened upon the INDEX instruction. it essentially works sorta like APL's iota function. as in, it generates a monotonically increasing set of values, given a starting value and step to increment by. so e.g.:

; Assume z0 is a 128-bit vector for brevity
INDEX z0.b, #0, #1

will fill all the byte elements of z0 like:

msb[15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0]lsb

super useful for setting up table indices for use with TBL and TBX in some cases without needing to go to memory or do other shenanigans


You must log in to comment.