infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1#pragma once
18#include <inttypes.h>
19#include <stddef.h>
20
22typedef struct {
23 double x;
24 double y;
25} Point;
26
28typedef struct {
29 float v[4];
30} Vector4;
31
33typedef struct {
34 long long data[4];
35} LargeData;
36
38typedef union {
39 int i;
40 float f;
41} Number;
42
44typedef struct {
45 int a, b, c, d, e, f;
47
49typedef struct {
50 int i;
51 double d;
53
55typedef struct {
56 int * val_ptr;
57 const char * str_ptr;
59
65#pragma pack(push, 1)
66typedef struct {
67 char a;
68 uint64_t b;
70#pragma pack(pop)
71
73typedef struct {
74 int a, b, c;
A larger struct used for testing pass-by-reference and stack arguments.
Definition types.h:33
A struct larger than 16 bytes, guaranteed to be passed by reference on most ABIs.
Definition types.h:44
int a
Definition types.h:45
A struct with mixed integer and float members, used to test complex classification rules on System V ...
Definition types.h:49
int i
Definition types.h:50
double d
Definition types.h:51
A struct whose size (12 bytes) is not a power of two, used to test ABI rules for such types.
Definition types.h:73
int a
Definition types.h:74
A packed struct with an unusual size (9 bytes) and alignment (1).
Definition types.h:66
char a
Definition types.h:67
uint64_t b
Definition types.h:68
A simple struct with two doubles, often used to test pass-by-value on registers.
Definition types.h:22
double x
Definition types.h:23
double y
Definition types.h:24
A struct containing pointers, used to test pointer argument handling.
Definition types.h:55
const char * str_ptr
Definition types.h:57
int * val_ptr
Definition types.h:56
A struct containing an array, often used to test HFA (Homogeneous Floating-point Aggregate) rules.
Definition types.h:28
A simple union to test aggregate classification.
Definition types.h:38
float f
Definition types.h:40
int i
Definition types.h:39