2001-09-07 22:58:33 +00:00
|
|
|
LLC := ../tools/Debug/llc
|
|
|
|
AS := ../tools/Debug/as
|
2001-09-18 13:10:26 +00:00
|
|
|
LLCOPTS := -dsched y
|
2001-08-28 23:26:44 +00:00
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
|
2001-09-18 13:10:26 +00:00
|
|
|
LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray )
|
2001-08-28 23:26:44 +00:00
|
|
|
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
test all : testasmdis testopt testcodegen
|
2001-06-06 20:29:01 +00:00
|
|
|
@echo "All tests successfully completed!"
|
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testasmdis : $(TESTS:%.ll=%.ll.asmdis)
|
2001-06-06 20:29:01 +00:00
|
|
|
@echo "All assembler/disassembler test succeeded!"
|
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testopt : $(TESTS:%.ll=%.ll.opt)
|
|
|
|
|
|
|
|
testselect : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
|
|
|
|
testsched : $(LLCTESTS:%.ll=%.mc)
|
2001-06-06 20:29:01 +00:00
|
|
|
|
2001-08-28 23:26:44 +00:00
|
|
|
testcodegen : $(LLCTESTS:%.ll=%.mc)
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
clean :
|
2001-07-31 21:45:56 +00:00
|
|
|
rm -f *.[123] *.bc *.mc core
|
2001-06-06 20:29:01 +00:00
|
|
|
|
|
|
|
%.asmdis: %
|
|
|
|
@echo "Running assembler/disassembler test on $<"
|
|
|
|
@./TestAsmDisasm.sh $<
|
|
|
|
|
|
|
|
%.opt: %
|
|
|
|
@echo "Running optimizier test on $<"
|
|
|
|
@./TestOptimizer.sh $<
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-09-07 22:13:44 +00:00
|
|
|
%.bc: %.ll
|
|
|
|
$(AS) $< -f
|
2001-07-31 21:45:56 +00:00
|
|
|
|
2001-09-09 21:58:36 +00:00
|
|
|
%.mc: %.ll $(LLC) $(AS)
|
2001-07-31 21:45:56 +00:00
|
|
|
@echo "Generating machine instructions for $<"
|
2001-09-18 13:10:26 +00:00
|
|
|
$(AS) < $< | $(LLC) $(LLCOPTS) > $@
|
2001-09-07 22:13:44 +00:00
|
|
|
|
2001-09-28 14:13:09 +00:00
|
|
|
%.s: %.ll $(LLC) $(AS)
|
|
|
|
$(AS) < $< | $(LLC) > $@
|
|
|
|
|
|
|
|
%.o: %.s %.ll
|
|
|
|
as -xarch=v9 $<
|
|
|
|
|