12022-12-18 Yonggang Luo <[email protected]> 2 3 * i386_mne.h: New file, extracted from i386_disasm.c. 4 * Makefile.am (noinst_HEADERS): Add i386_mne.h. 5 (i386_parse_CFLAGS): Removed. 6 * i386_disasm.c: Include i386_mne.h. 7 * i386_parse.y: Include i386_mne.h. 8 (instrtable_out): Use MNE_COUNT instead of NMNES. 9 102022-12-18 Yonggang Luo <[email protected]> 11 12 * i386_disasm.c (i386_disasm): Use __asm instead of asm. 13 142022-12-20 Mark Wielaard <[email protected]> 15 16 * bpf_disasm.c: Include common.h and libeblP.h. 17 * i386_disasm.c: Include libeblP.h. 18 * riscv_disasm.c: Likewise. 19 202022-10-21 Yonggang Luo <[email protected]> 21 22 * i386_data.h: Define FCT_mod$64r_m as FCT_mod$r_m for i386. 23 242022-10-21 Yonggang Luo <[email protected]> 25 26 * i386_disasm.c: Don't include endian.h. 27 * memory-access.h: Don't include byteswap.h and endian.h. 28 Do include system.h. 29 302022-09-20 Yonggang Luo <[email protected]> 31 32 * memory-access.h: Use BYTE_ORDER, LITTLE_ENDIAN and BIG_ENDIAN. 33 * riscv_disasm.c: Likewise. 34 352021-12-04 Mark Wielaard <[email protected]> 36 37 * Makefile.am (GENDIS_ENV): New variable, depends on 38 USE_ADDRESS_SANITIZER. 39 402020-12-20 Dmitry V. Levin <[email protected]> 41 42 * .gitignore: New file. 43 442020-12-16 Érico Nogueira <[email protected]> 45 46 * Makefile.am (i386_gendis_LDADD): Add obstack_LIBS. 47 482020-12-16 Dmitry V. Levin <[email protected]> 49 50 * i386_lex.l (invalid_char): Replace gettext(...) with _(...). 51 * i386_parse.y (yyerror): Likewise. 52 532020-12-12 Dmitry V. Levin <[email protected]> 54 55 * bpf_disasm.c (bswap_bpf_insn): Fix spelling typo in comment. 56 * i386_disasm.c (i386_disasm): Likewise. 57 582020-05-09 Mark Wielaard <[email protected]> 59 60 * i386_parse.y (new_bitfield): Call free newp on error. 61 622020-04-16 Mark Wielaard <[email protected]> 63 64 * i386_disasm.c (i386_disasm): Replace assert with goto invalid_op 65 for bad prefix. 66 672019-12-11 Omar Sandoval <[email protected]> 68 69 * Makefile.am (i386_lex_CFLAGS): Add -Wno-implicit-fallthrough. 70 712019-10-17 Mark Wielaard <[email protected]> 72 73 * i386_data.h (FCT_sel): Check for param_start + 2 >= end instead 74 of just >. 75 * i386_disasm.c (i386_disasm): Check param_start < end. Don't 76 assert, but assign INVALID to str. Make sure we get past any 77 unrecognized opcode. 78 792019-09-07 Mark Wielaard <[email protected]> 80 81 * riscv_disasm.c (riscv_disasm): Use UINT64_C to make calculation 82 unsigned. 83 842019-07-05 Omar Sandoval <[email protected]> 85 86 * Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a. 87 Make libcpu.a non-PIC by default. 88 Add libcpu_pic.a. 89 902018-11-04 Mark Wielaard <[email protected]> 91 92 * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT 93 and BPF_JSLE. 94 952018-02-09 Joshua Watt <[email protected]> 96 97 * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of 98 comment. 99 1002017-08-18 Ulf Hermann <[email protected]> 101 102 * memory-access.h: Use attribute_packed. 103 1042017-02-27 Ulf Hermann <[email protected]> 105 106 * Makefile.am: Use fpic_CFLAGS. 107 1082017-07-18 Mark Wielaard <[email protected]> 109 110 * Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf. 111 * bpf_disasm.c: Include bpf.h instead of linux/bpf.h. Don't define 112 BPF_PSEUDO_MAP_FD. 113 1142017-04-20 Ulf Hermann <[email protected]> 115 116 * Makefile.am: Add EXEEXT to gendis. 117 1182017-04-20 Ulf Hermann <[email protected]> 119 120 * i386_parse.y: Eliminate comparison_fn_t. 121 1222016-11-02 Mark Wielaard <[email protected]> 123 124 * i386_disasm.c (i386_disasm): Add fallthrough comment. 125 1262016-10-11 Akihiko Odaki <[email protected]> 127 128 * i386_lex.l: Remove system.h include, add libeu.h include. 129 * i386_parse.y: Remove sys/param.h include, add libeu.h include. 130 * i386_disasm.c: Remove sys/param.h. 131 1322016-09-05 Mark Wielaard <[email protected]> 133 134 * bpf_disasm.c: Define BPF_PSEUDO_MAP_FD if undefined. 135 1362016-08-10 Richard Henderson <[email protected]> 137 138 * bpf_disasm.c (bpf_disasm): Rearrange the printing of instructions 139 to use exactly the operands required. 140 1412016-06-28 Richard Henderson <[email protected]> 142 143 * Makefile.am (noinst_LIBRARIES): Add libcpu_bpf.a. 144 (libcpu_bpf_a_SOURCES, libcpu_bpf_a_CFLAGS): New. 145 * bpf_disasm.c: New file. 146 * i386_disasm.c (i386_disasm): Add ebl parameter. 147 1482015-10-05 Josh Stone <[email protected]> 149 150 * Makefile.am (%_defs): Add AM_V_GEN and AM_V_at silencers. 151 ($(srcdir)/%_dis.h): Ditto. 152 (%.mnemonics): Add AM_V_GEN silencer. 153 1542014-10-29 Jose E. Marchesi <[email protected]> 155 156 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid 157 relocation overflows in some platforms. 158 1592014-04-13 Mark Wielaard <[email protected]> 160 161 * Makefile.am (i386_gendis_LDADD): Remove libmudflap. 162 1632013-04-24 Mark Wielaard <[email protected]> 164 165 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. 166 1672012-10-10 Roland McGrath <[email protected]> 168 169 * Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file, 170 mv into place with separate command. 171 1722012-06-26 Roland McGrath <[email protected]> 173 174 * Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): New rule. 175 1762012-02-24 Mark Wielaard <[email protected]> 177 178 * Makefile.am (CLEANFILES): Move %_dis.h to... 179 (MAINTAINERCLEANFILES): here. 180 1812012-01-21 Ulrich Drepper <[email protected]> 182 183 * i386_disasm.c (ADD_NSTRING): Define. 184 (i386_disasm): Print color codes in the appropriate places. 185 1862011-10-16 Roland McGrath <[email protected]> 187 188 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h. 189 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h. 190 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir). 191 (%_dis.h): Renamed target pattern to ... 192 ($(srcdir)/%_dis.h): ... this. 193 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE]. 194 1952010-08-16 Roland McGrath <[email protected]> 196 197 * Makefile.am (%_defs): New pattern rule. 198 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input. 199 (CLEANFILES): Include all those files. 200 2012010-02-15 Roland McGrath <[email protected]> 202 203 * Makefile.am: Use config/eu.am for common stuff. 204 2052009-04-14 Roland McGrath <[email protected]> 206 207 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the 208 default on every machine. 209 2102009-01-23 Roland McGrath <[email protected]> 211 212 * Makefile.am (i386_parse_CFLAGS): Use quotes around command 213 substitution that can produce leading whitespace. 214 2152009-01-01 Ulrich Drepper <[email protected]> 216 217 * i386_parse.y (instrtable_out): Optimize match_data table by not 218 emitting 0xff masks for leading bytes. 219 * i386_disasm.c (i386_disasm): Adjust reader of match_data. 220 221 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We 222 don't expect snprintf to fail. 223 2242008-12-31 Ulrich Drepper <[email protected]> 225 226 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw, 227 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm, 228 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw, 229 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd, 230 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq, 231 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd, 232 and roundsd opcodes. 233 234 * i386_disasm.c (i386_disasm): Correct resizing of buffer. 235 236 * i386_parse.y (struct argstring): Add off element. 237 (off_op_str): New global variable. 238 (print_op_str): Print strings as concatenated strings. Keep track 239 of index and length. Update ->off element. 240 (print_op_str_idx): New function. 241 (instrtable_out): Mark op%d_fct as const. 242 Emit two tables for the strings: the string itself (op%d_str) and the 243 index table (op%d_str_idx). 244 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition. 245 246 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when 247 printing only prefix. 248 249 * i386_disasm.c (i386_disasm): Minor optimizations. 250 251 * i386_parse.y (instrtable_out): No need to emit index, the reader can 252 keep track. 253 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no 254 need to skip it. 255 256 * i386_disasm.c (amd3dnow): Mark as const. 257 258 * defs/i386: Add blendvpd and blendvps opcodes. 259 2602008-12-30 Ulrich Drepper <[email protected]> 261 262 * defs/i386: Add blendpd and blendps opcodes. 263 2642008-12-19 Ulrich Drepper <[email protected]> 265 266 * defs/i386: Add entry for AMD 3DNOW. 267 * i386_disasm.c: Implement AMD 3DNOW disassembly. 268 2692008-12-17 Ulrich Drepper <[email protected]> 270 271 * i386_disasm.c (i386_disasm): If instruction matches prefix, 272 undoing the prefix match finishes the instruction. 273 2742008-01-21 Roland McGrath <[email protected]> 275 276 * defs/i386: Fix typo in comment. 277 * i386_disasm.c (i386_disasm): Handle cltq, cqto. 278 279 * i386_parse.y: Add sanity check for NMNES macro value. 280 * Makefile.am (i386_parse.o): Fix target in dependency rule. 281 (i386_parse.h): New target with empty commands. 282 (i386_lex.o): Depend on it in place of i386_parse.c. 283 2842008-01-21 Ulrich Drepper <[email protected]> 285 286 * Makefile.am (EXTRA_DIST): Remove defs/x86_64. 287 2882008-01-14 Ulrich Drepper <[email protected]> 289 290 * defs/i386: Add fixes for opcodes with register number in opcode, 291 64-bit immediate forms, nop with rex.B. 292 * i386_data.h [X86_64] (FCT_imm64$w): New function. 293 (FCT_oreg): New function. 294 (FCT_oreg$w): New function. 295 * i386_disasm.c (i386_disasm): Reinitialize fmt always before 296 starting the loop to process the string. Handle 0x90 special for 297 x86-64. 298 * i386_parse.y (fillin_arg): Expand synonyms before concatening to 299 form the function name. 300 3012008-01-11 Ulrich Drepper <[email protected]> 302 303 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg. 304 (i386_disasm): Remove appropriate initializers. 305 Use symcb to lookup symbol strings. 306 307 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize, 308 symaddr_use, and symaddr fields. 309 (i386_disasm): Remove labelbuf and labelbufsize variables. 310 Add back %e format. Implement %a and %l formats. 311 312 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip 313 base addressing. 314 315 * i386_disasm.c (i386_disasm): Resize output buffer if necessary. 316 Optimize output_data initialization. Free buffers before return. 317 (struct output_data): Remove op1str field. Adjust code. 318 (i386_disasm): Store final NUL btye at end of functions. 319 3202008-01-10 Ulrich Drepper <[email protected]> 321 322 * i386_data.h (FCT_crdb): New function. 323 (FCT_ccc): Use FCT_crdb. 324 (FCT_ddd): Likewise. 325 326 * defs/i386: Fix a few instructions with immediate arguments. 327 328 * i386_disasm.c: Rewrite interface to callback functions for operands 329 to take a single pointer to a structure. 330 * i386_data.h: Adjust all functions. 331 3322008-01-08 Ulrich Drepper <[email protected]> 333 334 * Makefile.am: Enable x86-64 again. 335 * defs/i386: Lots of changes for x86-64. 336 * i386_data.h: Add support for use in x86-64 disassembler. 337 * i386_disasm.c: Likewise. 338 * i386_parse.y: Likewise. 339 * defs/x86_64: Removed. 340 3412008-01-04 Ulrich Drepper <[email protected]> 342 343 * defs/i386: Cleanups, remove masks which are not needed. 344 Add remaining Intel opcodes. 345 * i386_data.h (FCT_imm8): Check for input buffer overrun. 346 * i386_disasm.c (i386_disasm): Likewise. 347 * i386_parse.y: Remove suffixes which are not needed anymore. 348 3492008-01-03 Ulrich Drepper <[email protected]> 350 351 * defs/i386: Add yet more SSE instructions. 352 3532008-01-02 Ulrich Drepper <[email protected]> 354 355 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to 356 contain instructions with prefixes. 357 * defs/i386: Use for many SSE operations. 358 * i386_data.h (FCT_mmxreg2): Removed. 359 3602008-01-01 Ulrich Drepper <[email protected]> 361 362 * defs/i386: More 0f prefix support. 363 * i386_data.h (FCT_mmxreg): Implement. 364 (FCT_mmxreg2): Implement. 365 (FCT_mmreg): Remove. 366 * i386_disasm.c (i386_disasm): More special instructions. 367 Fix tttn suffix for cmov. 368 * i386_parse.y: Simplify test for mod/r_m mode. 369 3702007-12-31 Ulrich Drepper <[email protected]> 371 372 * defs/i386: Fix order or arguments for mov of control/debug registers. 373 * i386_data.h (FCT_ccc): Implement 374 (FCT_ddd): Implement 375 3762007-12-30 Ulrich Drepper <[email protected]> 377 378 * defs/i386: Fix 0f groups 6 and 7. 379 * i386_data.c (FCT_mod$16r_m): Implement. 380 * i386_disasm.c (i386_disasm): Third parameter can also have string. 381 3822007-12-29 Ulrich Drepper <[email protected]> 383 384 * defs/i386: Add lots of floating point ops. 385 * i386_data.h (FCT_fmod$fr_m): Removed. 386 (FCT_freg): Implement. 387 * i386_disasm.c (i386_disasm): Implement suffix_D. 388 * i386_parse.y: Emit suffix_D. 389 390 * defs/i386: Use rel instead of dispA. 391 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push, 392 test. 393 394 * i386_data.h (FCT_dispA): Removed. 395 (FCT_ds_xx): Add test for end of input buffer. 396 * i386_disasm.c (ABORT_ENTRY): Removed. 397 (i386_disasm): Fix handling of SIB. Pass correct address value to 398 operand callbacks. 399 400 * Makefile.am (*.mnemonics): Filter out INVALID entry. 401 * defs/i386: Define imms8 and use in appropriate places. 402 Add INVALID entries for special opcodes with special mnemonics. 403 Fix int3. Fix typo in shl. Correct xlat. 404 * i386_data.h (FCT_ds_xx): New function. 405 (FCT_ds_si): Use it. 406 (FCT_ds_bx): New function. 407 (FCT_imms8): New function. 408 * i386_disasm.c (MNE_INVALID): Define. 409 (i386_disasm): Handle invalid opcodes in mnemonics printing, not 410 separately. Fix address value passed to operand handlers. 411 * i386_parse.y (bx_reg): Define. 412 (instrtable_out): Handle INVALID entries differently, just use 413 MNE_INVALID value for .mnemonic. 414 4152007-12-28 Ulrich Drepper <[email protected]> 416 417 * defs/i386: Fix shift and mov immediate instructions. 418 * i386_data.h (FCT_imm16): Implement. 419 420 * defs/i386: Use absval instead of abs of lcall and ljmp. 421 Add parameters for cmps. Fix test and mov immediate. 422 * i386_data.h: Implement FCT_absval. 423 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm. 424 425 * defs/i386: Move entries with 0x9b prefix together. 426 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in 427 input. Handle data16 with suffix_W. 428 429 * i386_data.h (FCT_*): Add end parameter to all functions. Check 430 before using more bytes. 431 (FCT_sel): Implement. 432 * i386_disasm.c (i386_disasm): Better handle end of input buffer. 433 Specal opcode 0x99. 434 435 * Makefile.am: Use m4 to preprocess defs/* files. 436 * defs/i386: Adjust appropriately. 437 * i386_data.c (FCT_ax): Implement. 438 (FCT_ax$w): Use FCT_ax. 439 * i386_disasm.c (ADD_STRING): Use _len instead of len. 440 (i386_disasm): If no instruction can be matched because of lack of 441 input and prefixes have been matched, print prefixes. 442 Recognize abort entries. 443 Handle special cases. 444 * i386_gendis.c: Recognize - input file name. 445 * i386_lex.c: Recognize INVALID token. 446 * i386_parse.y: Handle INVALID token input. 447 448 * defs/i386: Fix mov, pop. 449 * i386_data.h (FCT_sreg3): Implement. 450 4512007-12-27 Ulrich Drepper <[email protected]> 452 453 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor. 454 * i386_data.h (FCT_imms): New function. 455 (FCT_imm$s): Use FCT_imms for handling of signed values. 456 (FCT_imm8): Sign extend values. 457 * i386_disasm.c (i386_disasm): Implement suffix_w0. 458 * i386_parse.y: Emit suffix w0. 459 460 * i386_data.h (FCT_disp8): Add 0x prefix. 461 (FCT_ds_si): Implement. 462 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes. 463 Implement tttn suffix. 464 * i386_parse.y: Emit tttn suffix definition. 465 4662007-12-26 Ulrich Drepper <[email protected]> 467 468 * i386_data.h (struct instr_enc): Use suffix field. 469 (FCT_dx): Fill in body. 470 (FCT_es_di): Likewise. 471 (FCT_imm$s): Sign-extended byte values. 472 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses. 473 (i386_disasm): Handle suffix. 474 * i386_parse.y: Emit suffix information. 475 * defs/i386: Remove unnecessary suffixes. 476 477 * Makefile.am: Disable building x86-64 version for now. 478 479 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor. 480 * i386_data.h: Pass pointer to prefix to functions. If not prefixes 481 are consumed this means invalid input. 482 * i386_disasm.c: Fix prefix printing. Adjust function calls for 483 parameter change. 484 * i386_parse.y: Recognize moda prefix. 485 4862007-12-21 Ulrich Drepper <[email protected]> 487 488 * i386_data.h: Fix SIB handling. 489 * i386_disasm.c: Likewise. 490 4912007-12-19 Ulrich Drepper <[email protected]> 492 493 * defs/i386: Fix up 'and' opcode. 494 4952007-10-31 Ulrich Drepper <[email protected]> 496 497 * Makefile.am: Add dependencies of the generated files on the source 498 files. 499 (i386_lex_CFLAGS): Add -Wno-sign-compare. 500 501 * defs/i386: A lot more data. 502 * defs/x86_64: Likewise. 503 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3 504 fields. 505 (opfct_t): Add parameter for third operand. 506 (FCT_*): Likewise. 507 (data_prefix): New function. 508 (FCT_abs): Implement. 509 (FCT_ax): Renamed to FCT_ax$w amd implement. 510 (FCT_disp8): Implement. 511 (FCT_dispA): Implement. 512 (FCT_imm): Implement. 513 (FCT_imm$w): Implement. 514 (FCT_imm$s): Don't zero-pad numbers. 515 (FCT_imm8): Likewise. 516 (FCT_rel): Likewise. 517 (general_mod$r_m): New function. 518 (FCT_mod$r_m): Use it. 519 (FCT_mod$r_m$w): New function. 520 (FCT_mod$8r_m): New function. 521 (FCT_reg): Correctly handle 16-bit registers. 522 (FCT_reg$w): New function. 523 * i386_disasm.c (i386_disasm): Handle prefixes better. 524 Pass third parameter to operand functions. 525 * i386_parse.y (struct instruction): Add off3 field. 526 Handle third operand throughout. 527 5282007-02-05 Ulrich Drepper <[email protected]> 529 530 * i386_disasm.c: New file. 531 * i386_data.h: New file. 532 * i386_gendis.c: New file. 533 * i386_lex.l: New file. 534 * i386_parse.y: New file. 535 * memory-access.h: New file. 536 * x86_64_disasm.c: New file. 537 * defs/i386: New file. 538 * defs/i386.doc: New file. 539 * defs/x86_64: New file. 540 5412005-02-15 Ulrich Drepper <[email protected]> 542 543 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 544 5452005-02-05 Ulrich Drepper <[email protected]> 546 547 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS. 548 5492003-08-11 Ulrich Drepper <[email protected]> 550 551 * Moved to CVS archive. 552