]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.c
ARM Packages: Fixed line endings
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / umodsi3.c
CommitLineData
1e57a462 1/** @file\r
2 Compiler intrinsic for 32-bit unsigned mod, ported from LLVM code.\r
3\r
4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
5 \r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15/**\r
16 University of Illinois/NCSA\r
17 Open Source License\r
18 \r
19 Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign.\r
20 All rights reserved.\r
21 \r
22 Developed by:\r
23 \r
24 LLVM Team\r
25 \r
26 University of Illinois at Urbana-Champaign\r
27 \r
28 http://llvm.org\r
29 \r
30 Permission is hereby granted, free of charge, to any person obtaining a copy of\r
31 this software and associated documentation files (the "Software"), to deal with\r
32 the Software without restriction, including without limitation the rights to\r
33 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\r
34 of the Software, and to permit persons to whom the Software is furnished to do\r
35 so, subject to the following conditions:\r
36 \r
37 * Redistributions of source code must retain the above copyright notice,\r
38 this list of conditions and the following disclaimers.\r
39 \r
40 * Redistributions in binary form must reproduce the above copyright notice,\r
41 this list of conditions and the following disclaimers in the\r
42 documentation and/or other materials provided with the distribution.\r
43 \r
44 * Neither the names of the LLVM Team, University of Illinois at\r
45 Urbana-Champaign, nor the names of its contributors may be used to\r
46 endorse or promote products derived from this Software without specific\r
47 prior written permission.\r
48 \r
49 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
50 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
51 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
52 CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
53 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
54 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE\r
55 SOFTWARE.\r
56**/\r
57\r
58\r
59#include "Llvm_int_lib.h"\r
60\r
61\r
62// Returns: a % b\r
63\r
64UINT32\r
65__umodsi3(UINT32 a, UINT32 b)\r
66{\r
67 return a - (a / b) * b;\r
68}\r