[PATCH] Improved udivmodsi4 with support for ARMv4

Joerg Sonnenberger joerg at NetBSD.org
Thu Jan 23 04:57:17 PST 2014



================
Comment at: udivmodsi4.S:62
@@ +61,3 @@
+	sub	r3, r3, ip
+	/* r1 > r0 implies r3 >= 0. */
+	adr	ip, LOCAL_LABEL(div0block)
----------------
Joerg Sonnenberger wrote:
> Renato Golin wrote:
> > I'd have thought that the code would only get here if r0 >= r1, because of the BCC above.
> > 
> > If r1 > r0, this is a case for quotient0, no?
> quotient0 is used for r0 < r1, so at this point r1 >= r0. This means r3 >= ip and therefore r3-ip >= 0.
Not enough tea. quotient0 is used for r0 < r1, so at this point r1 <= r0. This means clz(r1) >= clz(r0).


http://llvm-reviews.chandlerc.com/D2595



More information about the llvm-commits mailing list