For some reason the Go assembler uses R27 as a scratch register when loading in a variable's address. Since callbackasm1 is called from C and the arm64 ABI states that R27 is callee saved it was unexpectedly clobbering the value. This commit now saves R27 and restores it at the end of the function.
I also cleaned up some of the other parts of this function. I store the floats in pairs which saved 4 instructions. I also use the zero register to put zero in callbackArgs.result directly
For some reason the Go assembler uses R27 as a scratch register when loading in a variable's address. Since callbackasm1 is called from C and the arm64 ABI states that R27 is callee saved it was unexpectedly clobbering the value. This commit now saves R27 and restores it at the end of the function.
I also cleaned up some of the other parts of this function. I store the floats in pairs which saved 4 instructions. I also use the zero register to put zero in callbackArgs.result directly
Updates #124 Closes #162