Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / mips / mips64-dspr2 / Makefile
1 CROSS_COMPILE   ?= mips64el-unknown-linux-gnu-
2
3 SIM = qemu-system-mips64el
4 SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
5
6 AS      = $(CROSS_COMPILE)as
7 LD      = $(CROSS_COMPILE)ld
8 CC      = $(CROSS_COMPILE)gcc
9 AR      = $(CROSS_COMPILE)ar
10 NM      = $(CROSS_COMPILE)nm
11 STRIP       = $(CROSS_COMPILE)strip
12 RANLIB      = $(CROSS_COMPILE)ranlib
13 OBJCOPY     = $(CROSS_COMPILE)objcopy
14 OBJDUMP     = $(CROSS_COMPILE)objdump
15
16 VECTORS_OBJ ?= ./head.o ./printf.o
17
18 HEAD_FLAGS ?= -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe \
19               -msoft-float -march=mips64 -Wa,-mips64 -Wa,--trap \
20               -msym32 -DKBUILD_64BIT_SYM32 -I./
21
22 CFLAGS ?= -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -fno-builtin  \
23           -pipe -march=mips64r2 -mgp64 -mdspr2 -static -Wa,--trap -msym32 \
24           -DKBUILD_64BIT_SYM32 -I./
25
26 LDFLAGS = -T./mips_boot.lds -L./
27 FLAGS = -nostdlib -mabi=64 -march=mips64r2 -mgp64 -mdspr2
28
29 TESTCASES = absq_s_qb.tst
30 TESTCASES += addqh_ph.tst
31 TESTCASES += addqh_r_ph.tst
32 TESTCASES += addqh_r_w.tst
33 TESTCASES += addqh_w.tst
34 #TESTCASES += adduh_ob.tst
35 TESTCASES += adduh_qb.tst
36 #TESTCASES += adduh_r_ob.tst
37 TESTCASES += adduh_r_qb.tst
38 TESTCASES += addu_ph.tst
39 #TESTCASES += addu_qh.tst
40 TESTCASES += addu_s_ph.tst
41 #TESTCASES += addu_s_qh.tst
42 TESTCASES += append.tst
43 TESTCASES += balign.tst
44 #TESTCASES += cmpgdu_eq_ob.tst
45 TESTCASES += cmpgdu_eq_qb.tst
46 #TESTCASES += cmpgdu_le_ob.tst
47 TESTCASES += cmpgdu_le_qb.tst
48 #TESTCASES += cmpgdu_lt_ob.tst
49 TESTCASES += cmpgdu_lt_qb.tst
50 #TESTCASES += dbalign.tst
51 TESTCASES += dpaqx_sa_w_ph.tst
52 TESTCASES += dpaqx_s_w_ph.tst
53 TESTCASES += dpa_w_ph.tst
54 #TESTCASES += dpa_w_qh.tst
55 TESTCASES += dpax_w_ph.tst
56 TESTCASES += dpsqx_sa_w_ph.tst
57 TESTCASES += dpsqx_s_w_ph.tst
58 TESTCASES += dps_w_ph.tst
59 #TESTCASES += dps_w_qh.tst
60 TESTCASES += dpsx_w_ph.tst
61 TESTCASES += mul_ph.tst
62 TESTCASES += mulq_rs_w.tst
63 TESTCASES += mulq_s_ph.tst
64 TESTCASES += mulq_s_w.tst
65 TESTCASES += mulsaq_s_w_ph.tst
66 TESTCASES += mulsa_w_ph.tst
67 TESTCASES += mul_s_ph.tst
68 TESTCASES += precr_qb_ph.tst
69 TESTCASES += precr_sra_ph_w.tst
70 TESTCASES += precr_sra_r_ph_w.tst
71 TESTCASES += prepend.tst
72 TESTCASES += shra_qb.tst
73 TESTCASES += shra_r_qb.tst
74 #TESTCASES += shrav_ob.tst
75 TESTCASES += shrav_qb.tst
76 #TESTCASES += shrav_r_ob.tst
77 TESTCASES += shrav_r_qb.tst
78 TESTCASES += shrl_ph.tst
79 TESTCASES += shrlv_ph.tst
80 TESTCASES += subqh_ph.tst
81 TESTCASES += subqh_r_ph.tst
82 TESTCASES += subqh_r_w.tst
83 TESTCASES += subqh_w.tst
84 #TESTCASES += subuh_ob.tst
85 TESTCASES += subuh_qb.tst
86 #TESTCASES += subuh_r_ob.tst
87 TESTCASES += subuh_r_qb.tst
88 TESTCASES += subu_ph.tst
89 #TESTCASES += subu_qh.tst
90 TESTCASES += subu_s_ph.tst
91 #TESTCASES += subu_s_qh.tst
92
93 all: build
94
95 head.o : head.S
96         $(Q)$(CC) $(HEAD_FLAGS) -D"STACK_TOP=0xffffffff80200000" -c $< -o $@
97
98 %.o  : %.S
99         $(CC) $(CFLAGS) -c $< -o $@
100
101 %.o  : %.c
102         $(CC) $(CFLAGS) -c $< -o $@
103
104 %.tst: %.o $(VECTORS_OBJ)
105         $(CC) $(VECTORS_OBJ) $(FLAGS) $(LDFLAGS) $< -o $@
106
107 build: $(VECTORS_OBJ) $(MIPSSOC_LIB) $(TESTCASES)
108
109 check:  $(VECTORS_OBJ) $(MIPSSOC_LIB) $(TESTCASES)
110         @for case in $(TESTCASES); do \
111                 echo $(SIM) $(SIMFLAGS) ./$$case; \
112                 $(SIM) $(SIMFLAGS) ./$$case & (sleep 1; killall $(SIM)); \
113         done
114
115 clean:
116         $(Q)rm -f *.o *.tst *.a