__aeabi_ldivmod: fix sign logic

. signed 64-bit divide incorrectly tested for sign compensation
	  bits in the NEG (R5) register, causing the signedness of the
	  quotient and modulus to be wrong for negative numerators.

Fixes test45 on ARM.

Change-Id: Id0df8fd97ea67cd0722db8cdd70a07e01b3d7870
This commit is contained in:
Ben Gras 2013-02-11 02:02:08 +01:00
parent 3bc6d7df06
commit de57a53027

View file

@ -80,9 +80,9 @@ ENTRY(__aeabi_ldivmod)
pop {r2, r3}
tst NEG, #2 /* does remainder need to be negative? */
bleq .Lnegate_b
blne .Lnegate_b
tst NEG, #1 /* does quotient need to be negative? */
bleq .Lnegate_a
blne .Lnegate_a
pop {r4-r5, sl, lr}
RET