mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Checkin simple testcases for LLVM-JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3d7771a387
commit
1405ec0ce1
23
test/Jello/Makefile
Normal file
23
test/Jello/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# test/Regression/Jello/Makefile
|
||||
#
|
||||
# This directory contains regression tests for the LLVM jello program.
|
||||
#
|
||||
LEVEL = ../../..
|
||||
include $(LEVEL)/test/Makefile.tests
|
||||
|
||||
TESTS := $(wildcard *.ll)
|
||||
FTESTS := $(wildcard *.llx) # Freeform tests
|
||||
|
||||
all:: $(addprefix Output/, $(TESTS:%.ll=%.out))
|
||||
|
||||
Output/%.out: Output/%.bc
|
||||
@echo "======== Running $< ==================="
|
||||
$(VERB) jello $< > $@ 2>&1 || \
|
||||
( cat $@; rm -f $@; $(FAILURE) $@ )
|
||||
|
||||
|
||||
all:: $(addprefix Output/, $(FTESTS:%.llx=%.llx.out))
|
||||
|
||||
Output/%.llx.out: %.llx Output/.dir $(LAS)
|
||||
-$(TESTRUNR) $<
|
||||
|
4
test/Jello/test0.ll
Normal file
4
test/Jello/test0.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; test ret
|
||||
void %main() {
|
||||
ret void
|
||||
}
|
4
test/Jello/test1.ll
Normal file
4
test/Jello/test1.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; test ret of an integer
|
||||
int %main() {
|
||||
ret int 0
|
||||
}
|
5
test/Jello/test2.ll
Normal file
5
test/Jello/test2.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; test a simple add
|
||||
int %main() {
|
||||
%X = add int 1, 2
|
||||
ret int %X
|
||||
}
|
6
test/Jello/test3.ll
Normal file
6
test/Jello/test3.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; test unconditional branch
|
||||
int %main() {
|
||||
br label %Test
|
||||
Test:
|
||||
ret int 0
|
||||
}
|
7
test/Jello/test4.ll
Normal file
7
test/Jello/test4.ll
Normal file
@ -0,0 +1,7 @@
|
||||
; test phi node
|
||||
int %main() {
|
||||
br label %Test
|
||||
Test:
|
||||
%X = phi int [7, %0]
|
||||
ret int %X
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user