Browse Source

Assert that division result is correct

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
406b20a64d
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/arch/i386/core/udivmod64.c

+ 3
- 0
src/arch/i386/core/udivmod64.c View File

@@ -303,6 +303,9 @@ UDItype __udivmoddi4 ( UDItype x, UDItype d, UDItype *r ) {
303 303
 
304 304
 	udivmod64 ( ( struct uint64 * ) _x, ( struct uint64 * ) _d,
305 305
 		    ( struct uint64 * ) _q, ( struct uint64 * ) _r );
306
+
307
+	assert ( ( x == ( ( d * q ) + (*r) ) ) );
308
+
306 309
 	return q;
307 310
 }
308 311
 

Loading…
Cancel
Save