negdi2.c revision 302408
155992Swpaul/* ===-- negdi2.c - Implement __negdi2 -------------------------------------=== 255992Swpaul * 355992Swpaul * The LLVM Compiler Infrastructure 455992Swpaul * 555992Swpaul * This file is dual licensed under the MIT and the University of Illinois Open 655992Swpaul * Source Licenses. See LICENSE.TXT for details. 755992Swpaul * 855992Swpaul * ===----------------------------------------------------------------------=== 955992Swpaul * 1055992Swpaul * This file implements __negdi2 for the compiler_rt library. 1155992Swpaul * 1255992Swpaul * ===----------------------------------------------------------------------=== 1355992Swpaul */ 1455992Swpaul 1555992Swpaul#include "int_lib.h" 1655992Swpaul 1755992Swpaul/* Returns: -a */ 1855992Swpaul 1955992SwpaulCOMPILER_RT_ABI di_int 2055992Swpaul__negdi2(di_int a) 2155992Swpaul{ 2255992Swpaul /* Note: this routine is here for API compatibility; any sane compiler 2355992Swpaul * should expand it inline. 2455992Swpaul */ 2555992Swpaul return -a; 2655992Swpaul} 2755992Swpaul