diff options
| author | Michael Brown | 2007-02-01 00:58:52 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-02-01 00:58:52 +0100 |
| commit | 406b20a64d8177e8a553c3d898f2e37a11dce186 (patch) | |
| tree | 81b1a996637a48094f05d28e9ba1665c1ea80e95 /src/arch | |
| parent | Added __umoddi3 (diff) | |
| download | ipxe-406b20a64d8177e8a553c3d898f2e37a11dce186.tar.gz ipxe-406b20a64d8177e8a553c3d898f2e37a11dce186.tar.xz ipxe-406b20a64d8177e8a553c3d898f2e37a11dce186.zip | |
Assert that division result is correct
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/i386/core/udivmod64.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/arch/i386/core/udivmod64.c b/src/arch/i386/core/udivmod64.c index bb58102cd..b4f14b110 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; } |
