paritydi2.c revision 215125
119370Spst/* ===-- paritydi2.c - Implement __paritydi2 -------------------------------===
219370Spst *
3130803Smarcel *                     The LLVM Compiler Infrastructure
4130803Smarcel *
5130803Smarcel * This file is distributed under the University of Illinois Open Source
698944Sobrien * License. See LICENSE.TXT for details.
719370Spst *
898944Sobrien * ===----------------------------------------------------------------------===
998944Sobrien *
1098944Sobrien * This file implements __paritydi2 for the compiler_rt library.
1198944Sobrien *
1219370Spst * ===----------------------------------------------------------------------===
1398944Sobrien */
1498944Sobrien
1598944Sobrien#include "int_lib.h"
1698944Sobrien
1719370Spst/* Returns: 1 if number of bits is odd else returns 0 */
1898944Sobrien
1998944Sobriensi_int __paritysi2(si_int a);
2098944Sobrien
2198944Sobriensi_int
2219370Spst__paritydi2(di_int a)
2319370Spst{
2419370Spst    dwords x;
2519370Spst    x.all = a;
2619370Spst    return __paritysi2(x.s.high ^ x.s.low);
2719370Spst}
28130803Smarcel