I propose that the functions in package build return the destination register, where it makes sense. This would be especially useful in the context of AVX/VEX encoding and the 3 argument form (with the destination register separate from the operands) and would allow writing code like this:
I propose that the functions in package
build
return the destination register, where it makes sense. This would be especially useful in the context of AVX/VEX encoding and the 3 argument form (with the destination register separate from the operands) and would allow writing code like this:or even like this, if the loaded values don't need to be used again
instead of
or the manually optimized version, which isn't necessary due to avo's register allocator, but still results in shorter Go code currently:
There is some precedent for this, namely the
Load
function, which already returns the destination register.