2009-08-05 12:02:56 +08:00
|
|
|
/* ===-- negdi2.c - Implement __negdi2 -------------------------------------===
|
|
|
|
*
|
|
|
|
* The LLVM Compiler Infrastructure
|
|
|
|
*
|
|
|
|
* This file is distributed under the University of Illinois Open Source
|
|
|
|
* License. See LICENSE.TXT for details.
|
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*
|
|
|
|
* This file implements __negdi2 for the compiler_rt library.
|
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*/
|
2009-06-27 00:47:03 +08:00
|
|
|
|
|
|
|
#include "int_lib.h"
|
|
|
|
|
2009-08-05 12:02:56 +08:00
|
|
|
/* Returns: -a */
|
2009-06-27 00:47:03 +08:00
|
|
|
|
|
|
|
di_int
|
|
|
|
__negdi2(di_int a)
|
|
|
|
{
|
2009-08-05 12:02:56 +08:00
|
|
|
/* Note: this routine is here for API compatibility; any sane compiler
|
|
|
|
* should expand it inline.
|
|
|
|
*/
|
2009-07-03 10:26:38 +08:00
|
|
|
return -a;
|
2009-06-27 00:47:03 +08:00
|
|
|
}
|