blob: f7e4ad3b94af49d708f0598c356d9d449d03cdbb [file] [log] [blame]
Edward O'Callaghan2bf62722009-08-05 04:02:56 +00001/* ===-- negti2.c - Implement __negti2 -------------------------------------===
2 *
3 * The LLVM Compiler Infrastructure
4 *
Howard Hinnant9ad441f2010-11-16 22:13:33 +00005 * This file is dual licensed under the MIT and the University of Illinois Open
6 * Source Licenses. See LICENSE.TXT for details.
Edward O'Callaghan2bf62722009-08-05 04:02:56 +00007 *
8 * ===----------------------------------------------------------------------===
9 *
10 * This file implements __negti2 for the compiler_rt library.
11 *
12 * ===----------------------------------------------------------------------===
13 */
Daniel Dunbarb3a69012009-06-26 16:47:03 +000014
Daniel Dunbarb3a69012009-06-26 16:47:03 +000015#include "int_lib.h"
16
Chandler Carruth7f2d7c72012-06-22 21:09:22 +000017#if __x86_64
18
Edward O'Callaghan2bf62722009-08-05 04:02:56 +000019/* Returns: -a */
Daniel Dunbarb3a69012009-06-26 16:47:03 +000020
21ti_int
22__negti2(ti_int a)
23{
Edward O'Callaghan2bf62722009-08-05 04:02:56 +000024 /* Note: this routine is here for API compatibility; any sane compiler
25 * should expand it inline.
26 */
Eli Friedmand02ea672009-07-03 02:26:38 +000027 return -a;
Daniel Dunbarb3a69012009-06-26 16:47:03 +000028}
29
30#endif