For some reason our subtraction snippets have a stack layout of lhs on top of the stack and then rhs below it. In the compiler, we first evaluate the LHS and then the RHS meaning we have to swap the operands prior to calling snippets in this standard-library. Then in the snippets contained here, we swap the operands before multiplying rhs with minus one. That's really inefficient.
[ ] Create new sub snippet for u32 with rhs on top of stack at function start
For some reason our subtraction snippets have a stack layout of
lhs
on top of the stack and thenrhs
below it. In the compiler, we first evaluate the LHS and then the RHS meaning we have to swap the operands prior to calling snippets in this standard-library. Then in the snippets contained here, we swap the operands before multiplyingrhs
with minus one. That's really inefficient.sub
snippet foru32
withrhs
on top of stack at function startu64
u128