utmath.c revision 26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/*******************************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Module Name: utmath - Integer math support routines
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin ******************************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright (C) 2000 - 2011, Intel Corp.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Redistribution and use in source and binary forms, with or without
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * modification, are permitted provided that the following conditions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * are met:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 1. Redistributions of source code must retain the above copyright
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * notice, this list of conditions, and the following disclaimer,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * without modification.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 2. Redistributions in binary form must reproduce at minimum a disclaimer
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * substantially similar to the "NO WARRANTY" disclaimer below
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * ("Disclaimer") and any redistribution must be conditioned upon
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * including a substantially similar Disclaimer requirement for further
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * binary redistribution.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 3. Neither the names of the above-listed copyright holders nor the names
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * of any contributors may be used to endorse or promote products derived
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * from this software without specific prior written permission.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Alternatively, this software may be distributed under the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * GNU General Public License ("GPL") version 2 as published by the Free
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Software Foundation.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * NO WARRANTY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
#define __UTMATH_C__
#include "acpi.h"
#include "accommon.h"
#ifndef ACPI_USE_NATIVE_DIVIDE
typedef struct uint64_struct
typedef union uint64_overlay
if (Divisor == 0)
if (OutQuotient)
if (OutRemainder)
if (InDivisor == 0)
if (OutQuotient)
if (OutRemainder)
if (Divisor == 0)
if (OutQuotient)
if (OutRemainder)
if (InDivisor == 0)
if (OutQuotient)
if (OutRemainder)