div.S
3.47 KB
-
RISC-V: Make __divdi3 handle div by zero same as hardware. · 34d6b34b
The ISA manual specifies that divide by zero always returns -1 as the result. We were failing to do that when the dividend was negative. Original patch from Virginie Moser. libgcc/ * config/riscv/div.S (__divdi3): For negative arguments, change bgez to bgtz.
Jim Wilson committed