]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - ubuntu/vbox/vboxsf/udivmoddi4.c
1 /* $Id: udivmoddi4.c $ */
3 * IPRT - __udivmoddi4 implementation
7 * Copyright (C) 2006-2016 Oracle Corporation
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
27 #include <iprt/stdint.h>
28 #include <iprt/uint64.h>
30 uint64_t __udivmoddi4(uint64_t u64A
, uint64_t u64B
, uint64_t *pu64R
);
33 * __udivmoddi4() implementation to satisfy external references from 32-bit
34 * code generated by gcc-7 or later.
36 * @param u64A The divident value.
37 * @param u64B The divisor value.
38 * @param pu64R A pointer to the reminder. May be NULL.
39 * @returns u64A / u64B
41 uint64_t __udivmoddi4(uint64_t u64A
, uint64_t u64B
, uint64_t *pu64R
)
49 RTUInt64DivRem(&Quotient
, &Reminder
, &Divident
, &Divisor
);