1 2012-01-21 Ulrich Drepper <drepper@gmail.com>
3 * i386_disasm.c (ADD_NSTRING): Define.
4 (i386_disasm): Print color codes in the appropriate places.
6 2011-10-16 Roland McGrath <roland@hack.frob.com>
8 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h.
9 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h.
10 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir).
11 (%_dis.h): Renamed target pattern to ...
12 ($(srcdir)/%_dis.h): ... this.
13 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE].
15 2010-08-16 Roland McGrath <roland@redhat.com>
17 * Makefile.am (%_defs): New pattern rule.
18 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input.
19 (CLEANFILES): Include all those files.
21 2010-02-15 Roland McGrath <roland@redhat.com>
23 * Makefile.am: Use config/eu.am for common stuff.
25 2009-04-14 Roland McGrath <roland@redhat.com>
27 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the
28 default on every machine.
30 2009-01-23 Roland McGrath <roland@redhat.com>
32 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
33 substitution that can produce leading whitespace.
35 2009-01-01 Ulrich Drepper <drepper@redhat.com>
37 * i386_parse.y (instrtable_out): Optimize match_data table by not
38 emitting 0xff masks for leading bytes.
39 * i386_disasm.c (i386_disasm): Adjust reader of match_data.
41 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We
42 don't expect snprintf to fail.
44 2008-12-31 Ulrich Drepper <drepper@redhat.com>
46 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw,
47 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm,
48 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw,
49 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd,
50 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq,
51 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd,
54 * i386_disasm.c (i386_disasm): Correct resizing of buffer.
56 * i386_parse.y (struct argstring): Add off element.
57 (off_op_str): New global variable.
58 (print_op_str): Print strings as concatenated strings. Keep track
59 of index and length. Update ->off element.
60 (print_op_str_idx): New function.
61 (instrtable_out): Mark op%d_fct as const.
62 Emit two tables for the strings: the string itself (op%d_str) and the
63 index table (op%d_str_idx).
64 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition.
66 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when
69 * i386_disasm.c (i386_disasm): Minor optimizations.
71 * i386_parse.y (instrtable_out): No need to emit index, the reader can
73 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no
76 * i386_disasm.c (amd3dnow): Mark as const.
78 * defs/i386: Add blendvpd and blendvps opcodes.
80 2008-12-30 Ulrich Drepper <drepper@redhat.com>
82 * defs/i386: Add blendpd and blendps opcodes.
84 2008-12-19 Ulrich Drepper <drepper@redhat.com>
86 * defs/i386: Add entry for AMD 3DNOW.
87 * i386_disasm.c: Implement AMD 3DNOW disassembly.
89 2008-12-17 Ulrich Drepper <drepper@redhat.com>
91 * i386_disasm.c (i386_disasm): If instruction matches prefix,
92 undoing the prefix match finishes the instruction.
94 2008-01-21 Roland McGrath <roland@redhat.com>
96 * defs/i386: Fix typo in comment.
97 * i386_disasm.c (i386_disasm): Handle cltq, cqto.
99 * i386_parse.y: Add sanity check for NMNES macro value.
100 * Makefile.am (i386_parse.o): Fix target in dependency rule.
101 (i386_parse.h): New target with empty commands.
102 (i386_lex.o): Depend on it in place of i386_parse.c.
104 2008-01-21 Ulrich Drepper <drepper@redhat.com>
106 * Makefile.am (EXTRA_DIST): Remove defs/x86_64.
108 2008-01-14 Ulrich Drepper <drepper@redhat.com>
110 * defs/i386: Add fixes for opcodes with register number in opcode,
111 64-bit immediate forms, nop with rex.B.
112 * i386_data.h [X86_64] (FCT_imm64$w): New function.
113 (FCT_oreg): New function.
114 (FCT_oreg$w): New function.
115 * i386_disasm.c (i386_disasm): Reinitialize fmt always before
116 starting the loop to process the string. Handle 0x90 special for
118 * i386_parse.y (fillin_arg): Expand synonyms before concatening to
119 form the function name.
121 2008-01-11 Ulrich Drepper <drepper@redhat.com>
123 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg.
124 (i386_disasm): Remove appropriate initializers.
125 Use symcb to lookup symbol strings.
127 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize,
128 symaddr_use, and symaddr fields.
129 (i386_disasm): Remove labelbuf and labelbufsize variables.
130 Add back %e format. Implement %a and %l formats.
132 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip
135 * i386_disasm.c (i386_disasm): Resize output buffer if necessary.
136 Optimize output_data initialization. Free buffers before return.
137 (struct output_data): Remove op1str field. Adjust code.
138 (i386_disasm): Store final NUL btye at end of functions.
140 2008-01-10 Ulrich Drepper <drepper@redhat.com>
142 * i386_data.h (FCT_crdb): New function.
143 (FCT_ccc): Use FCT_crdb.
146 * defs/i386: Fix a few instructions with immediate arguments.
148 * i386_disasm.c: Rewrite interface to callback functions for operands
149 to take a single pointer to a structure.
150 * i386_data.h: Adjust all functions.
152 2008-01-08 Ulrich Drepper <drepper@redhat.com>
154 * Makefile.am: Enable x86-64 again.
155 * defs/i386: Lots of changes for x86-64.
156 * i386_data.h: Add support for use in x86-64 disassembler.
157 * i386_disasm.c: Likewise.
158 * i386_parse.y: Likewise.
159 * defs/x86_64: Removed.
161 2008-01-04 Ulrich Drepper <drepper@redhat.com>
163 * defs/i386: Cleanups, remove masks which are not needed.
164 Add remaining Intel opcodes.
165 * i386_data.h (FCT_imm8): Check for input buffer overrun.
166 * i386_disasm.c (i386_disasm): Likewise.
167 * i386_parse.y: Remove suffixes which are not needed anymore.
169 2008-01-03 Ulrich Drepper <drepper@redhat.com>
171 * defs/i386: Add yet more SSE instructions.
173 2008-01-02 Ulrich Drepper <drepper@redhat.com>
175 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to
176 contain instructions with prefixes.
177 * defs/i386: Use for many SSE operations.
178 * i386_data.h (FCT_mmxreg2): Removed.
180 2008-01-01 Ulrich Drepper <drepper@redhat.com>
182 * defs/i386: More 0f prefix support.
183 * i386_data.h (FCT_mmxreg): Implement.
184 (FCT_mmxreg2): Implement.
186 * i386_disasm.c (i386_disasm): More special instructions.
187 Fix tttn suffix for cmov.
188 * i386_parse.y: Simplify test for mod/r_m mode.
190 2007-12-31 Ulrich Drepper <drepper@redhat.com>
192 * defs/i386: Fix order or arguments for mov of control/debug registers.
193 * i386_data.h (FCT_ccc): Implement
196 2007-12-30 Ulrich Drepper <drepper@redhat.com>
198 * defs/i386: Fix 0f groups 6 and 7.
199 * i386_data.c (FCT_mod$16r_m): Implement.
200 * i386_disasm.c (i386_disasm): Third parameter can also have string.
202 2007-12-29 Ulrich Drepper <drepper@redhat.com>
204 * defs/i386: Add lots of floating point ops.
205 * i386_data.h (FCT_fmod$fr_m): Removed.
206 (FCT_freg): Implement.
207 * i386_disasm.c (i386_disasm): Implement suffix_D.
208 * i386_parse.y: Emit suffix_D.
210 * defs/i386: Use rel instead of dispA.
211 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push,
214 * i386_data.h (FCT_dispA): Removed.
215 (FCT_ds_xx): Add test for end of input buffer.
216 * i386_disasm.c (ABORT_ENTRY): Removed.
217 (i386_disasm): Fix handling of SIB. Pass correct address value to
220 * Makefile.am (*.mnemonics): Filter out INVALID entry.
221 * defs/i386: Define imms8 and use in appropriate places.
222 Add INVALID entries for special opcodes with special mnemonics.
223 Fix int3. Fix typo in shl. Correct xlat.
224 * i386_data.h (FCT_ds_xx): New function.
226 (FCT_ds_bx): New function.
227 (FCT_imms8): New function.
228 * i386_disasm.c (MNE_INVALID): Define.
229 (i386_disasm): Handle invalid opcodes in mnemonics printing, not
230 separately. Fix address value passed to operand handlers.
231 * i386_parse.y (bx_reg): Define.
232 (instrtable_out): Handle INVALID entries differently, just use
233 MNE_INVALID value for .mnemonic.
235 2007-12-28 Ulrich Drepper <drepper@redhat.com>
237 * defs/i386: Fix shift and mov immediate instructions.
238 * i386_data.h (FCT_imm16): Implement.
240 * defs/i386: Use absval instead of abs of lcall and ljmp.
241 Add parameters for cmps. Fix test and mov immediate.
242 * i386_data.h: Implement FCT_absval.
243 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm.
245 * defs/i386: Move entries with 0x9b prefix together.
246 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in
247 input. Handle data16 with suffix_W.
249 * i386_data.h (FCT_*): Add end parameter to all functions. Check
250 before using more bytes.
251 (FCT_sel): Implement.
252 * i386_disasm.c (i386_disasm): Better handle end of input buffer.
255 * Makefile.am: Use m4 to preprocess defs/* files.
256 * defs/i386: Adjust appropriately.
257 * i386_data.c (FCT_ax): Implement.
258 (FCT_ax$w): Use FCT_ax.
259 * i386_disasm.c (ADD_STRING): Use _len instead of len.
260 (i386_disasm): If no instruction can be matched because of lack of
261 input and prefixes have been matched, print prefixes.
262 Recognize abort entries.
263 Handle special cases.
264 * i386_gendis.c: Recognize - input file name.
265 * i386_lex.c: Recognize INVALID token.
266 * i386_parse.y: Handle INVALID token input.
268 * defs/i386: Fix mov, pop.
269 * i386_data.h (FCT_sreg3): Implement.
271 2007-12-27 Ulrich Drepper <drepper@redhat.com>
273 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor.
274 * i386_data.h (FCT_imms): New function.
275 (FCT_imm$s): Use FCT_imms for handling of signed values.
276 (FCT_imm8): Sign extend values.
277 * i386_disasm.c (i386_disasm): Implement suffix_w0.
278 * i386_parse.y: Emit suffix w0.
280 * i386_data.h (FCT_disp8): Add 0x prefix.
281 (FCT_ds_si): Implement.
282 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes.
283 Implement tttn suffix.
284 * i386_parse.y: Emit tttn suffix definition.
286 2007-12-26 Ulrich Drepper <drepper@redhat.com>
288 * i386_data.h (struct instr_enc): Use suffix field.
289 (FCT_dx): Fill in body.
290 (FCT_es_di): Likewise.
291 (FCT_imm$s): Sign-extended byte values.
292 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses.
293 (i386_disasm): Handle suffix.
294 * i386_parse.y: Emit suffix information.
295 * defs/i386: Remove unnecessary suffixes.
297 * Makefile.am: Disable building x86-64 version for now.
299 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor.
300 * i386_data.h: Pass pointer to prefix to functions. If not prefixes
301 are consumed this means invalid input.
302 * i386_disasm.c: Fix prefix printing. Adjust function calls for
304 * i386_parse.y: Recognize moda prefix.
306 2007-12-21 Ulrich Drepper <drepper@redhat.com>
308 * i386_data.h: Fix SIB handling.
309 * i386_disasm.c: Likewise.
311 2007-12-19 Ulrich Drepper <drepper@redhat.com>
313 * defs/i386: Fix up 'and' opcode.
315 2007-10-31 Ulrich Drepper <drepper@redhat.com>
317 * Makefile.am: Add dependencies of the generated files on the source
319 (i386_lex_CFLAGS): Add -Wno-sign-compare.
321 * defs/i386: A lot more data.
322 * defs/x86_64: Likewise.
323 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3
325 (opfct_t): Add parameter for third operand.
327 (data_prefix): New function.
328 (FCT_abs): Implement.
329 (FCT_ax): Renamed to FCT_ax$w amd implement.
330 (FCT_disp8): Implement.
331 (FCT_dispA): Implement.
332 (FCT_imm): Implement.
333 (FCT_imm$w): Implement.
334 (FCT_imm$s): Don't zero-pad numbers.
335 (FCT_imm8): Likewise.
337 (general_mod$r_m): New function.
338 (FCT_mod$r_m): Use it.
339 (FCT_mod$r_m$w): New function.
340 (FCT_mod$8r_m): New function.
341 (FCT_reg): Correctly handle 16-bit registers.
342 (FCT_reg$w): New function.
343 * i386_disasm.c (i386_disasm): Handle prefixes better.
344 Pass third parameter to operand functions.
345 * i386_parse.y (struct instruction): Add off3 field.
346 Handle third operand throughout.
348 2007-02-05 Ulrich Drepper <drepper@redhat.com>
350 * i386_disasm.c: New file.
351 * i386_data.h: New file.
352 * i386_gendis.c: New file.
353 * i386_lex.l: New file.
354 * i386_parse.y: New file.
355 * memory-access.h: New file.
356 * x86_64_disasm.c: New file.
357 * defs/i386: New file.
358 * defs/i386.doc: New file.
359 * defs/x86_64: New file.
361 2005-02-15 Ulrich Drepper <drepper@redhat.com>
363 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
365 2005-02-05 Ulrich Drepper <drepper@redhat.com>
367 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS.
369 2003-08-11 Ulrich Drepper <drepper@redhat.com>
371 * Moved to CVS archive.