![jonathan](/assets/img/avatar_default.png)
test for divide-by-zero, unlike machine insn) from the binutils-2.9.1 sequence to the older binutils-2.8.1 sequence. gas 2.8.1 emits a div as (in pseudocode) divu $zer0o, a0, v0; bnez $v0, 1f; nop; break0x7; 1: mflo a0; gas 2.9.1 emits the shorter sequence bnez <divisor>, 1f; divu <args>; break0x7; 1: bnez $v0, 1f; divu $zer0o, a0, v0; /break0x7; 1: mflo a0; but that on a decstation 5000/150 with a rev 3.0 r4000, for kernel code, later references to $a0 seem to get a corrupted value. not reproduced yet on an r4400. Could be an r4000-specific bug with the interlock on mulhi and mullo?
…
…
…
…
…
…
…
…
Description
No description provided
Languages
C
85.3%
Roff
7.2%
Assembly
3.1%
Shell
1.7%
Makefile
1.2%
Other
0.9%