summaryrefslogtreecommitdiff
path: root/src/arch/dalvik/opdefs/Makefile.am
blob: 055e8a4059da4998c3d0639cb9f1ba1fec2a9aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274

include ../../../../tools/d2c/d2c.mk


D2C_BIN = ../../../../tools/d2c/d2c
GEN_BIN = ../../../../tools/d2c/d2c_genmakefile.sh

D2C_TYPE = format

D2C_OUTDIR = $(PWD)/..

D2C_ARCH = dalvik
D2C_HEADER = _ARCH_DALVIK
D2C_PREFIX = DALVIK_OPT_

D2C_ENCODINGS =							\
	-e none

D2C_MACROS =										\
    -M SetInsFlag=g_arch_instruction_set_flag

FIXED_C_INCLUDES = \
	\n\#include \<stdint.h\> \
	\n \
	\n\#include \"..\/fetch.h\" \
	\n\#include \"..\/helpers.h\" \
	\n\#include \"..\/instruction.h\" \
	\n\#include \"..\/link.h\" \
	\n\#include \"..\/post.h\" \
	\n\#include \"..\/processor.h\" \
	\n\#include \"..\/..\/context.h\" \
	\n\#include \"..\/..\/..\/analysis\/content.h\" \
	\n\#include \"..\/..\/..\/format\/executable.h\" \
	\n\n

FIXED_H_INCLUDES = \
	\n\#include \<stdint.h\> \
	\n \
	\n\#include \"..\/processor.h\" \
	\n\#include \"..\/..\/context.h\" \
	\n\#include \"..\/..\/..\/analysis\/content.h\" \
	\n\#include \"..\/..\/..\/format\/executable.h\" \
	\n\n

