Commit | Line | Data |
---|---|---|
19c5af72 DE |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | sinclude(../common/aclocal.m4) | |
a271d1d9 | 3 | AC_PREREQ(2.5)dnl |
8ad57737 JSC |
4 | AC_INIT(Makefile.in) |
5 | ||
e3d12c65 | 6 | SIM_AC_COMMON |
8ad57737 | 7 | |
50a2a691 AC |
8 | dnl Options available in this module |
9 | SIM_AC_OPTION_INLINE(0) | |
76a6247f | 10 | SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT) |
50a2a691 AC |
11 | SIM_AC_OPTION_HOSTENDIAN |
12 | SIM_AC_OPTION_WARNINGS | |
13 | ||
14 | ||
c98ec95d JSC |
15 | # Ensure a reasonable default simulator is constructed: |
16 | case "${target}" in | |
b637f306 GRK |
17 | # start-sanitize-tx19 |
18 | mipstx19*-*-*) SIMCONF="-mips1 -mcpu=r1900 -mno-fp --warnings";; | |
19 | # end-sanitize-tx19 | |
6205f379 GRK |
20 | # start-sanitize-tx49 |
21 | mips64tx49*-*-*) SIMCONF="-mips3 --warnings -mcpu=r4900";; | |
22 | # end-sanitize-tx49 | |
276c2d7d | 23 | # start-sanitize-r5900 |
832f05e8 | 24 | mips64r59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";; |
276c2d7d | 25 | # end-sanitize-r5900 |
c98ec95d | 26 | mips64*-*-*) SIMCONF="-mips0 --warnings";; |
831f59a2 | 27 | mips16*-*-*) SIMCONF="-mips0 --warnings";; |
c98ec95d JSC |
28 | mips*-*-*) SIMCONF="-mips2 --warnings";; |
29 | *) SIMCONF="-mips0 --warnings";; | |
30 | esac | |
e3d12c65 | 31 | AC_SUBST(SIMCONF) |
8ad57737 | 32 | |
c476ac55 GRK |
33 | case "${target}" in |
34 | # start-sanitize-tx19 | |
35 | mipstx19*-*-*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";; | |
36 | # end-sanitize-tx19 | |
37 | *) SIM_SUBTARGET="";; | |
38 | esac | |
39 | AC_SUBST(SIM_SUBTARGET) | |
40 | ||
18c64df6 AC |
41 | |
42 | # | |
43 | # Select the byte order of the target | |
44 | # | |
45 | case "${target}" in | |
46 | # start-sanitize-tx19 | |
47 | mipstx19*-*-*) mips_endian=0 ;; | |
48 | # end-sanitize-tx19 | |
49 | # start-sanitize-r5900 | |
50 | mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;; | |
51 | # end-sanitize-r5900 | |
52 | mips64*-*-*) mips_endian=0 ;; | |
53 | mips16*-*-*) mips_endian=0 ;; | |
54 | mips*-*-*) mips_endian=0 ;; | |
55 | *) mips_endian=0 ;; | |
56 | esac | |
57 | SIM_AC_OPTION_ENDIAN($mips_endian) | |
58 | ||
59 | ||
60 | # | |
61 | # Select the bitsize of the target | |
62 | # | |
63 | case "${target}" in | |
64 | # start-sanitize-tx19 | |
65 | mipstx19*-*-*) mips_bitsize=32 ; mips_msb=31 ;; | |
66 | # end-sanitize-tx19 | |
67 | # start-sanitize-r5900 | |
68 | mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
69 | # end-sanitize-r5900 | |
70 | mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
71 | mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;; | |
72 | mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;; | |
73 | *) mips_bitsize=64 ; mips_msb=63 ;; | |
74 | esac | |
75 | SIM_AC_OPTION_BITSIZE($mips_bitsize,$mips_msb) | |
76 | ||
77 | ||
78 | # | |
79 | # Select the floating hardware support of the target | |
80 | # | |
81 | mips_fpu=HARDWARE_FLOATING_POINT | |
82 | case "${target}" in | |
83 | # start-sanitize-tx19 | |
84 | mipstx19*-*-*) mips_fpu=SOFT_FLOATING_POINT ;; | |
85 | # end-sanitize-tx19 | |
86 | # start-sanitize-r5900 | |
87 | mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
88 | # end-sanitize-r5900 | |
89 | mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
90 | mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
91 | mips*-*-*) mips_fpu=HARD_FLOATING_POINT ;; | |
92 | *) mips_fpu=HARD_FLOATING_POINT ;; | |
93 | esac | |
94 | SIM_AC_OPTION_FLOAT($mips_fpu) | |
95 | ||
96 | ||
122edc03 AC |
97 | # |
98 | # Select the sim generator & architecture | |
99 | # | |
100 | sim_gen=NO | |
16bd5d6e AC |
101 | sim_igen_flags="-F 32,64,f -M mipsIV" |
102 | sim_m16_flags="-F 16 -M mips16" | |
103 | ||
122edc03 | 104 | case "${target}" in |
90ad43b2 | 105 | # start-sanitize-tx19 |
16bd5d6e AC |
106 | # mipstx19*-*-*) sim_gen=M16 |
107 | # sim_igen_flags="-F 32,64,f -M tx19" | |
108 | # sim_m16_flags="-F 16 -M tx19" | |
109 | # ;; | |
90ad43b2 | 110 | # end-sanitize-tx19 |
122edc03 | 111 | # start-sanitize-r5900 |
16bd5d6e AC |
112 | # mips64r59*-*-*) sim_gen=IGEN |
113 | # sim_igen_flags="-F 32,64,f -M r5900" | |
114 | # ;; | |
122edc03 AC |
115 | # end-sanitize-r5900 |
116 | # start-sanitize-vr5400 | |
16bd5d6e AC |
117 | mips64vr54*-*-*) sim_gen=IGEN |
118 | sim_igen_flags="-F 32,64,f -M vr5400" | |
119 | ;; | |
122edc03 AC |
120 | # end-sanitize-vr5400 |
121 | # mips16*-*-*) sim_gen=M16 ;; | |
90ad43b2 | 122 | *) sim_gen=NO ;; |
122edc03 AC |
123 | esac |
124 | AC_SUBST(sim_gen) | |
16bd5d6e AC |
125 | AC_SUBST(sim_igen_flags) |
126 | AC_SUBST(sim_m16_flags) | |
122edc03 AC |
127 | |
128 | ||
50a2a691 | 129 | AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h) |
4fa134be | 130 | AC_CHECK_LIB(m, fabs) |
617c07c6 | 131 | AC_CHECK_FUNCS(aint anint sqrt) |
4fa134be | 132 | |
e3d12c65 | 133 | SIM_AC_OUTPUT |