diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-02-17 13:44:32 +0000 |
commit | 6224148fdd809170d138216d72b8e6180d626aec (patch) | |
tree | f67127b4ab6026f5e29d0b6aa69bec4f8a223fb2 /test/ccured_olden/bh/trusted_bh.c | |
parent | f9ebf19ba3ca4c3ee67cc88bbea407d4dd734249 (diff) | |
download | compcert-6224148fdd809170d138216d72b8e6180d626aec.tar.gz compcert-6224148fdd809170d138216d72b8e6180d626aec.zip |
Reorganization test directory
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1253 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/ccured_olden/bh/trusted_bh.c')
-rw-r--r-- | test/ccured_olden/bh/trusted_bh.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/test/ccured_olden/bh/trusted_bh.c b/test/ccured_olden/bh/trusted_bh.c deleted file mode 100644 index 6c76f8c2..00000000 --- a/test/ccured_olden/bh/trusted_bh.c +++ /dev/null @@ -1,92 +0,0 @@ -#include "defs.h" -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <sys/types.h> -#ifndef _MSVC -#include <sys/times.h> -#include <sys/param.h> -#endif - - -#ifndef NO_PERF_CHANGES -///* -// * ALLOCATE: memory allocation with error checking. -// */ -//void *allocate(int nb) -//{ -// void *mem; -// -// mem = (void *) calloc(nb, 1); /* calloc zeros memory */ -// if (mem == NULL) { -// fprintf(stderr, "allocate: not enuf memory (%d bytes)\n", nb); -// exit(1); -// } -// return (mem); -//} -#endif // NO_PERF_CHANGES - - - -// Now some wrappers -typedef struct { - void *_p; - void *_b; -} fatp_void; - -//fatp_void strcpy_fss(char *dest, char *src) { -// fatp_void res; -// strcpy(dest, src); -// res._p = (void*)dest; -// res._b = (void*)(dest + strlen(dest)); -// return res; -//} - -#ifndef NO_PERF_CHANGES - #ifdef node2body - #undef node2body - #endif - bodyptr node2body(nodeptr x) { - return (bodyptr)x; - } -#endif - -// And the wild version. I'm being lazy about types -fatp_void node2body_ww(fatp_void x) { - return x; -} - -typedef struct { - nodeptr *_p; - void *_b; - void *_e; -} seqp_node; -bodyptr node2body_sq(seqp_node x) { - if((void*)x._p < x._b || (void*)((char*)x._p + sizeof(body)) > x._e) { - fprintf(stderr, "Bounds check failed in node2body_sq\n"); - exit(1); - } - return (bodyptr)x._p; -} - -#ifndef NO_PERF_CHANGES - #ifdef node2cell - #undef node2cell - #endif - cellptr node2cell(nodeptr x) { - return (cellptr)x; - } -#endif - -// And the wild version.. I'm being lazy about types -fatp_void node2cell_ww(fatp_void x) { - return x; -} - -cellptr node2cell_sq(seqp_node x) { - // if((void*)x._p < x._b || (void*)((char*)x._p + sizeof(cell)) > x._e) { - // fprintf(stderr, "Bounds check failed in node2cell_sq\n"); - // exit(1); - // } - return (cellptr)x._p; -} |