# for (( i = 0; i < 256; i++)); do def=$(ls `printf "*_%02x.d" $i` 2> /dev/null); test -z "$def" || echo -e "\t$def\t\t\t\t\t\t\t\\" ; done
DALVIK_DEFS = 							\
	nop_00.d							\
	move_01.d							\
	move_02.d							\
	move_03.d							\
	move_04.d							\
	move_05.d							\
	move_06.d							\
	move_07.d							\
	move_08.d							\
	move_09.d							\
	move_0a.d							\
	move_0b.d							\
	move_0c.d							\
	move_0d.d							\
	return_0e.d							\
	return_0f.d							\
	return_10.d							\
	return_11.d							\
	const_12.d							\
	const_13.d							\
	const_14.d							\
	const_15.d							\
	const_16.d							\
	const_17.d							\
	const_18.d							\
	const_19.d							\
	const_1a.d							\
	const_1b.d							\
	const_1c.d							\
	monitor_1d.d						\
	monitor_1e.d						\
	check_1f.d							\
	instanceof_20.d						\
	array_21.d							\
	new_22.d							\
	new_23.d							\
	array_24.d							\
	filled_25.d							\
	array_26.d							\
	throw_27.d							\
	goto_28.d							\
	goto_29.d							\
	goto_2a.d							\
	switch_2b.d							\
	switch_2c.d							\
	cmpl_2d.d							\
	cmpg_2e.d							\
	cmpl_2f.d							\
	cmpg_30.d							\
	cmp_31.d							\
	if_32.d								\
	if_33.d								\
	if_34.d								\
	if_35.d								\
	if_36.d								\
	if_37.d								\
	if_38.d								\
	if_39.d								\
	if_3a.d								\
	if_3b.d								\
	if_3c.d								\
	if_3d.d								\
	aget_44.d							\
	aget_45.d							\
	aget_46.d							\
	aget_47.d							\
	aget_48.d							\
	aget_49.d							\
	aget_4a.d							\
	aput_4b.d							\
	aput_4c.d							\
	aput_4d.d							\
	aput_4e.d							\
	aput_4f.d							\
	aput_50.d							\
	aput_51.d							\
	iget_52.d							\
	iget_53.d							\
	iget_54.d							\
	iget_55.d							\
	iget_56.d							\
	iget_57.d							\
	iget_58.d							\
	iput_59.d							\
	iput_5a.d							\
	iput_5b.d							\
	iput_5c.d							\
	iput_5d.d							\
	iput_5e.d							\
	iput_5f.d							\
	sget_60.d							\
	sget_61.d							\
	sget_62.d							\
	sget_63.d							\
	sget_64.d							\
	sget_65.d							\
	sget_66.d							\
	sput_67.d							\
	sput_68.d							\
	sput_69.d							\
	sput_6a.d							\
	sput_6b.d							\
	sput_6c.d							\
	sput_6d.d							\
	invoke_6e.d							\
	invoke_6f.d							\
	invoke_70.d							\
	invoke_71.d							\
	invoke_72.d							\
	invoke_74.d							\
	invoke_75.d							\
	invoke_76.d							\
	invoke_77.d							\
	invoke_78.d							\
	neg_7b.d							\
	not_7c.d							\
	neg_7d.d							\
	not_7e.d							\
	neg_7f.d							\
	neg_80.d							\
	to_81.d								\
	to_82.d								\
	to_83.d								\
	to_84.d								\
	to_85.d								\
	to_86.d								\
	to_87.d								\
	to_88.d								\
	to_89.d								\
	to_8a.d								\
	to_8b.d								\
	to_8c.d								\
	to_8d.d								\
	to_8e.d								\
	to_8f.d								\
	add_90.d							\
	sub_91.d							\
	mul_92.d							\
	div_93.d							\
	rem_94.d							\
	and_95.d							\
	or_96.d								\
	xor_97.d							\
	shl_98.d							\
	shr_99.d							\
	ushr_9a.d							\
	add_9b.d							\
	sub_9c.d							\
	mul_9d.d							\
	div_9e.d							\
	rem_9f.d							\
	and_a0.d							\
	or_a1.d								\
	xor_a2.d							\
	shl_a3.d							\
	shr_a4.d							\
	ushr_a5.d							\
	add_a6.d							\
	sub_a7.d							\
	mul_a8.d							\
	div_a9.d							\
	rem_aa.d							\
	add_ab.d							\
	sub_ac.d							\
	mul_ad.d							\
	div_ae.d							\
	rem_af.d							\
	add_b0.d							\
	sub_b1.d							\
	mul_b2.d							\
	div_b3.d							\
	rem_b4.d							\
	and_b5.d							\
	or_b6.d								\
	xor_b7.d							\
	shl_b8.d							\
	shr_b9.d							\
	ushr_ba.d							\
	add_bb.d							\
	sub_bc.d							\
	mul_bd.d							\
	div_be.d							\
	rem_bf.d							\
	and_c0.d							\
	or_c1.d								\
	xor_c2.d							\
	shl_c3.d							\
	shr_c4.d							\
	ushr_c5.d							\
	add_c6.d							\
	sub_c7.d							\
	mul_c8.d							\
	div_c9.d							\
	rem_ca.d							\
	add_cb.d							\
	sub_cc.d							\
	mul_cd.d							\
	div_ce.d							\
	rem_cf.d							\
	add_d0.d							\
	rsub_d1.d							\
	mul_d2.d							\
	div_d3.d							\
	rem_d4.d							\
	and_d5.d							\
	or_d6.d								\
	xor_d7.d							\
	add_d8.d							\
	rsub_d9.d							\
	mul_da.d							\
	div_db.d							\
	rem_dc.d							\
	and_dd.d							\
	or_de.d								\
	xor_df.d							\
	shl_e0.d							\
	shr_e1.d							\
	ushr_e2.d


all: $(DALVIK_DEFS:.d=.g) fmk.done d2c_final_rules

fmk.done: $(DALVIK_DEFS)
	$(GEN_BIN) ../opcodes/ ../opdefs/.gen ../../../../tools/d2c/globalgen.mk -
	touch $@

clean:
	rm -rf $(DALVIK_DEFS:.d=.g) .gen fmk.done