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