Using floating point instructions

2016-12-06 Thread G 3
I'm working on a program that calls PowerPC assembly floating point instructions from C. It would have calls like this: double inputA, inputB, answer; asm volatile("fadd %0, %1, %2" : "=f" (answer) : "f" (inputA), "f" (inputB)); // answer = inputA + inputB The odd thing is it only works i

Re: Using floating point instructions

2016-12-06 Thread G 3
On Dec 6, 2016, at 4:41 PM, Greg Parker wrote: On Dec 6, 2016, at 7:27 AM, G 3 wrote: I'm working on a program that calls PowerPC assembly floating point instructions from C. It would have calls like this: double inputA, inputB, answer; asm volatile("fadd %0, %1, %2"