]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/umodsi3.c
ArmPkg: Replace BSD License with BSD+Patent License
[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
3402aac7 5\r
4059386c 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
1e57a462 7\r
8**/\r
9/**\r
10 University of Illinois/NCSA\r
11 Open Source License\r
3402aac7 12\r
1e57a462 13 Copyright (c) 2003-2008 University of Illinois at Urbana-Champaign.\r
14 All rights reserved.\r
3402aac7 15\r
1e57a462 16 Developed by:\r
3402aac7 17\r
1e57a462 18 LLVM Team\r
3402aac7 19\r
1e57a462 20 University of Illinois at Urbana-Champaign\r
3402aac7 21\r
1e57a462 22 http://llvm.org\r
3402aac7 23\r
1e57a462 24 Permission is hereby granted, free of charge, to any person obtaining a copy of\r
25 this software and associated documentation files (the "Software"), to deal with\r
26 the Software without restriction, including without limitation the rights to\r
27 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\r
28 of the Software, and to permit persons to whom the Software is furnished to do\r
29 so, subject to the following conditions:\r
3402aac7 30\r
1e57a462 31 * Redistributions of source code must retain the above copyright notice,\r
32 this list of conditions and the following disclaimers.\r
3402aac7 33\r
1e57a462 34 * Redistributions in binary form must reproduce the above copyright notice,\r
35 this list of conditions and the following disclaimers in the\r
36 documentation and/or other materials provided with the distribution.\r
3402aac7 37\r
1e57a462 38 * Neither the names of the LLVM Team, University of Illinois at\r
39 Urbana-Champaign, nor the names of its contributors may be used to\r
40 endorse or promote products derived from this Software without specific\r
41 prior written permission.\r
3402aac7 42\r
1e57a462 43 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
44 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
45 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
46 CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
47 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
48 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE\r
49 SOFTWARE.\r
50**/\r
51\r
52\r
53#include "Llvm_int_lib.h"\r
54\r
55\r
56// Returns: a % b\r
57\r
58UINT32\r
59__umodsi3(UINT32 a, UINT32 b)\r
60{\r
61 return a - (a / b) * b;\r
62}\r