utmath.c (91116) | utmath.c (99679) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: utmath - Integer math support routines | 1/******************************************************************************* 2 * 3 * Module Name: utmath - Integer math support routines |
4 * $Revision: 10 $ | 4 * $Revision: 11 $ |
5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 275 unchanged lines hidden (view full) --- 288 Quotient.Part.Lo, Partial1); 289 290 /* 291 * The quotient is always 32 bits, and simply requires adjustment. 292 * The 64-bit remainder must be generated. 293 */ 294 Partial1 = Quotient.Part.Lo * Divisor.Part.Hi; 295 Partial2.Full = (ACPI_INTEGER) Quotient.Part.Lo * Divisor.Part.Lo; | 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. --- 275 unchanged lines hidden (view full) --- 288 Quotient.Part.Lo, Partial1); 289 290 /* 291 * The quotient is always 32 bits, and simply requires adjustment. 292 * The 64-bit remainder must be generated. 293 */ 294 Partial1 = Quotient.Part.Lo * Divisor.Part.Hi; 295 Partial2.Full = (ACPI_INTEGER) Quotient.Part.Lo * Divisor.Part.Lo; |
296 Partial3.Full = Partial2.Part.Hi + Partial1; | 296 Partial3.Full = (ACPI_INTEGER) Partial2.Part.Hi + Partial1; |
297 298 Remainder.Part.Hi = Partial3.Part.Lo; 299 Remainder.Part.Lo = Partial2.Part.Lo; 300 301 if (Partial3.Part.Hi == 0) 302 { 303 if (Partial3.Part.Lo >= Dividend.Part.Hi) 304 { --- 8 unchanged lines hidden (view full) --- 313 else 314 { 315 Quotient.Part.Lo--; 316 Remainder.Full -= Divisor.Full; 317 } 318 } 319 320 Remainder.Full = Remainder.Full - Dividend.Full; | 297 298 Remainder.Part.Hi = Partial3.Part.Lo; 299 Remainder.Part.Lo = Partial2.Part.Lo; 300 301 if (Partial3.Part.Hi == 0) 302 { 303 if (Partial3.Part.Lo >= Dividend.Part.Hi) 304 { --- 8 unchanged lines hidden (view full) --- 313 else 314 { 315 Quotient.Part.Lo--; 316 Remainder.Full -= Divisor.Full; 317 } 318 } 319 320 Remainder.Full = Remainder.Full - Dividend.Full; |
321 Remainder.Part.Hi = -((INT32) Remainder.Part.Hi); 322 Remainder.Part.Lo = -((INT32) Remainder.Part.Lo); | 321 Remainder.Part.Hi = (UINT32) -((INT32) Remainder.Part.Hi); 322 Remainder.Part.Lo = (UINT32) -((INT32) Remainder.Part.Lo); |
323 324 if (Remainder.Part.Lo) 325 { 326 Remainder.Part.Hi--; 327 } 328 } 329 } 330 --- 98 unchanged lines hidden --- | 323 324 if (Remainder.Part.Lo) 325 { 326 Remainder.Part.Hi--; 327 } 328 } 329 } 330 --- 98 unchanged lines hidden --- |