2001-09-08 06:58:33 +08:00
|
|
|
LLC := ../tools/Debug/llc
|
|
|
|
AS := ../tools/Debug/as
|
2001-09-18 21:10:26 +08:00
|
|
|
LLCOPTS := -dsched y
|
2001-10-11 04:10:48 +08:00
|
|
|
ARCHFLAGS = ## -xarch=v9
|
|
|
|
|
|
|
|
CC = /opt/SUNWspro/bin/cc
|
|
|
|
CCFLAGS = -g $(ARCHFLAGS)
|
|
|
|
## CC = gcc
|
|
|
|
## CCFLAGS = -g $(ARCHFLAGS) ## -mcpu=v9
|
2001-08-29 07:26:44 +08:00
|
|
|
|
2001-06-07 04:29:01 +08:00
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
|
2001-10-11 04:10:48 +08:00
|
|
|
LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx.ll | grep -v select.ll )
|
2001-08-29 07:26:44 +08:00
|
|
|
|
2001-08-01 05:45:56 +08:00
|
|
|
|
2001-08-29 07:26:44 +08:00
|
|
|
test all : testasmdis testopt testcodegen
|
2001-06-07 04:29:01 +08:00
|
|
|
@echo "All tests successfully completed!"
|
|
|
|
|
2001-08-29 07:26:44 +08:00
|
|
|
testasmdis : $(TESTS:%.ll=%.ll.asmdis)
|
2001-06-07 04:29:01 +08:00
|
|
|
@echo "All assembler/disassembler test succeeded!"
|
|
|
|
|
2001-08-29 07:26:44 +08:00
|
|
|
testopt : $(TESTS:%.ll=%.ll.opt)
|
|
|
|
|
|
|
|
testselect : $(LLCTESTS:%.ll=%.mc)
|
|
|
|
|
|
|
|
testsched : $(LLCTESTS:%.ll=%.mc)
|
2001-06-07 04:29:01 +08:00
|
|
|
|
2001-08-29 07:26:44 +08:00
|
|
|
testcodegen : $(LLCTESTS:%.ll=%.mc)
|
2001-08-01 05:45:56 +08:00
|
|
|
|
2001-10-11 04:10:48 +08:00
|
|
|
testsparc : $(LLCTESTS:%.ll=%.s)
|
|
|
|
|
2001-06-07 04:29:01 +08:00
|
|
|
clean :
|
2001-10-11 12:24:10 +08:00
|
|
|
rm -f *.[123] *.bc *.mc *.s core
|
2001-06-07 04:29:01 +08:00
|
|
|
|
|
|
|
%.asmdis: %
|
|
|
|
@echo "Running assembler/disassembler test on $<"
|
|
|
|
@./TestAsmDisasm.sh $<
|
|
|
|
|
|
|
|
%.opt: %
|
|
|
|
@echo "Running optimizier test on $<"
|
|
|
|
@./TestOptimizer.sh $<
|
2001-08-01 05:45:56 +08:00
|
|
|
|
2001-09-08 06:13:44 +08:00
|
|
|
%.bc: %.ll
|
|
|
|
$(AS) $< -f
|
2001-08-01 05:45:56 +08:00
|
|
|
|
2001-09-10 05:58:36 +08:00
|
|
|
%.mc: %.ll $(LLC) $(AS)
|
2001-08-01 05:45:56 +08:00
|
|
|
@echo "Generating machine instructions for $<"
|
2001-09-18 21:10:26 +08:00
|
|
|
$(AS) < $< | $(LLC) $(LLCOPTS) > $@
|
2001-09-08 06:13:44 +08:00
|
|
|
|
2001-09-28 22:13:09 +08:00
|
|
|
%.s: %.ll $(LLC) $(AS)
|
|
|
|
$(AS) < $< | $(LLC) > $@
|
|
|
|
|
2001-10-11 04:10:48 +08:00
|
|
|
## %.o: %.s %.ll
|
|
|
|
## /usr/ccs/bin/as $(ARCHFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
$(CC) -c $(CCFLAGS) $<
|
2001-09-28 22:13:09 +08:00
|
|
|
|