Discussion about this post

User's avatar
Al Martin's avatar

I don't know if you've commented on this, but there's a difference in the order operands are specified for scalar vs. vector assembly ops, which could cause some confusion. For example,

for scalars, there is

sub rd, rs1, rs2 does rs1-rs2 -> rd

but for vectors, there is:

vsub.vx vd, vs2, rs1, vm does vs2[i]-rs1 -> vd[i] and

vrsub.vx vd, vs2, rs1, vm does rs1-vs2[i] -> vd[i]

It's somewhat counter-intuitive until you are aware of it, but I can see why vectors are specified this way.

Expand full comment
Jack O'Connor's avatar

In the example "vadd.vx v12, v3, v4", v4 needs to be a scalar register like x4 no?

Expand full comment
3 more comments...

No posts