ni...@lysator.liu.se (Niels Möller) writes: Do you agree?
I agree. The excluded case, sub_ddmmss(ah, al, bh, /*compile time constant*/0) could clearly be optimized, in a different way, but I'd guess it's rare enough in real code to not be worth the effort? Clearly, longlong.h was too complicated to get right already, so let's not add an even deeper if-else tree. (Look at the 64-bit PPC add_ssaaaa to see what I'm talking about.) Here is a better patch for 6.2.0. It actually improves generated code. * For Arm32/64, we use ADDS in sub_ddmmss whenever the rhs immediate value is negative. We let gcc decide which operands fit and which need to go through a temp register. (This improves code as ADDS allows constants 0,1,2,..,4095 and also 0,4096,8192..,4096*4095. That latter interval was not handled before.) * We improve add_ssaaaa analogously. * For PPC, we explicitly exclude 0. Also, we fixed a repeated typo causing invalid ADDIC forms to be use.
diff
Description: Binary data
-- Torbjörn Please encrypt, key id 0xC8601622
_______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs