aaaa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A.hs | |
module A where | |
class Foo a where | |
foo :: a -> Bool | |
data X = X Int | |
-- B.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS = -Wall -Wextra | |
ifeq ($(DEBUG),1) | |
GRAMINE_LOG_LEVEL = debug | |
CFLAGS += -g | |
else | |
GRAMINE_LOG_LEVEL = error | |
CFLAGS += -O3 | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello World manifest file example | |
loader.entrypoint = "file:{{ gramine.libos }}" | |
libos.entrypoint = "/helloworld" | |
loader.log_level = "{{ log_level }}" | |
loader.env.LD_LIBRARY_PATH = "/lib:/lib/x86_64-linux-gnu" | |
fs.mounts = [ | |
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<HsFFI.h> | |
. | |
. | |
static void my_enter(void) __attribute__((constructor)); | |
static void my_enter(void) | |
{ | |
static char *argv[] = { "libFoo.so", 0 }, **argv_ = argv; | |
static int argc = 1; | |
hs_init(&argc, &argv_); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file |
With the completion of GSoC 2018, this project has completed an initial step to introduce basic vectorization functions to the Glasgow Haskell Compiler. At the end of this project my branch of GHC (https://github.com/Abhiroop/ghc-1/tree/wip/simd-ncg-support) supports:
Among constructors and de-constructors
broadcastFloatX4# :: Float# -> FloatX4#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <smmintrin.h> //SSE4_1 | |
#include <emmintrin.h> //SSE2 | |
void print128_num(__m128i var) | |
{ | |
//int64_t *v64val = (int64_t*) &var; | |
//printf("%.16llx %.16llx\n", v64val[1], v64val[0]); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/compiler/cmm/CmmCallConv.hs b/compiler/cmm/CmmCallConv.hs | |
index e1067e9..241a8f5 100644 | |
--- a/compiler/cmm/CmmCallConv.hs | |
+++ b/compiler/cmm/CmmCallConv.hs | |
@@ -66,7 +66,7 @@ assignArgumentsPos dflags off conv arg_ty reps = (stk_off, assignments) | |
| otherwise = int | |
where vec = case (w, regs) of | |
(W128, (vs, fs, ds, ls, s:ss)) | |
- | passVectorInReg W128 dflags -> k (RegisterParam (XmmReg s), (vs, fs, ds, ls, ss)) | |
+ | passVectorInReg W128 dflags -> k (RegisterParam (XmmReg s 4 W32), (vs, fs, ds, ls, ss)) |
NewerOlder