aboutsummaryrefslogtreecommitdiffstats
path: root/dos/__udivmoddi4.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
commit5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d (patch)
treed88795d0d3aba72776a20bf8ee4c8778815df3d0 /dos/__udivmoddi4.c
parentdcd9ae222c665a56a57a560be62b407a04573e13 (diff)
parent8833b1c37f7ecfa41e0e2c26e72c2913d5eba969 (diff)
downloadsyslinux-devel-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.tar.gz
syslinux-devel-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.tar.xz
syslinux-devel-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.zip
Merge branch 'master' into core32
Conflicts: com32/include/netinet/in.h com32/include/sys/cpu.h dos/argv.c dos/malloc.c dos/syslinux.c extlinux/main.c libinstaller/setadv.c libinstaller/syslinux.h libinstaller/syslxint.h libinstaller/syslxmod.c linux/syslinux.c mtools/syslinux.c win32/syslinux.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'dos/__udivmoddi4.c')
-rw-r--r--dos/__udivmoddi4.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/dos/__udivmoddi4.c b/dos/__udivmoddi4.c
index 8e7661f5..ca476b70 100644
--- a/dos/__udivmoddi4.c
+++ b/dos/__udivmoddi4.c
@@ -1,31 +1,31 @@
#include <stdint.h>
-uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem_p)
+uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem_p)
{
- uint64_t quot = 0, qbit = 1;
+ uint64_t quot = 0, qbit = 1;
- if ( den == 0 ) {
- asm volatile("int $0");
- return 0; /* If trap returns... */
- }
+ if (den == 0) {
+ asm volatile ("int $0");
+ return 0; /* If trap returns... */
+ }
- /* Left-justify denominator and count shift */
- while ( (int64_t)den >= 0 ) {
- den <<= 1;
- qbit <<= 1;
- }
+ /* Left-justify denominator and count shift */
+ while ((int64_t) den >= 0) {
+ den <<= 1;
+ qbit <<= 1;
+ }
- while ( qbit ) {
- if ( den <= num ) {
- num -= den;
- quot += qbit;
+ while (qbit) {
+ if (den <= num) {
+ num -= den;
+ quot += qbit;
+ }
+ den >>= 1;
+ qbit >>= 1;
}
- den >>= 1;
- qbit >>= 1;
- }
- if ( rem_p )
- *rem_p = num;
+ if (rem_p)
+ *rem_p = num;
- return quot;
+ return quot;
}