Compare commits

..
2 Commits
Author SHA1 Message Date
christoph 5d64884397 Reduce bsort and matrix1 data size 2026-07-07 18:16:09 +02:00
christoph bf87063bf1 Add binarysearch, complex_updates, matrix1 wrappers 2026-07-07 18:15:52 +02:00
5 changed files with 79 additions and 4 deletions
@@ -0,0 +1,25 @@
#include "../lib.h"
extern "C" {
void __pragma_loopbound(unsigned, unsigned) {}
void binarysearch_init(void);
void binarysearch_main(void);
int binarysearch_return(void);
EXPORT("wasm_module") int wasm_module(void) {
binarysearch_init();
fail_start_trace();
binarysearch_main();
fail_stop_trace();
int ret = binarysearch_return() - (-1);
if (ret == 0) {
fail_marker_positive();
} else {
fail_marker_negative();
}
return ret;
}
}
@@ -0,0 +1,25 @@
#include "../lib.h"
extern "C" {
void __pragma_loopbound(unsigned, unsigned) {}
void complex_updates_init(void);
void complex_updates_main(void);
int complex_updates_return(void);
EXPORT("wasm_module") int wasm_module(void) {
complex_updates_init();
fail_start_trace();
complex_updates_main();
fail_stop_trace();
int ret = complex_updates_return();
if (ret == 0) {
fail_marker_positive();
} else {
fail_marker_negative();
}
return ret;
}
}
@@ -0,0 +1,25 @@
#include "../lib.h"
extern "C" {
void __pragma_loopbound(unsigned, unsigned) {}
void matrix1_init(void);
void matrix1_main(void);
int matrix1_return(void);
EXPORT("wasm_module") int wasm_module(void) {
matrix1_init();
fail_start_trace();
matrix1_main();
fail_stop_trace();
int ret = matrix1_return();
if (ret == 0) {
fail_marker_positive();
} else {
fail_marker_negative();
}
return ret;
}
}
@@ -42,7 +42,7 @@ int bsort_BubbleSort(int Array[]);
Declaration of global variables
*/
#define bsort_SIZE 100
#define bsort_SIZE 5
static int bsort_Array[bsort_SIZE];
@@ -64,9 +64,9 @@
__attribute__((import_module("__pragma"), import_name("loopbound"))) extern void
__pragma_loopbound(unsigned int min_bound, unsigned int max_bound);
#define X 10 /* first dimension of array A */
#define Y 10 /* second dimension of array A, first dimension of array B */
#define Z 10 /* second dimension of array B */
#define X 5 /* first dimension of array A */
#define Y 5 /* second dimension of array A, first dimension of array B */
#define Z 5 /* second dimension of array B */
/*
Forward declaration of functions