1214152Sed/* ===-- parityti2.c - Implement __parityti2 -------------------------------===
2214152Sed *
3214152Sed *                     The LLVM Compiler Infrastructure
4214152Sed *
5222656Sed * This file is dual licensed under the MIT and the University of Illinois Open
6222656Sed * Source Licenses. See LICENSE.TXT for details.
7214152Sed *
8214152Sed * ===----------------------------------------------------------------------===
9214152Sed *
10214152Sed * This file implements __parityti2 for the compiler_rt library.
11214152Sed *
12214152Sed * ===----------------------------------------------------------------------===
13214152Sed */
14214152Sed
15263560Sdim#include "int_lib.h"
16263560Sdim
17263764Sdim#ifdef CRT_HAS_128BIT
18214152Sed
19214152Sed/* Returns: 1 if number of bits is odd else returns 0 */
20214152Sed
21214152Sedsi_int __paritydi2(di_int a);
22214152Sed
23214152Sedsi_int
24214152Sed__parityti2(ti_int a)
25214152Sed{
26214152Sed    twords x;
27214152Sed    x.all = a;
28214152Sed    return __paritydi2(x.s.high ^ x.s.low);
29214152Sed}
30214152Sed
31263764Sdim#endif /* CRT_HAS_128BIT */
32