Subject: CVS commit: src
To: None <source-changes@netbsd.org>
From: Jonathan Stone <jonathan@netbsd.org>
List: source-changes
Date: 03/31/1999 10:01:32
Module Name:	src
Committed By:	jonathan
Date:		Wed Mar 31 18:01:32 UTC 1999

Modified Files:
	src/gnu/dist/gas/config: tc-mips.c
Log Message:
Revert handling of divide and remainder assembler pseudo-ops (with
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?