From 406b20a64d8177e8a553c3d898f2e37a11dce186 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 31 Jan 2007 23:58:52 +0000 Subject: [PATCH] Assert that division result is correct --- src/arch/i386/core/udivmod64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arch/i386/core/udivmod64.c b/src/arch/i386/core/udivmod64.c index bb58102c..b4f14b11 100644 --- a/src/arch/i386/core/udivmod64.c +++ b/src/arch/i386/core/udivmod64.c @@ -303,6 +303,9 @@ UDItype __udivmoddi4 ( UDItype x, UDItype d, UDItype *r ) { udivmod64 ( ( struct uint64 * ) _x, ( struct uint64 * ) _d, ( struct uint64 * ) _q, ( struct uint64 * ) _r ); + + assert ( ( x == ( ( d * q ) + (*r) ) ) ); + return q; }