1 2022-10-21 Yonggang Luo <luoyonggang@gmail.com>
3 * i386_data.h: Define FCT_mod$64r_m as FCT_mod$r_m for i386.
5 2022-10-21 Yonggang Luo <luoyonggang@gmail.com>
7 * i386_disasm.c: Don't include endian.h.
8 * memory-access.h: Don't include byteswap.h and endian.h.
11 2022-09-20 Yonggang Luo <luoyonggang@gmail.com>
13 * memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN.
14 * riscv_disasm.c: Likewise.
16 2021-12-04 Mark Wielaard <mark@klomp.org>
18 * Makefile.am (GENDIS_ENV): New variable, depends on
19 USE_ADDRESS_SANITIZER.
21 2020-12-20 Dmitry V. Levin <ldv@altlinux.org>
23 * .gitignore: New file.
25 2020-12-16 Érico Nogueira <ericonr@disroot.org>
27 * Makefile.am (i386_gendis_LDADD): Add obstack_LIBS.
29 2020-12-16 Dmitry V. Levin <ldv@altlinux.org>
31 * i386_lex.l (invalid_char): Replace gettext(...) with _(...).
32 * i386_parse.y (yyerror): Likewise.
34 2020-12-12 Dmitry V. Levin <ldv@altlinux.org>
36 * bpf_disasm.c (bswap_bpf_insn): Fix spelling typo in comment.
37 * i386_disasm.c (i386_disasm): Likewise.
39 2020-05-09 Mark Wielaard <mark@klomp.org>
41 * i386_parse.y (new_bitfield): Call free newp on error.
43 2020-04-16 Mark Wielaard <mark@klomp.org>
45 * i386_disasm.c (i386_disasm): Replace assert with goto invalid_op
48 2019-12-11 Omar Sandoval <osandov@fb.com>
50 * Makefile.am (i386_lex_CFLAGS): Add -Wno-implicit-fallthrough.
52 2019-10-17 Mark Wielaard <mark@klomp.org>
54 * i386_data.h (FCT_sel): Check for param_start + 2 >= end instead
56 * i386_disasm.c (i386_disasm): Check param_start < end. Don't
57 assert, but assign INVALID to str. Make sure we get past any
60 2019-09-07 Mark Wielaard <mark@klomp.org>
62 * riscv_disasm.c (riscv_disasm): Use UINT64_C to make calculation
65 2019-07-05 Omar Sandoval <osandov@fb.com>
67 * Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a.
68 Make libcpu.a non-PIC by default.
71 2018-11-04 Mark Wielaard <mark@klomp.org>
73 * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT
76 2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
78 * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of
81 2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
83 * memory-access.h: Use attribute_packed.
85 2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
87 * Makefile.am: Use fpic_CFLAGS.
89 2017-07-18 Mark Wielaard <mark@klomp.org>
91 * Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf.
92 * bpf_disasm.c: Include bpf.h instead of linux/bpf.h. Don't define
95 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
97 * Makefile.am: Add EXEEXT to gendis.
99 2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
101 * i386_parse.y: Eliminate comparison_fn_t.
103 2016-11-02 Mark Wielaard <mjw@redhat.com>
105 * i386_disasm.c (i386_disasm): Add fallthrough comment.
107 2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
109 * i386_lex.l: Remove system.h include, add libeu.h include.
110 * i386_parse.y: Remove sys/param.h include, add libeu.h include.
111 * i386_disasm.c: Remove sys/param.h.
113 2016-09-05 Mark Wielaard <mjw@redhat.com>
115 * bpf_disasm.c: Define BPF_PSEUDO_MAP_FD if undefined.
117 2016-08-10 Richard Henderson <rth@redhat.com>
119 * bpf_disasm.c (bpf_disasm): Rearrange the printing of instructions
120 to use exactly the operands required.
122 2016-06-28 Richard Henderson <rth@redhat.com>
124 * Makefile.am (noinst_LIBRARIES): Add libcpu_bpf.a.
125 (libcpu_bpf_a_SOURCES, libcpu_bpf_a_CFLAGS): New.
126 * bpf_disasm.c: New file.
127 * i386_disasm.c (i386_disasm): Add ebl parameter.
129 2015-10-05 Josh Stone <jistone@redhat.com>
131 * Makefile.am (%_defs): Add AM_V_GEN and AM_V_at silencers.
132 ($(srcdir)/%_dis.h): Ditto.
133 (%.mnemonics): Add AM_V_GEN silencer.
135 2014-10-29 Jose E. Marchesi <jose.marchesi@oracle.com>
137 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid
138 relocation overflows in some platforms.
140 2014-04-13 Mark Wielaard <mjw@redhat.com>
142 * Makefile.am (i386_gendis_LDADD): Remove libmudflap.
144 2013-04-24 Mark Wielaard <mjw@redhat.com>
146 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
148 2012-10-10 Roland McGrath <roland@hack.frob.com>
150 * Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file,
151 mv into place with separate command.
153 2012-06-26 Roland McGrath <roland@hack.frob.com>
155 * Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): New rule.
157 2012-02-24 Mark Wielaard <mjw@redhat.com>
159 * Makefile.am (CLEANFILES): Move %_dis.h to...
160 (MAINTAINERCLEANFILES): here.
162 2012-01-21 Ulrich Drepper <drepper@gmail.com>
164 * i386_disasm.c (ADD_NSTRING): Define.
165 (i386_disasm): Print color codes in the appropriate places.
167 2011-10-16 Roland McGrath <roland@hack.frob.com>
169 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h.
170 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h.
171 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir).
172 (%_dis.h): Renamed target pattern to ...
173 ($(srcdir)/%_dis.h): ... this.
174 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE].
176 2010-08-16 Roland McGrath <roland@redhat.com>
178 * Makefile.am (%_defs): New pattern rule.
179 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input.
180 (CLEANFILES): Include all those files.
182 2010-02-15 Roland McGrath <roland@redhat.com>
184 * Makefile.am: Use config/eu.am for common stuff.
186 2009-04-14 Roland McGrath <roland@redhat.com>
188 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the
189 default on every machine.
191 2009-01-23 Roland McGrath <roland@redhat.com>
193 * Makefile.am (i386_parse_CFLAGS): Use quotes around command
194 substitution that can produce leading whitespace.
196 2009-01-01 Ulrich Drepper <drepper@redhat.com>
198 * i386_parse.y (instrtable_out): Optimize match_data table by not
199 emitting 0xff masks for leading bytes.
200 * i386_disasm.c (i386_disasm): Adjust reader of match_data.
202 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We
203 don't expect snprintf to fail.
205 2008-12-31 Ulrich Drepper <drepper@redhat.com>
207 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw,
208 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm,
209 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw,
210 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd,
211 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq,
212 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd,
215 * i386_disasm.c (i386_disasm): Correct resizing of buffer.
217 * i386_parse.y (struct argstring): Add off element.
218 (off_op_str): New global variable.
219 (print_op_str): Print strings as concatenated strings. Keep track
220 of index and length. Update ->off element.
221 (print_op_str_idx): New function.
222 (instrtable_out): Mark op%d_fct as const.
223 Emit two tables for the strings: the string itself (op%d_str) and the
224 index table (op%d_str_idx).
225 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition.
227 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when
228 printing only prefix.
230 * i386_disasm.c (i386_disasm): Minor optimizations.
232 * i386_parse.y (instrtable_out): No need to emit index, the reader can
234 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no
237 * i386_disasm.c (amd3dnow): Mark as const.
239 * defs/i386: Add blendvpd and blendvps opcodes.
241 2008-12-30 Ulrich Drepper <drepper@redhat.com>
243 * defs/i386: Add blendpd and blendps opcodes.
245 2008-12-19 Ulrich Drepper <drepper@redhat.com>
247 * defs/i386: Add entry for AMD 3DNOW.
248 * i386_disasm.c: Implement AMD 3DNOW disassembly.
250 2008-12-17 Ulrich Drepper <drepper@redhat.com>
252 * i386_disasm.c (i386_disasm): If instruction matches prefix,
253 undoing the prefix match finishes the instruction.
255 2008-01-21 Roland McGrath <roland@redhat.com>
257 * defs/i386: Fix typo in comment.
258 * i386_disasm.c (i386_disasm): Handle cltq, cqto.
260 * i386_parse.y: Add sanity check for NMNES macro value.
261 * Makefile.am (i386_parse.o): Fix target in dependency rule.
262 (i386_parse.h): New target with empty commands.
263 (i386_lex.o): Depend on it in place of i386_parse.c.
265 2008-01-21 Ulrich Drepper <drepper@redhat.com>
267 * Makefile.am (EXTRA_DIST): Remove defs/x86_64.
269 2008-01-14 Ulrich Drepper <drepper@redhat.com>
271 * defs/i386: Add fixes for opcodes with register number in opcode,
272 64-bit immediate forms, nop with rex.B.
273 * i386_data.h [X86_64] (FCT_imm64$w): New function.
274 (FCT_oreg): New function.
275 (FCT_oreg$w): New function.
276 * i386_disasm.c (i386_disasm): Reinitialize fmt always before
277 starting the loop to process the string. Handle 0x90 special for
279 * i386_parse.y (fillin_arg): Expand synonyms before concatening to
280 form the function name.
282 2008-01-11 Ulrich Drepper <drepper@redhat.com>
284 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg.
285 (i386_disasm): Remove appropriate initializers.
286 Use symcb to lookup symbol strings.
288 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize,
289 symaddr_use, and symaddr fields.
290 (i386_disasm): Remove labelbuf and labelbufsize variables.
291 Add back %e format. Implement %a and %l formats.
293 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip
296 * i386_disasm.c (i386_disasm): Resize output buffer if necessary.
297 Optimize output_data initialization. Free buffers before return.
298 (struct output_data): Remove op1str field. Adjust code.
299 (i386_disasm): Store final NUL btye at end of functions.
301 2008-01-10 Ulrich Drepper <drepper@redhat.com>
303 * i386_data.h (FCT_crdb): New function.
304 (FCT_ccc): Use FCT_crdb.
307 * defs/i386: Fix a few instructions with immediate arguments.
309 * i386_disasm.c: Rewrite interface to callback functions for operands
310 to take a single pointer to a structure.
311 * i386_data.h: Adjust all functions.
313 2008-01-08 Ulrich Drepper <drepper@redhat.com>
315 * Makefile.am: Enable x86-64 again.
316 * defs/i386: Lots of changes for x86-64.
317 * i386_data.h: Add support for use in x86-64 disassembler.
318 * i386_disasm.c: Likewise.
319 * i386_parse.y: Likewise.
320 * defs/x86_64: Removed.
322 2008-01-04 Ulrich Drepper <drepper@redhat.com>
324 * defs/i386: Cleanups, remove masks which are not needed.
325 Add remaining Intel opcodes.
326 * i386_data.h (FCT_imm8): Check for input buffer overrun.
327 * i386_disasm.c (i386_disasm): Likewise.
328 * i386_parse.y: Remove suffixes which are not needed anymore.
330 2008-01-03 Ulrich Drepper <drepper@redhat.com>
332 * defs/i386: Add yet more SSE instructions.
334 2008-01-02 Ulrich Drepper <drepper@redhat.com>
336 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to
337 contain instructions with prefixes.
338 * defs/i386: Use for many SSE operations.
339 * i386_data.h (FCT_mmxreg2): Removed.
341 2008-01-01 Ulrich Drepper <drepper@redhat.com>
343 * defs/i386: More 0f prefix support.
344 * i386_data.h (FCT_mmxreg): Implement.
345 (FCT_mmxreg2): Implement.
347 * i386_disasm.c (i386_disasm): More special instructions.
348 Fix tttn suffix for cmov.
349 * i386_parse.y: Simplify test for mod/r_m mode.
351 2007-12-31 Ulrich Drepper <drepper@redhat.com>
353 * defs/i386: Fix order or arguments for mov of control/debug registers.
354 * i386_data.h (FCT_ccc): Implement
357 2007-12-30 Ulrich Drepper <drepper@redhat.com>
359 * defs/i386: Fix 0f groups 6 and 7.
360 * i386_data.c (FCT_mod$16r_m): Implement.
361 * i386_disasm.c (i386_disasm): Third parameter can also have string.
363 2007-12-29 Ulrich Drepper <drepper@redhat.com>
365 * defs/i386: Add lots of floating point ops.
366 * i386_data.h (FCT_fmod$fr_m): Removed.
367 (FCT_freg): Implement.
368 * i386_disasm.c (i386_disasm): Implement suffix_D.
369 * i386_parse.y: Emit suffix_D.
371 * defs/i386: Use rel instead of dispA.
372 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push,
375 * i386_data.h (FCT_dispA): Removed.
376 (FCT_ds_xx): Add test for end of input buffer.
377 * i386_disasm.c (ABORT_ENTRY): Removed.
378 (i386_disasm): Fix handling of SIB. Pass correct address value to
381 * Makefile.am (*.mnemonics): Filter out INVALID entry.
382 * defs/i386: Define imms8 and use in appropriate places.
383 Add INVALID entries for special opcodes with special mnemonics.
384 Fix int3. Fix typo in shl. Correct xlat.
385 * i386_data.h (FCT_ds_xx): New function.
387 (FCT_ds_bx): New function.
388 (FCT_imms8): New function.
389 * i386_disasm.c (MNE_INVALID): Define.
390 (i386_disasm): Handle invalid opcodes in mnemonics printing, not
391 separately. Fix address value passed to operand handlers.
392 * i386_parse.y (bx_reg): Define.
393 (instrtable_out): Handle INVALID entries differently, just use
394 MNE_INVALID value for .mnemonic.
396 2007-12-28 Ulrich Drepper <drepper@redhat.com>
398 * defs/i386: Fix shift and mov immediate instructions.
399 * i386_data.h (FCT_imm16): Implement.
401 * defs/i386: Use absval instead of abs of lcall and ljmp.
402 Add parameters for cmps. Fix test and mov immediate.
403 * i386_data.h: Implement FCT_absval.
404 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm.
406 * defs/i386: Move entries with 0x9b prefix together.
407 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in
408 input. Handle data16 with suffix_W.
410 * i386_data.h (FCT_*): Add end parameter to all functions. Check
411 before using more bytes.
412 (FCT_sel): Implement.
413 * i386_disasm.c (i386_disasm): Better handle end of input buffer.
416 * Makefile.am: Use m4 to preprocess defs/* files.
417 * defs/i386: Adjust appropriately.
418 * i386_data.c (FCT_ax): Implement.
419 (FCT_ax$w): Use FCT_ax.
420 * i386_disasm.c (ADD_STRING): Use _len instead of len.
421 (i386_disasm): If no instruction can be matched because of lack of
422 input and prefixes have been matched, print prefixes.
423 Recognize abort entries.
424 Handle special cases.
425 * i386_gendis.c: Recognize - input file name.
426 * i386_lex.c: Recognize INVALID token.
427 * i386_parse.y: Handle INVALID token input.
429 * defs/i386: Fix mov, pop.
430 * i386_data.h (FCT_sreg3): Implement.
432 2007-12-27 Ulrich Drepper <drepper@redhat.com>
434 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor.
435 * i386_data.h (FCT_imms): New function.
436 (FCT_imm$s): Use FCT_imms for handling of signed values.
437 (FCT_imm8): Sign extend values.
438 * i386_disasm.c (i386_disasm): Implement suffix_w0.
439 * i386_parse.y: Emit suffix w0.
441 * i386_data.h (FCT_disp8): Add 0x prefix.
442 (FCT_ds_si): Implement.
443 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes.
444 Implement tttn suffix.
445 * i386_parse.y: Emit tttn suffix definition.
447 2007-12-26 Ulrich Drepper <drepper@redhat.com>
449 * i386_data.h (struct instr_enc): Use suffix field.
450 (FCT_dx): Fill in body.
451 (FCT_es_di): Likewise.
452 (FCT_imm$s): Sign-extended byte values.
453 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses.
454 (i386_disasm): Handle suffix.
455 * i386_parse.y: Emit suffix information.
456 * defs/i386: Remove unnecessary suffixes.
458 * Makefile.am: Disable building x86-64 version for now.
460 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor.
461 * i386_data.h: Pass pointer to prefix to functions. If not prefixes
462 are consumed this means invalid input.
463 * i386_disasm.c: Fix prefix printing. Adjust function calls for
465 * i386_parse.y: Recognize moda prefix.
467 2007-12-21 Ulrich Drepper <drepper@redhat.com>
469 * i386_data.h: Fix SIB handling.
470 * i386_disasm.c: Likewise.
472 2007-12-19 Ulrich Drepper <drepper@redhat.com>
474 * defs/i386: Fix up 'and' opcode.
476 2007-10-31 Ulrich Drepper <drepper@redhat.com>
478 * Makefile.am: Add dependencies of the generated files on the source
480 (i386_lex_CFLAGS): Add -Wno-sign-compare.
482 * defs/i386: A lot more data.
483 * defs/x86_64: Likewise.
484 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3
486 (opfct_t): Add parameter for third operand.
488 (data_prefix): New function.
489 (FCT_abs): Implement.
490 (FCT_ax): Renamed to FCT_ax$w amd implement.
491 (FCT_disp8): Implement.
492 (FCT_dispA): Implement.
493 (FCT_imm): Implement.
494 (FCT_imm$w): Implement.
495 (FCT_imm$s): Don't zero-pad numbers.
496 (FCT_imm8): Likewise.
498 (general_mod$r_m): New function.
499 (FCT_mod$r_m): Use it.
500 (FCT_mod$r_m$w): New function.
501 (FCT_mod$8r_m): New function.
502 (FCT_reg): Correctly handle 16-bit registers.
503 (FCT_reg$w): New function.
504 * i386_disasm.c (i386_disasm): Handle prefixes better.
505 Pass third parameter to operand functions.
506 * i386_parse.y (struct instruction): Add off3 field.
507 Handle third operand throughout.
509 2007-02-05 Ulrich Drepper <drepper@redhat.com>
511 * i386_disasm.c: New file.
512 * i386_data.h: New file.
513 * i386_gendis.c: New file.
514 * i386_lex.l: New file.
515 * i386_parse.y: New file.
516 * memory-access.h: New file.
517 * x86_64_disasm.c: New file.
518 * defs/i386: New file.
519 * defs/i386.doc: New file.
520 * defs/x86_64: New file.
522 2005-02-15 Ulrich Drepper <drepper@redhat.com>
524 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
526 2005-02-05 Ulrich Drepper <drepper@redhat.com>
528 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS.
530 2003-08-11 Ulrich Drepper <drepper@redhat.com>
532 * Moved to CVS archive.