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-10-10 20:10:48 +00:00
|
|
|
ARCHFLAGS = ## -xarch=v9
|
|
|
|
|
|
|
|
CC = /opt/SUNWspro/bin/cc
|
|
|
|
CCFLAGS = -g $(ARCHFLAGS)
|
|
|
|
## CC = gcc
|
|
|
|
## CCFLAGS = -g $(ARCHFLAGS) ## -mcpu=v9
|
2001-08-28 23:26:44 +00:00
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
|
2001-10-14 23:15:42 +00:00
|
|
|
LLCTESTS := $(shell /bin/ls *.ll | grep -v testswitch | grep -v opttest | grep -v xx )
|
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-10-10 20:10:48 +00:00
|
|
|
testsparc : $(LLCTESTS:%.ll=%.s)
|
|
|
|
|
2001-06-06 20:29:01 +00:00
|
|
|
clean :
|
2001-10-11 04:24:10 +00:00
|
|
|
rm -f *.[123] *.bc *.mc *.s 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) > $@
|
|
|
|
|
2001-10-10 20:10:48 +00:00
|
|
|
## %.o: %.s %.ll
|
|
|
|
## /usr/ccs/bin/as $(ARCHFLAGS) $<
|
|
|
|
|
|
|
|
|
|
|
|
%.o: %.s
|
|
|
|
$(CC) -c $(CCFLAGS) $<
|
2001-09-28 14:13:09 +00:00
|
|
|
|