3.7.5 Dot Product Type Operations

These instructions are "three input" operators. One of the inputs is the vector accumulator. Another is a general purpose register. The third operand may be either a register or come from memory.

The memory variant uses the 24-bit large displacement addressing mode, whereas all the other memory vector instructions use the small displacement addressing mode. This irregularity results from not having enough bits in 24 bits to specifiy everything. Although all of the memory vector instructions could have been made into long instructions, that seems wasteful, and anyway the load-compare-branch instruction need to use the small displacement form because they also specify a branch target. Still, it is ugly. If anyone has an elegant solution, please send email to Peter.

Vector Multiply Accumulate

Mnemonic Format Unit Semantics Description
macbv aR im 8{ a.bv += x.bv * y.bv } Multiply Accumulate Byte Vector
macubv aR im 8{ a.bv += x.ubv * y.ubv } Multiply Accumulate Unsigned Byte Vector
machv aR im 4{ a.hv += x.hv * y.hv } Multiply Accumulate Halfword Vector
macuhv aR im 4{ a.hv += x.uhv * y.uhv } Multiply Accumulate Unsigned Halfword Vector


Vector Sum of Absolute Differences

Mnemonic Format Unit Semantics Description
sadbv aR ia 8{ a.bv += abs(x.bv - y.bv ) } Sum of Absolute Difference Byte Vector
sadubv aR ia 8{ a.bv += abs(x.ubv - y.ubv) } Sum of Absolute Difference Unsigned Byte Vector
sadhv aR ia 4{ a.hv += abs(x.hv - y.hv ) } Sum of Absolute Difference Halfword Vector
saduhv aR ia 4{ a.hv += abs(x.uhv - y.uhv) } Sum of Absolute Difference Unsigned Halfword Vector


Memory Vector Multiply Accumulate

Mnemonic Format Unit Semantics Description
macmbv aD im 8{ a.bv += x.bv * vlong(y.i+disp).bv } Multiply Accumulate Memory Byte Vector
macmubv aD im 8{ a.bv += x.ubv * vlong(y.i+disp).ubv } Multiply Accumulate Memory Unsigned Byte Vector
macmhv aD im 4{ a.hv += x.hv * vlong(y.i+disp).hv } Multiply Accumulate Memory Halfword Vector
macmuhv aD im 4{ a.hv += x.uhv * vlong(y.i+disp).uhv } Multiply Accumulate Memory Unsigned Halfword Vector


Memory Vector Sum of Absolute Differences

Mnemonic Format Unit Semantics Description
sadmbv aD ia 8{ a.bv += abs(x.bv - vlong(y.i+disp).bv ) } Sum of Absolute Difference Memory Byte Vector
sadmubv aD ia 8{ a.bv += abs(x.ubv - vlong(y.i+disp).ubv) } Sum of Absolute Difference Memory Unsigned Byte Vector
sadmhv aD ia 4{ a.hv += abs(x.hv - vlong(y.i+disp).hv ) } Sum of Absolute Difference Memory Halfword Vector
sadmuhv aD ia 4{ a.hv += abs(x.uhv - vlong(y.i+disp).uhv) } Sum of Absolute Difference Memory Unsigned Halfword Vector