You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some assembly instructions permit decorations on certain operands.
Examples
Write mask of k1 onto the memory operand [rax] which results in operand type (ex: m64{k}).
vmovss[rax]{k1},xmm0
Write mask of k1 with z mode enabled on the destination register zmm0 resulting in an operand type zmm{k}{z}.
vpsubb zmm0{k1}{z}, zmm0, zmm1
Broadcast decorator on one of the source 64bit memory operands resulting into the operand type m256/m64bcst; the instruction operates on packed double-word integers (32bit), the memory operand is 64bit and the source operands are 256bit, so 256 / 64 == {1to8} == m256/m64bcst.
vpadddymm0,ymm0,[rdi] {1to8}
The text was updated successfully, but these errors were encountered:
Some ideas of how the Ruby syntax might look like:
Faux Array access methods:
vpsubbzmm0[k1][z],zmm0,zmm1
Downside: we will have to define a z method to represent the zero-mode flag.
Yielding blocks
vpsubbzmm0{k1},zmm0,zmm1
Upside: easy to implement!
Downside: cannot chain together { } methods (ex: zmm0{k1}{z}). No possible way to use this technique on memory operands that are defined as Arrays (ex: [rdi]).
Operand Methods
vpsubbzmm0.k1.z,zmm0,zmm1
Downside: readability is not great and have to define k0 - k5 methods.
Override The Register Methods
vpsubbzmm0(k1,z),zmm0,zmm1
Downside: still requires defining a z method.
Override The Register Methods With Keyword Arguments
vpsubbzmm0(k: k1,z: true),zmm0,zmm1
Downside: k: k1 seems a bit redundant and z: true feels too explicit?
Some assembly instructions permit decorations on certain operands.
Examples
Write mask of
k1
onto the memory operand[rax]
which results in operand type (ex:m64{k}
).Write mask of
k1
withz
mode enabled on the destination registerzmm0
resulting in an operand typezmm{k}{z}
.Broadcast decorator on one of the source 64bit memory operands resulting into the operand type
m256/m64bcst
; the instruction operates on packed double-word integers (32bit), the memory operand is 64bit and the source operands are 256bit, so 256 / 64 =={1to8}
==m256/m64bcst
.The text was updated successfully, but these errors were encountered: