summaryrefslogtreecommitdiffstats
path: root/SD-VBS/portability
diff options
context:
space:
mode:
authorLeo Chan <leochanj@live.unc.edu>2020-10-22 01:53:21 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-22 01:56:35 -0400
commitd17b33131c14864bd1eae275f49a3f148e21cf29 (patch)
tree0d8f77922e8d193cb0f6edab83018f057aad64a0 /SD-VBS/portability
parent601ed25a4c5b66cb75315832c15613a727db2c26 (diff)
Squashed commit of the sb-vbs branch.
Includes the SD-VBS benchmarks modified to: - Use libextra to loop as realtime jobs - Preallocate memory before starting their main computation - Accept input via stdin instead of via argc Does not include the SD-VBS matlab code. Fixes libextra execution in LITMUS^RT.
Diffstat (limited to 'SD-VBS/portability')
-rw-r--r--SD-VBS/portability/386-gcc.h80
-rw-r--r--SD-VBS/portability/SPARC-gcc.h80
-rw-r--r--SD-VBS/portability/portability.txt25
3 files changed, 185 insertions, 0 deletions
diff --git a/SD-VBS/portability/386-gcc.h b/SD-VBS/portability/386-gcc.h
new file mode 100644
index 0000000..91c95a6
--- /dev/null
+++ b/SD-VBS/portability/386-gcc.h
@@ -0,0 +1,80 @@
1
2/*
3-------------------------------------------------------------------------------
4One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
5-------------------------------------------------------------------------------
6*/
7#define LITTLEENDIAN
8
9/*
10-------------------------------------------------------------------------------
11The macro `BITS64' can be defined to indicate that 64-bit integer types are
12supported by the compiler.
13-------------------------------------------------------------------------------
14*/
15#define BITS64
16
17/*
18-------------------------------------------------------------------------------
19Each of the following `typedef's defines the most convenient type that holds
20integers of at least as many bits as specified. For example, `uint8' should
21be the most convenient type that can hold unsigned integers of as many as
228 bits. The `flag' type must be able to hold either a 0 or 1. For most
23implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
24to the same as `int'.
25-------------------------------------------------------------------------------
26*/
27typedef char flag;
28typedef unsigned char uint8;
29typedef signed char int8;
30typedef int uint16;
31typedef int int16;
32typedef unsigned int uint32;
33typedef signed int int32;
34#ifdef BITS64
35typedef unsigned long long int uint64;
36typedef signed long long int int64;
37#endif
38
39/*
40-------------------------------------------------------------------------------
41Each of the following `typedef's defines a type that holds integers
42of _exactly_ the number of bits specified. For instance, for most
43implementation of C, `bits16' and `sbits16' should be `typedef'ed to
44`unsigned short int' and `signed short int' (or `short int'), respectively.
45-------------------------------------------------------------------------------
46*/
47typedef unsigned char bits8;
48typedef signed char sbits8;
49typedef unsigned short int bits16;
50typedef signed short int sbits16;
51typedef unsigned int bits32;
52typedef signed int sbits32;
53#ifdef BITS64
54typedef unsigned long long int bits64;
55typedef signed long long int sbits64;
56#endif
57
58#ifdef BITS64
59/*
60-------------------------------------------------------------------------------
61The `LIT64' macro takes as its argument a textual integer literal and
62if necessary ``marks'' the literal as having a 64-bit integer type.
63For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
64appended with the letters `LL' standing for `long long', which is `gcc's
65name for the 64-bit integer type. Some compilers may allow `LIT64' to be
66defined as the identity macro: `#define LIT64( a ) a'.
67-------------------------------------------------------------------------------
68*/
69#define LIT64( a ) a##LL
70#endif
71
72/*
73-------------------------------------------------------------------------------
74The macro `INLINE' can be used before functions that should be inlined. If
75a compiler does not support explicit inlining, this macro should be defined
76to be `static'.
77-------------------------------------------------------------------------------
78*/
79#define INLINE extern inline
80
diff --git a/SD-VBS/portability/SPARC-gcc.h b/SD-VBS/portability/SPARC-gcc.h
new file mode 100644
index 0000000..f926615
--- /dev/null
+++ b/SD-VBS/portability/SPARC-gcc.h
@@ -0,0 +1,80 @@
1
2/*
3-------------------------------------------------------------------------------
4One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined.
5-------------------------------------------------------------------------------
6*/
7#define BIGENDIAN
8
9/*
10-------------------------------------------------------------------------------
11The macro `BITS64' can be defined to indicate that 64-bit integer types are
12supported by the compiler.
13-------------------------------------------------------------------------------
14*/
15#define BITS64
16
17/*
18-------------------------------------------------------------------------------
19Each of the following `typedef's defines the most convenient type that holds
20integers of at least as many bits as specified. For example, `uint8' should
21be the most convenient type that can hold unsigned integers of as many as
228 bits. The `flag' type must be able to hold either a 0 or 1. For most
23implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
24to the same as `int'.
25-------------------------------------------------------------------------------
26*/
27typedef int flag;
28typedef int uint8;
29typedef int int8;
30typedef int uint16;
31typedef int int16;
32typedef unsigned int uint32;
33typedef signed int int32;
34#ifdef BITS64
35typedef unsigned long long int uint64;
36typedef signed long long int int64;
37#endif
38
39/*
40-------------------------------------------------------------------------------
41Each of the following `typedef's defines a type that holds integers
42of _exactly_ the number of bits specified. For instance, for most
43implementation of C, `bits16' and `sbits16' should be `typedef'ed to
44`unsigned short int' and `signed short int' (or `short int'), respectively.
45-------------------------------------------------------------------------------
46*/
47typedef unsigned char bits8;
48typedef signed char sbits8;
49typedef unsigned short int bits16;
50typedef signed short int sbits16;
51typedef unsigned int bits32;
52typedef signed int sbits32;
53#ifdef BITS64
54typedef unsigned long long int bits64;
55typedef signed long long int sbits64;
56#endif
57
58#ifdef BITS64
59/*
60-------------------------------------------------------------------------------
61The `LIT64' macro takes as its argument a textual integer literal and
62if necessary ``marks'' the literal as having a 64-bit integer type.
63For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
64appended with the letters `LL' standing for `long long', which is `gcc's
65name for the 64-bit integer type. Some compilers may allow `LIT64' to be
66defined as the identity macro: `#define LIT64( a ) a'.
67-------------------------------------------------------------------------------
68*/
69#define LIT64( a ) a##LL
70#endif
71
72/*
73-------------------------------------------------------------------------------
74The macro `INLINE' can be used before functions that should be inlined. If
75a compiler does not support explicit inlining, this macro should be defined
76to be `static'.
77-------------------------------------------------------------------------------
78*/
79#define INLINE extern inline
80
diff --git a/SD-VBS/portability/portability.txt b/SD-VBS/portability/portability.txt
new file mode 100644
index 0000000..19335de
--- /dev/null
+++ b/SD-VBS/portability/portability.txt
@@ -0,0 +1,25 @@
1The SD-VBS suite is designed to be portable across different platforms. If you would like
2port it, you need to set appropriate platform specific commands.
3
4By default, SD-VBS is set to the x86-64 bit architecture for the Linux operating system. The platform
5specific commands for this configuration can be found in SD-VBS/Portability/386-gcc.h. This configuration
6file is included in SD-VBS/Makefile.common.
7
8To change the platform specific commands:
91. Modify/Add <Architecture>-gcc.h file appropriately
102. Include <Architecture>-gcc.h file in SD-VBS/Makefile.common
11
12We have included a few sample configuration files in SD-VBS/Portability directory.
13These correspond to:
14
151. x386 architecture, 32-64 bit
163. SPARC architecture, 32-64 bit
17
18Note:
19
20SD-VBS has been tested on x86 32-bit and 64-bit architectures. If the user encounters undesired behavior
21while running the SD-VBS on other platforms, please report the bugs to:
22
23Sravanthi Kota Venkata: <skotavenkata@cs.ucsd.edu>
24
25