blob: c81e7ee5e897dcde652ac45a86788d0760288f14 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001/*
2 * Copyright (C) 2005-2011 by Wind River Systems, Inc.
3 *
Brad Bishopc342db32019-05-15 21:57:59 -04004 * SPDX-License-Identifier: MIT
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005 *
6 */
7
Andrew Geissler99467da2019-02-25 18:54:23 -06008#pragma once
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009
Brad Bishopd5ae7d92018-06-14 09:52:03 -070010#if defined (__bpf__)
11#define __MHWORDSIZE 64
12#elif defined (__arm__)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013#define __MHWORDSIZE 32
14#elif defined (__aarch64__) && defined ( __LP64__)
15#define __MHWORDSIZE 64
16#elif defined (__aarch64__)
17#define __MHWORDSIZE 32
18#else
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019#include <bits/wordsize.h>
Brad Bishop6e60e8b2018-02-01 10:27:11 -050020#if defined (__WORDSIZE)
21#define __MHWORDSIZE __WORDSIZE
22#else
23#error "__WORDSIZE is not defined"
24#endif
25#endif
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Brad Bishop6e60e8b2018-02-01 10:27:11 -050027#if __MHWORDSIZE == 32
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
29#ifdef _MIPS_SIM
30
31#if _MIPS_SIM == _ABIO32
32#include <ENTER_HEADER_FILENAME_HERE-32.h>
33#elif _MIPS_SIM == _ABIN32
34#include <ENTER_HEADER_FILENAME_HERE-n32.h>
35#else
36#error "Unknown _MIPS_SIM"
37#endif
38
39#else /* _MIPS_SIM is not defined */
40#include <ENTER_HEADER_FILENAME_HERE-32.h>
41#endif
42
Brad Bishop6e60e8b2018-02-01 10:27:11 -050043#elif __MHWORDSIZE == 64
Patrick Williamsc124f4f2015-09-15 14:41:29 -050044#include <ENTER_HEADER_FILENAME_HERE-64.h>
45#else
46#error "Unknown __WORDSIZE detected"
47#endif /* matches #if __WORDSIZE == 32 */
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048