From: Philipp K. K. <pk...@sp...> - 2012-04-21 13:08:37
|
I've done some work for #1307995 in revision #7618 in geniCodeDivision() in SDCCicode.c. For the z80, z180, r2k and gbz80 division is replaced by conditional addition followed by shift. This optimization is probably useful for all ports that do not have a division instruction. It mostly works. However, there is one issue: muldiv_storage_none_type_char_attr_volatile, muldiv_storage_static_type_char_attr_none and muldiv_storage_static_type_char_attr_volatile fail in line 89. This means that all is well, if the calculation is really done, but it is messed up when optimization tries to remove some operations due to the operands being constants. If someone wants to have a look at it: Just remove the #if 0. Philipp |