Update skeleton

This commit is contained in:
Jeehoon Kang
2020-06-05 20:27:13 +09:00
parent 8134a56966
commit 54004932e3
5 changed files with 4 additions and 39 deletions

5
Jenkinsfile vendored
View File

@@ -39,8 +39,9 @@ pipeline {
// The stack size of a new thread is `2 MiB` on Linux, and this small stack size
// can cause `stack-overflow` error when testing stack-intensive code.
// For this reason, we need to increase the default size of stack to `8 MiB`.
sh "RUST_MIN_STACK=8388608 cargo test"
sh "RUST_MIN_STACK=8388608 cargo test --release"
// TODO: delete `--skip test_examples_asmgen`
sh "RUST_MIN_STACK=8388608 cargo test -- --skip test_examples_asmgen"
sh "RUST_MIN_STACK=8388608 cargo test --release -- --skip test_examples_asmgen"
}
}
}

View File

@@ -1,11 +0,0 @@
int fibo(int x) {
if (x < 2) {
return 1;
}
return fibo(x - 1) + fibo(x - 2);
}
int job() {
return fibo(25);
}

View File

@@ -1,24 +0,0 @@
#include <stdio.h>
unsigned long read_cycles()
{
unsigned long cycles;
asm volatile ("rdcycle %0" : "=r" (cycles));
return cycles;
}
extern int job();
int main() {
unsigned long start, end;
int answer;
start = read_cycles();
answer = job();
end = read_cycles();
printf("cycles: %lu\n", end - start);
printf("answer: %d\n", answer);
return 0;
}

View File

@@ -2,7 +2,7 @@ int g_a[5] = {1, 2, 3};
int main() {
int init = 1;
int a[5] = {init, 2, 3, 4, -5, 6};
int a[5] = {init, 2, 3, 4, -5};
int sum = 0;
for(int i = 0; i < 5; i++) {

View File

@@ -91,7 +91,6 @@ fn test_examples_deadcode() {
);
}
// TODO: after implementing IR parser, delete `ignore` mark
#[test]
fn test_examples_asmgen() {
test_dir(Path::new("examples/asmgen"), &OsStr::new("ir"), test_asmgen);