12022-10-21 Yonggang Luo <luoyonggang@gmail.com> 2 3 * i386_disasm.c: Don't include endian.h. 4 * memory-access.h: Don't include byteswap.h and endian.h. 5 Do include system.h. 6 72022-09-20 Yonggang Luo <luoyonggang@gmail.com> 8 9 * memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN. 10 * riscv_disasm.c: Likewise. 11 122021-12-04 Mark Wielaard <mark@klomp.org> 13 14 * Makefile.am (GENDIS_ENV): New variable, depends on 15 USE_ADDRESS_SANITIZER. 16 172020-12-20 Dmitry V. Levin <ldv@altlinux.org> 18 19 * .gitignore: New file. 20 212020-12-16 Érico Nogueira <ericonr@disroot.org> 22 23 * Makefile.am (i386_gendis_LDADD): Add obstack_LIBS. 24 252020-12-16 Dmitry V. Levin <ldv@altlinux.org> 26 27 * i386_lex.l (invalid_char): Replace gettext(...) with _(...). 28 * i386_parse.y (yyerror): Likewise. 29 302020-12-12 Dmitry V. Levin <ldv@altlinux.org> 31 32 * bpf_disasm.c (bswap_bpf_insn): Fix spelling typo in comment. 33 * i386_disasm.c (i386_disasm): Likewise. 34 352020-05-09 Mark Wielaard <mark@klomp.org> 36 37 * i386_parse.y (new_bitfield): Call free newp on error. 38 392020-04-16 Mark Wielaard <mark@klomp.org> 40 41 * i386_disasm.c (i386_disasm): Replace assert with goto invalid_op 42 for bad prefix. 43 442019-12-11 Omar Sandoval <osandov@fb.com> 45 46 * Makefile.am (i386_lex_CFLAGS): Add -Wno-implicit-fallthrough. 47 482019-10-17 Mark Wielaard <mark@klomp.org> 49 50 * i386_data.h (FCT_sel): Check for param_start + 2 >= end instead 51 of just >. 52 * i386_disasm.c (i386_disasm): Check param_start < end. Don't 53 assert, but assign INVALID to str. Make sure we get past any 54 unrecognized opcode. 55 562019-09-07 Mark Wielaard <mark@klomp.org> 57 58 * riscv_disasm.c (riscv_disasm): Use UINT64_C to make calculation 59 unsigned. 60 612019-07-05 Omar Sandoval <osandov@fb.com> 62 63 * Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a. 64 Make libcpu.a non-PIC by default. 65 Add libcpu_pic.a. 66 672018-11-04 Mark Wielaard <mark@klomp.org> 68 69 * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT 70 and BPF_JSLE. 71 722018-02-09 Joshua Watt <JPEWhacker@gmail.com> 73 74 * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of 75 comment. 76 772017-08-18 Ulf Hermann <ulf.hermann@qt.io> 78 79 * memory-access.h: Use attribute_packed. 80 812017-02-27 Ulf Hermann <ulf.hermann@qt.io> 82 83 * Makefile.am: Use fpic_CFLAGS. 84 852017-07-18 Mark Wielaard <mark@klomp.org> 86 87 * Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf. 88 * bpf_disasm.c: Include bpf.h instead of linux/bpf.h. Don't define 89 BPF_PSEUDO_MAP_FD. 90 912017-04-20 Ulf Hermann <ulf.hermann@qt.io> 92 93 * Makefile.am: Add EXEEXT to gendis. 94 952017-04-20 Ulf Hermann <ulf.hermann@qt.io> 96 97 * i386_parse.y: Eliminate comparison_fn_t. 98 992016-11-02 Mark Wielaard <mjw@redhat.com> 100 101 * i386_disasm.c (i386_disasm): Add fallthrough comment. 102 1032016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> 104 105 * i386_lex.l: Remove system.h include, add libeu.h include. 106 * i386_parse.y: Remove sys/param.h include, add libeu.h include. 107 * i386_disasm.c: Remove sys/param.h. 108 1092016-09-05 Mark Wielaard <mjw@redhat.com> 110 111 * bpf_disasm.c: Define BPF_PSEUDO_MAP_FD if undefined. 112 1132016-08-10 Richard Henderson <rth@redhat.com> 114 115 * bpf_disasm.c (bpf_disasm): Rearrange the printing of instructions 116 to use exactly the operands required. 117 1182016-06-28 Richard Henderson <rth@redhat.com> 119 120 * Makefile.am (noinst_LIBRARIES): Add libcpu_bpf.a. 121 (libcpu_bpf_a_SOURCES, libcpu_bpf_a_CFLAGS): New. 122 * bpf_disasm.c: New file. 123 * i386_disasm.c (i386_disasm): Add ebl parameter. 124 1252015-10-05 Josh Stone <jistone@redhat.com> 126 127 * Makefile.am (%_defs): Add AM_V_GEN and AM_V_at silencers. 128 ($(srcdir)/%_dis.h): Ditto. 129 (%.mnemonics): Add AM_V_GEN silencer. 130 1312014-10-29 Jose E. Marchesi <jose.marchesi@oracle.com> 132 133 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid 134 relocation overflows in some platforms. 135 1362014-04-13 Mark Wielaard <mjw@redhat.com> 137 138 * Makefile.am (i386_gendis_LDADD): Remove libmudflap. 139 1402013-04-24 Mark Wielaard <mjw@redhat.com> 141 142 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. 143 1442012-10-10 Roland McGrath <roland@hack.frob.com> 145 146 * Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file, 147 mv into place with separate command. 148 1492012-06-26 Roland McGrath <roland@hack.frob.com> 150 151 * Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): New rule. 152 1532012-02-24 Mark Wielaard <mjw@redhat.com> 154 155 * Makefile.am (CLEANFILES): Move %_dis.h to... 156 (MAINTAINERCLEANFILES): here. 157 1582012-01-21 Ulrich Drepper <drepper@gmail.com> 159 160 * i386_disasm.c (ADD_NSTRING): Define. 161 (i386_disasm): Print color codes in the appropriate places. 162 1632011-10-16 Roland McGrath <roland@hack.frob.com> 164 165 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h. 166 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h. 167 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir). 168 (%_dis.h): Renamed target pattern to ... 169 ($(srcdir)/%_dis.h): ... this. 170 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE]. 171 1722010-08-16 Roland McGrath <roland@redhat.com> 173 174 * Makefile.am (%_defs): New pattern rule. 175 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input. 176 (CLEANFILES): Include all those files. 177 1782010-02-15 Roland McGrath <roland@redhat.com> 179 180 * Makefile.am: Use config/eu.am for common stuff. 181 1822009-04-14 Roland McGrath <roland@redhat.com> 183 184 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the 185 default on every machine. 186 1872009-01-23 Roland McGrath <roland@redhat.com> 188 189 * Makefile.am (i386_parse_CFLAGS): Use quotes around command 190 substitution that can produce leading whitespace. 191 1922009-01-01 Ulrich Drepper <drepper@redhat.com> 193 194 * i386_parse.y (instrtable_out): Optimize match_data table by not 195 emitting 0xff masks for leading bytes. 196 * i386_disasm.c (i386_disasm): Adjust reader of match_data. 197 198 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We 199 don't expect snprintf to fail. 200 2012008-12-31 Ulrich Drepper <drepper@redhat.com> 202 203 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw, 204 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm, 205 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw, 206 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd, 207 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq, 208 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd, 209 and roundsd opcodes. 210 211 * i386_disasm.c (i386_disasm): Correct resizing of buffer. 212 213 * i386_parse.y (struct argstring): Add off element. 214 (off_op_str): New global variable. 215 (print_op_str): Print strings as concatenated strings. Keep track 216 of index and length. Update ->off element. 217 (print_op_str_idx): New function. 218 (instrtable_out): Mark op%d_fct as const. 219 Emit two tables for the strings: the string itself (op%d_str) and the 220 index table (op%d_str_idx). 221 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition. 222 223 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when 224 printing only prefix. 225 226 * i386_disasm.c (i386_disasm): Minor optimizations. 227 228 * i386_parse.y (instrtable_out): No need to emit index, the reader can 229 keep track. 230 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no 231 need to skip it. 232 233 * i386_disasm.c (amd3dnow): Mark as const. 234 235 * defs/i386: Add blendvpd and blendvps opcodes. 236 2372008-12-30 Ulrich Drepper <drepper@redhat.com> 238 239 * defs/i386: Add blendpd and blendps opcodes. 240 2412008-12-19 Ulrich Drepper <drepper@redhat.com> 242 243 * defs/i386: Add entry for AMD 3DNOW. 244 * i386_disasm.c: Implement AMD 3DNOW disassembly. 245 2462008-12-17 Ulrich Drepper <drepper@redhat.com> 247 248 * i386_disasm.c (i386_disasm): If instruction matches prefix, 249 undoing the prefix match finishes the instruction. 250 2512008-01-21 Roland McGrath <roland@redhat.com> 252 253 * defs/i386: Fix typo in comment. 254 * i386_disasm.c (i386_disasm): Handle cltq, cqto. 255 256 * i386_parse.y: Add sanity check for NMNES macro value. 257 * Makefile.am (i386_parse.o): Fix target in dependency rule. 258 (i386_parse.h): New target with empty commands. 259 (i386_lex.o): Depend on it in place of i386_parse.c. 260 2612008-01-21 Ulrich Drepper <drepper@redhat.com> 262 263 * Makefile.am (EXTRA_DIST): Remove defs/x86_64. 264 2652008-01-14 Ulrich Drepper <drepper@redhat.com> 266 267 * defs/i386: Add fixes for opcodes with register number in opcode, 268 64-bit immediate forms, nop with rex.B. 269 * i386_data.h [X86_64] (FCT_imm64$w): New function. 270 (FCT_oreg): New function. 271 (FCT_oreg$w): New function. 272 * i386_disasm.c (i386_disasm): Reinitialize fmt always before 273 starting the loop to process the string. Handle 0x90 special for 274 x86-64. 275 * i386_parse.y (fillin_arg): Expand synonyms before concatening to 276 form the function name. 277 2782008-01-11 Ulrich Drepper <drepper@redhat.com> 279 280 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg. 281 (i386_disasm): Remove appropriate initializers. 282 Use symcb to lookup symbol strings. 283 284 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize, 285 symaddr_use, and symaddr fields. 286 (i386_disasm): Remove labelbuf and labelbufsize variables. 287 Add back %e format. Implement %a and %l formats. 288 289 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip 290 base addressing. 291 292 * i386_disasm.c (i386_disasm): Resize output buffer if necessary. 293 Optimize output_data initialization. Free buffers before return. 294 (struct output_data): Remove op1str field. Adjust code. 295 (i386_disasm): Store final NUL btye at end of functions. 296 2972008-01-10 Ulrich Drepper <drepper@redhat.com> 298 299 * i386_data.h (FCT_crdb): New function. 300 (FCT_ccc): Use FCT_crdb. 301 (FCT_ddd): Likewise. 302 303 * defs/i386: Fix a few instructions with immediate arguments. 304 305 * i386_disasm.c: Rewrite interface to callback functions for operands 306 to take a single pointer to a structure. 307 * i386_data.h: Adjust all functions. 308 3092008-01-08 Ulrich Drepper <drepper@redhat.com> 310 311 * Makefile.am: Enable x86-64 again. 312 * defs/i386: Lots of changes for x86-64. 313 * i386_data.h: Add support for use in x86-64 disassembler. 314 * i386_disasm.c: Likewise. 315 * i386_parse.y: Likewise. 316 * defs/x86_64: Removed. 317 3182008-01-04 Ulrich Drepper <drepper@redhat.com> 319 320 * defs/i386: Cleanups, remove masks which are not needed. 321 Add remaining Intel opcodes. 322 * i386_data.h (FCT_imm8): Check for input buffer overrun. 323 * i386_disasm.c (i386_disasm): Likewise. 324 * i386_parse.y: Remove suffixes which are not needed anymore. 325 3262008-01-03 Ulrich Drepper <drepper@redhat.com> 327 328 * defs/i386: Add yet more SSE instructions. 329 3302008-01-02 Ulrich Drepper <drepper@redhat.com> 331 332 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to 333 contain instructions with prefixes. 334 * defs/i386: Use for many SSE operations. 335 * i386_data.h (FCT_mmxreg2): Removed. 336 3372008-01-01 Ulrich Drepper <drepper@redhat.com> 338 339 * defs/i386: More 0f prefix support. 340 * i386_data.h (FCT_mmxreg): Implement. 341 (FCT_mmxreg2): Implement. 342 (FCT_mmreg): Remove. 343 * i386_disasm.c (i386_disasm): More special instructions. 344 Fix tttn suffix for cmov. 345 * i386_parse.y: Simplify test for mod/r_m mode. 346 3472007-12-31 Ulrich Drepper <drepper@redhat.com> 348 349 * defs/i386: Fix order or arguments for mov of control/debug registers. 350 * i386_data.h (FCT_ccc): Implement 351 (FCT_ddd): Implement 352 3532007-12-30 Ulrich Drepper <drepper@redhat.com> 354 355 * defs/i386: Fix 0f groups 6 and 7. 356 * i386_data.c (FCT_mod$16r_m): Implement. 357 * i386_disasm.c (i386_disasm): Third parameter can also have string. 358 3592007-12-29 Ulrich Drepper <drepper@redhat.com> 360 361 * defs/i386: Add lots of floating point ops. 362 * i386_data.h (FCT_fmod$fr_m): Removed. 363 (FCT_freg): Implement. 364 * i386_disasm.c (i386_disasm): Implement suffix_D. 365 * i386_parse.y: Emit suffix_D. 366 367 * defs/i386: Use rel instead of dispA. 368 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push, 369 test. 370 371 * i386_data.h (FCT_dispA): Removed. 372 (FCT_ds_xx): Add test for end of input buffer. 373 * i386_disasm.c (ABORT_ENTRY): Removed. 374 (i386_disasm): Fix handling of SIB. Pass correct address value to 375 operand callbacks. 376 377 * Makefile.am (*.mnemonics): Filter out INVALID entry. 378 * defs/i386: Define imms8 and use in appropriate places. 379 Add INVALID entries for special opcodes with special mnemonics. 380 Fix int3. Fix typo in shl. Correct xlat. 381 * i386_data.h (FCT_ds_xx): New function. 382 (FCT_ds_si): Use it. 383 (FCT_ds_bx): New function. 384 (FCT_imms8): New function. 385 * i386_disasm.c (MNE_INVALID): Define. 386 (i386_disasm): Handle invalid opcodes in mnemonics printing, not 387 separately. Fix address value passed to operand handlers. 388 * i386_parse.y (bx_reg): Define. 389 (instrtable_out): Handle INVALID entries differently, just use 390 MNE_INVALID value for .mnemonic. 391 3922007-12-28 Ulrich Drepper <drepper@redhat.com> 393 394 * defs/i386: Fix shift and mov immediate instructions. 395 * i386_data.h (FCT_imm16): Implement. 396 397 * defs/i386: Use absval instead of abs of lcall and ljmp. 398 Add parameters for cmps. Fix test and mov immediate. 399 * i386_data.h: Implement FCT_absval. 400 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm. 401 402 * defs/i386: Move entries with 0x9b prefix together. 403 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in 404 input. Handle data16 with suffix_W. 405 406 * i386_data.h (FCT_*): Add end parameter to all functions. Check 407 before using more bytes. 408 (FCT_sel): Implement. 409 * i386_disasm.c (i386_disasm): Better handle end of input buffer. 410 Specal opcode 0x99. 411 412 * Makefile.am: Use m4 to preprocess defs/* files. 413 * defs/i386: Adjust appropriately. 414 * i386_data.c (FCT_ax): Implement. 415 (FCT_ax$w): Use FCT_ax. 416 * i386_disasm.c (ADD_STRING): Use _len instead of len. 417 (i386_disasm): If no instruction can be matched because of lack of 418 input and prefixes have been matched, print prefixes. 419 Recognize abort entries. 420 Handle special cases. 421 * i386_gendis.c: Recognize - input file name. 422 * i386_lex.c: Recognize INVALID token. 423 * i386_parse.y: Handle INVALID token input. 424 425 * defs/i386: Fix mov, pop. 426 * i386_data.h (FCT_sreg3): Implement. 427 4282007-12-27 Ulrich Drepper <drepper@redhat.com> 429 430 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor. 431 * i386_data.h (FCT_imms): New function. 432 (FCT_imm$s): Use FCT_imms for handling of signed values. 433 (FCT_imm8): Sign extend values. 434 * i386_disasm.c (i386_disasm): Implement suffix_w0. 435 * i386_parse.y: Emit suffix w0. 436 437 * i386_data.h (FCT_disp8): Add 0x prefix. 438 (FCT_ds_si): Implement. 439 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes. 440 Implement tttn suffix. 441 * i386_parse.y: Emit tttn suffix definition. 442 4432007-12-26 Ulrich Drepper <drepper@redhat.com> 444 445 * i386_data.h (struct instr_enc): Use suffix field. 446 (FCT_dx): Fill in body. 447 (FCT_es_di): Likewise. 448 (FCT_imm$s): Sign-extended byte values. 449 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses. 450 (i386_disasm): Handle suffix. 451 * i386_parse.y: Emit suffix information. 452 * defs/i386: Remove unnecessary suffixes. 453 454 * Makefile.am: Disable building x86-64 version for now. 455 456 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor. 457 * i386_data.h: Pass pointer to prefix to functions. If not prefixes 458 are consumed this means invalid input. 459 * i386_disasm.c: Fix prefix printing. Adjust function calls for 460 parameter change. 461 * i386_parse.y: Recognize moda prefix. 462 4632007-12-21 Ulrich Drepper <drepper@redhat.com> 464 465 * i386_data.h: Fix SIB handling. 466 * i386_disasm.c: Likewise. 467 4682007-12-19 Ulrich Drepper <drepper@redhat.com> 469 470 * defs/i386: Fix up 'and' opcode. 471 4722007-10-31 Ulrich Drepper <drepper@redhat.com> 473 474 * Makefile.am: Add dependencies of the generated files on the source 475 files. 476 (i386_lex_CFLAGS): Add -Wno-sign-compare. 477 478 * defs/i386: A lot more data. 479 * defs/x86_64: Likewise. 480 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3 481 fields. 482 (opfct_t): Add parameter for third operand. 483 (FCT_*): Likewise. 484 (data_prefix): New function. 485 (FCT_abs): Implement. 486 (FCT_ax): Renamed to FCT_ax$w amd implement. 487 (FCT_disp8): Implement. 488 (FCT_dispA): Implement. 489 (FCT_imm): Implement. 490 (FCT_imm$w): Implement. 491 (FCT_imm$s): Don't zero-pad numbers. 492 (FCT_imm8): Likewise. 493 (FCT_rel): Likewise. 494 (general_mod$r_m): New function. 495 (FCT_mod$r_m): Use it. 496 (FCT_mod$r_m$w): New function. 497 (FCT_mod$8r_m): New function. 498 (FCT_reg): Correctly handle 16-bit registers. 499 (FCT_reg$w): New function. 500 * i386_disasm.c (i386_disasm): Handle prefixes better. 501 Pass third parameter to operand functions. 502 * i386_parse.y (struct instruction): Add off3 field. 503 Handle third operand throughout. 504 5052007-02-05 Ulrich Drepper <drepper@redhat.com> 506 507 * i386_disasm.c: New file. 508 * i386_data.h: New file. 509 * i386_gendis.c: New file. 510 * i386_lex.l: New file. 511 * i386_parse.y: New file. 512 * memory-access.h: New file. 513 * x86_64_disasm.c: New file. 514 * defs/i386: New file. 515 * defs/i386.doc: New file. 516 * defs/x86_64: New file. 517 5182005-02-15 Ulrich Drepper <drepper@redhat.com> 519 520 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 521 5222005-02-05 Ulrich Drepper <drepper@redhat.com> 523 524 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS. 525 5262003-08-11 Ulrich Drepper <drepper@redhat.com> 527 528 * Moved to CVS archive. 529