Skip to content

Commit

Permalink
fix owi header
Browse files Browse the repository at this point in the history
  • Loading branch information
Laplace-Demon committed Jul 16, 2024
1 parent aba61ef commit 011692f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 49 deletions.
48 changes: 27 additions & 21 deletions src/libc/include/owi.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
#ifndef _OWI_H
#define _OWI_H

void *owi_malloc(void *base, unsigned int size);

void owi_free(void *);

char owi_i8(void);

int owi_i32(void);

long long owi_i64(void);

float owi_f32(void);

double owi_f64(void);

_Bool owi_bool(void);

void owi_assume(int c);
void owi_assert(int c);

void owi_abort(void);
void owi_exit(int c);
__attribute__((import_module("summaries"), import_name("alloc"))) void *
owi_malloc(void *, unsigned int);
__attribute__((import_module("summaries"), import_name("dealloc"))) void
owi_free(void *);

__attribute__((import_module("symbolic"), import_name("i8_symbol"))) char
owi_i8(void);
__attribute__((import_module("symbolic"), import_name("i32_symbol"))) int
owi_i32(void);
__attribute__((import_module("symbolic"), import_name("i64_symbol"))) long long
owi_i64(void);
__attribute__((import_module("symbolic"), import_name("f32_symbol"))) float
owi_f32(void);
__attribute__((import_module("symbolic"), import_name("f64_symbol"))) double
owi_f64(void);
__attribute__((import_module("symbolic"), import_name("bool_symbol"))) _Bool
owi_bool(void);

__attribute__((import_module("symbolic"), import_name("assume"))) void
owi_assume(int);
__attribute__((import_module("symbolic"), import_name("assert"))) void
owi_assert(int);

__attribute__((import_module("summaries"))) __attribute__((import_name("abort"))) void
owi_abort(void);
__attribute__((import_module("summaries"))) __attribute__((import_name("exit"))) void
owi_exit(int);

#endif
28 changes: 0 additions & 28 deletions src/libc/src/owi.c
Original file line number Diff line number Diff line change
@@ -1,29 +1 @@
#include <owi.h>

__attribute__((import_module("summaries"), import_name("alloc"))) void *
owi_malloc(void *, unsigned int);
__attribute__((import_module("summaries"), import_name("dealloc"))) void
owi_free(void *);

__attribute__((import_module("symbolic"), import_name("i8_symbol"))) char
owi_i8(void);
__attribute__((import_module("symbolic"), import_name("i32_symbol"))) int
owi_i32(void);
__attribute__((import_module("symbolic"), import_name("i64_symbol"))) long long
owi_i64(void);
__attribute__((import_module("symbolic"), import_name("f32_symbol"))) float
owi_f32(void);
__attribute__((import_module("symbolic"), import_name("f64_symbol"))) double
owi_f64(void);
__attribute__((import_module("symbolic"), import_name("bool_symbol"))) _Bool
owi_bool(void);

__attribute__((import_module("symbolic"), import_name("assume"))) void
owi_assume(int);
__attribute__((import_module("symbolic"), import_name("assert"))) void
owi_assert(int);

__attribute__((import_module("summaries"))) __attribute__((import_name("abort"))) void
owi_abort(void);
__attribute__((import_module("summaries"))) __attribute__((import_name("exit"))) void
owi_exit(int);

0 comments on commit 011692f

Please sign in to comment.