Open Zissi-Lei opened 2 years ago
If either operand is signed, the result is signed. The spec doesn’t explicitly say so because this is implicitly true.
If either operand is signed, the result is signed. The spec doesn’t explicitly say so because this is implicitly true.
Yes, but I mean that vd is also used as an operand. What's the signed information about vd as an operand?
The addition with vd is performed the same way whether you interpret the bits of vd as encoding a signed (two's complement) or unsigned integer. I think it makes more sense to think of vd (input and output) as a signed integer, but this interpretation doesn't change the semantics of the instruction.
For accumulating operations, the signedness of the accumulator doesn’t matter, because it’s just non-widening modular arithmetic (even when the product is widening).
But, conceptually, what Nick wrote matches how I think about these operations.
In integer multiply-add instructions, for expample, the vwmaccsu, only the sign information of vs1 and vs2 is given, but for vd I can't see it's sign information in spec. Is vd always treated as a signed number in all integer multiply-add instructions? Thanks for your time.