1/* 2 * Copyright 2020, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#pragma once 14 15/* 16 * This is a very naive implementation of stdint that should work for 17 * most major platforms. This is the minimal subset needed for the 18 * runtime. 19 */ 20 21_Static_assert(sizeof(char) == 1, "char is 8 bits"); 22_Static_assert(sizeof(short) == 2, "short is 16 bits"); 23_Static_assert(sizeof(int) == 4, "int is 32 bits"); 24_Static_assert(sizeof(long long) == 8, "long long is 64 bits"); 25_Static_assert(sizeof(long) == sizeof(void *), "long is word size"); 26 27/* Fixed size integer types */ 28typedef signed char sel4runtime_int8_t; 29typedef signed short sel4runtime_int16_t; 30typedef signed int sel4runtime_int32_t; 31typedef signed long long sel4runtime_int64_t; 32 33typedef unsigned char sel4runtime_uint8_t; 34typedef unsigned short sel4runtime_uint16_t; 35typedef unsigned int sel4runtime_uint32_t; 36typedef unsigned long long sel4runtime_uint64_t; 37 38/* Word-sized integer types */ 39typedef signed long sel4runtime_intptr_t; 40typedef unsigned long sel4runtime_uintptr_t; 41