3 ms·
From the ABI perspective, struct returns are multiple return values. ARM64 allows structs to be returned in registers if the struct members are suitable for it.
by mikeash 13y ago
From the ABI perspective, struct returns are multiple return values. ARM64 allows structs to be returned in registers if the struct members are suitable for it.
- justincormack 13y agoI didnt know that. Apparently amd64 lets you return two 64 bit values in registers too, but no more.
- mprovost 13y agoTwo is still an incredibly handy feature. I would guess that the most common case for returning multiple values is data and size, like all the functions that return a string and the length of the string.
- justincormack 13y agoYes. Or the value. error style as used by node.js. forcing errors unto the domain gets messy.