12019-12-11 Omar Sandoval <osandov@fb.com> 2 3 * Makefile.am (i386_lex_CFLAGS): Add -Wno-implicit-fallthrough. 4 52019-10-17 Mark Wielaard <mark@klomp.org> 6 7 * i386_data.h (FCT_sel): Check for param_start + 2 >= end instead 8 of just >. 9 * i386_disasm.c (i386_disasm): Check param_start < end. Don't 10 assert, but assign INVALID to str. Make sure we get past any 11 unrecognized opcode. 12 132019-09-07 Mark Wielaard <mark@klomp.org> 14 15 * riscv_disasm.c (riscv_disasm): Use UINT64_C to make calculation 16 unsigned. 17 182019-07-05 Omar Sandoval <osandov@fb.com> 19 20 * Makefile.am: Combine libcpu_{i386,x86_64,bpf}.a into libcpu.a. 21 Make libcpu.a non-PIC by default. 22 Add libcpu_pic.a. 23 242018-11-04 Mark Wielaard <mark@klomp.org> 25 26 * bpf_disasm.c (bpf_disasm): Recognize BPF_JLT, BPF_JLE, BPF_JSLT 27 and BPF_JSLE. 28 292018-02-09 Joshua Watt <JPEWhacker@gmail.com> 30 31 * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of 32 comment. 33 342017-08-18 Ulf Hermann <ulf.hermann@qt.io> 35 36 * memory-access.h: Use attribute_packed. 37 382017-02-27 Ulf Hermann <ulf.hermann@qt.io> 39 40 * Makefile.am: Use fpic_CFLAGS. 41 422017-07-18 Mark Wielaard <mark@klomp.org> 43 44 * Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf. 45 * bpf_disasm.c: Include bpf.h instead of linux/bpf.h. Don't define 46 BPF_PSEUDO_MAP_FD. 47 482017-04-20 Ulf Hermann <ulf.hermann@qt.io> 49 50 * Makefile.am: Add EXEEXT to gendis. 51 522017-04-20 Ulf Hermann <ulf.hermann@qt.io> 53 54 * i386_parse.y: Eliminate comparison_fn_t. 55 562016-11-02 Mark Wielaard <mjw@redhat.com> 57 58 * i386_disasm.c (i386_disasm): Add fallthrough comment. 59 602016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> 61 62 * i386_lex.l: Remove system.h include, add libeu.h include. 63 * i386_parse.y: Remove sys/param.h include, add libeu.h include. 64 * i386_disasm.c: Remove sys/param.h. 65 662016-09-05 Mark Wielaard <mjw@redhat.com> 67 68 * bpf_disasm.c: Define BPF_PSEUDO_MAP_FD if undefined. 69 702016-08-10 Richard Henderson <rth@redhat.com> 71 72 * bpf_disasm.c (bpf_disasm): Rearrange the printing of instructions 73 to use exactly the operands required. 74 752016-06-28 Richard Henderson <rth@redhat.com> 76 77 * Makefile.am (noinst_LIBRARIES): Add libcpu_bpf.a. 78 (libcpu_bpf_a_SOURCES, libcpu_bpf_a_CFLAGS): New. 79 * bpf_disasm.c: New file. 80 * i386_disasm.c (i386_disasm): Add ebl parameter. 81 822015-10-05 Josh Stone <jistone@redhat.com> 83 84 * Makefile.am (%_defs): Add AM_V_GEN and AM_V_at silencers. 85 ($(srcdir)/%_dis.h): Ditto. 86 (%.mnemonics): Add AM_V_GEN silencer. 87 882014-10-29 Jose E. Marchesi <jose.marchesi@oracle.com> 89 90 * Makefile.am (AM_CFLAGS): Use -fPIC instead of -fpic to avoid 91 relocation overflows in some platforms. 92 932014-04-13 Mark Wielaard <mjw@redhat.com> 94 95 * Makefile.am (i386_gendis_LDADD): Remove libmudflap. 96 972013-04-24 Mark Wielaard <mjw@redhat.com> 98 99 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. 100 1012012-10-10 Roland McGrath <roland@hack.frob.com> 102 103 * Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file, 104 mv into place with separate command. 105 1062012-06-26 Roland McGrath <roland@hack.frob.com> 107 108 * Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): New rule. 109 1102012-02-24 Mark Wielaard <mjw@redhat.com> 111 112 * Makefile.am (CLEANFILES): Move %_dis.h to... 113 (MAINTAINERCLEANFILES): here. 114 1152012-01-21 Ulrich Drepper <drepper@gmail.com> 116 117 * i386_disasm.c (ADD_NSTRING): Define. 118 (i386_disasm): Print color codes in the appropriate places. 119 1202011-10-16 Roland McGrath <roland@hack.frob.com> 121 122 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h. 123 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h. 124 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir). 125 (%_dis.h): Renamed target pattern to ... 126 ($(srcdir)/%_dis.h): ... this. 127 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE]. 128 1292010-08-16 Roland McGrath <roland@redhat.com> 130 131 * Makefile.am (%_defs): New pattern rule. 132 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input. 133 (CLEANFILES): Include all those files. 134 1352010-02-15 Roland McGrath <roland@redhat.com> 136 137 * Makefile.am: Use config/eu.am for common stuff. 138 1392009-04-14 Roland McGrath <roland@redhat.com> 140 141 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the 142 default on every machine. 143 1442009-01-23 Roland McGrath <roland@redhat.com> 145 146 * Makefile.am (i386_parse_CFLAGS): Use quotes around command 147 substitution that can produce leading whitespace. 148 1492009-01-01 Ulrich Drepper <drepper@redhat.com> 150 151 * i386_parse.y (instrtable_out): Optimize match_data table by not 152 emitting 0xff masks for leading bytes. 153 * i386_disasm.c (i386_disasm): Adjust reader of match_data. 154 155 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We 156 don't expect snprintf to fail. 157 1582008-12-31 Ulrich Drepper <drepper@redhat.com> 159 160 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw, 161 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm, 162 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw, 163 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd, 164 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq, 165 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd, 166 and roundsd opcodes. 167 168 * i386_disasm.c (i386_disasm): Correct resizing of buffer. 169 170 * i386_parse.y (struct argstring): Add off element. 171 (off_op_str): New global variable. 172 (print_op_str): Print strings as concatenated strings. Keep track 173 of index and length. Update ->off element. 174 (print_op_str_idx): New function. 175 (instrtable_out): Mark op%d_fct as const. 176 Emit two tables for the strings: the string itself (op%d_str) and the 177 index table (op%d_str_idx). 178 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition. 179 180 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when 181 printing only prefix. 182 183 * i386_disasm.c (i386_disasm): Minor optimizations. 184 185 * i386_parse.y (instrtable_out): No need to emit index, the reader can 186 keep track. 187 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no 188 need to skip it. 189 190 * i386_disasm.c (amd3dnow): Mark as const. 191 192 * defs/i386: Add blendvpd and blendvps opcodes. 193 1942008-12-30 Ulrich Drepper <drepper@redhat.com> 195 196 * defs/i386: Add blendpd and blendps opcodes. 197 1982008-12-19 Ulrich Drepper <drepper@redhat.com> 199 200 * defs/i386: Add entry for AMD 3DNOW. 201 * i386_disasm.c: Implement AMD 3DNOW disassembly. 202 2032008-12-17 Ulrich Drepper <drepper@redhat.com> 204 205 * i386_disasm.c (i386_disasm): If instruction matches prefix, 206 undoing the prefix match finishes the instruction. 207 2082008-01-21 Roland McGrath <roland@redhat.com> 209 210 * defs/i386: Fix typo in comment. 211 * i386_disasm.c (i386_disasm): Handle cltq, cqto. 212 213 * i386_parse.y: Add sanity check for NMNES macro value. 214 * Makefile.am (i386_parse.o): Fix target in dependency rule. 215 (i386_parse.h): New target with empty commands. 216 (i386_lex.o): Depend on it in place of i386_parse.c. 217 2182008-01-21 Ulrich Drepper <drepper@redhat.com> 219 220 * Makefile.am (EXTRA_DIST): Remove defs/x86_64. 221 2222008-01-14 Ulrich Drepper <drepper@redhat.com> 223 224 * defs/i386: Add fixes for opcodes with register number in opcode, 225 64-bit immediate forms, nop with rex.B. 226 * i386_data.h [X86_64] (FCT_imm64$w): New function. 227 (FCT_oreg): New function. 228 (FCT_oreg$w): New function. 229 * i386_disasm.c (i386_disasm): Reinitialize fmt always before 230 starting the loop to process the string. Handle 0x90 special for 231 x86-64. 232 * i386_parse.y (fillin_arg): Expand synonyms before concatening to 233 form the function name. 234 2352008-01-11 Ulrich Drepper <drepper@redhat.com> 236 237 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg. 238 (i386_disasm): Remove appropriate initializers. 239 Use symcb to lookup symbol strings. 240 241 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize, 242 symaddr_use, and symaddr fields. 243 (i386_disasm): Remove labelbuf and labelbufsize variables. 244 Add back %e format. Implement %a and %l formats. 245 246 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip 247 base addressing. 248 249 * i386_disasm.c (i386_disasm): Resize output buffer if necessary. 250 Optimize output_data initialization. Free buffers before return. 251 (struct output_data): Remove op1str field. Adjust code. 252 (i386_disasm): Store final NUL btye at end of functions. 253 2542008-01-10 Ulrich Drepper <drepper@redhat.com> 255 256 * i386_data.h (FCT_crdb): New function. 257 (FCT_ccc): Use FCT_crdb. 258 (FCT_ddd): Likewise. 259 260 * defs/i386: Fix a few instructions with immediate arguments. 261 262 * i386_disasm.c: Rewrite interface to callback functions for operands 263 to take a single pointer to a structure. 264 * i386_data.h: Adjust all functions. 265 2662008-01-08 Ulrich Drepper <drepper@redhat.com> 267 268 * Makefile.am: Enable x86-64 again. 269 * defs/i386: Lots of changes for x86-64. 270 * i386_data.h: Add support for use in x86-64 disassembler. 271 * i386_disasm.c: Likewise. 272 * i386_parse.y: Likewise. 273 * defs/x86_64: Removed. 274 2752008-01-04 Ulrich Drepper <drepper@redhat.com> 276 277 * defs/i386: Cleanups, remove masks which are not needed. 278 Add remaining Intel opcodes. 279 * i386_data.h (FCT_imm8): Check for input buffer overrun. 280 * i386_disasm.c (i386_disasm): Likewise. 281 * i386_parse.y: Remove suffixes which are not needed anymore. 282 2832008-01-03 Ulrich Drepper <drepper@redhat.com> 284 285 * defs/i386: Add yet more SSE instructions. 286 2872008-01-02 Ulrich Drepper <drepper@redhat.com> 288 289 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to 290 contain instructions with prefixes. 291 * defs/i386: Use for many SSE operations. 292 * i386_data.h (FCT_mmxreg2): Removed. 293 2942008-01-01 Ulrich Drepper <drepper@redhat.com> 295 296 * defs/i386: More 0f prefix support. 297 * i386_data.h (FCT_mmxreg): Implement. 298 (FCT_mmxreg2): Implement. 299 (FCT_mmreg): Remove. 300 * i386_disasm.c (i386_disasm): More special instructions. 301 Fix tttn suffix for cmov. 302 * i386_parse.y: Simplify test for mod/r_m mode. 303 3042007-12-31 Ulrich Drepper <drepper@redhat.com> 305 306 * defs/i386: Fix order or arguments for mov of control/debug registers. 307 * i386_data.h (FCT_ccc): Implement 308 (FCT_ddd): Implement 309 3102007-12-30 Ulrich Drepper <drepper@redhat.com> 311 312 * defs/i386: Fix 0f groups 6 and 7. 313 * i386_data.c (FCT_mod$16r_m): Implement. 314 * i386_disasm.c (i386_disasm): Third parameter can also have string. 315 3162007-12-29 Ulrich Drepper <drepper@redhat.com> 317 318 * defs/i386: Add lots of floating point ops. 319 * i386_data.h (FCT_fmod$fr_m): Removed. 320 (FCT_freg): Implement. 321 * i386_disasm.c (i386_disasm): Implement suffix_D. 322 * i386_parse.y: Emit suffix_D. 323 324 * defs/i386: Use rel instead of dispA. 325 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push, 326 test. 327 328 * i386_data.h (FCT_dispA): Removed. 329 (FCT_ds_xx): Add test for end of input buffer. 330 * i386_disasm.c (ABORT_ENTRY): Removed. 331 (i386_disasm): Fix handling of SIB. Pass correct address value to 332 operand callbacks. 333 334 * Makefile.am (*.mnemonics): Filter out INVALID entry. 335 * defs/i386: Define imms8 and use in appropriate places. 336 Add INVALID entries for special opcodes with special mnemonics. 337 Fix int3. Fix typo in shl. Correct xlat. 338 * i386_data.h (FCT_ds_xx): New function. 339 (FCT_ds_si): Use it. 340 (FCT_ds_bx): New function. 341 (FCT_imms8): New function. 342 * i386_disasm.c (MNE_INVALID): Define. 343 (i386_disasm): Handle invalid opcodes in mnemonics printing, not 344 separately. Fix address value passed to operand handlers. 345 * i386_parse.y (bx_reg): Define. 346 (instrtable_out): Handle INVALID entries differently, just use 347 MNE_INVALID value for .mnemonic. 348 3492007-12-28 Ulrich Drepper <drepper@redhat.com> 350 351 * defs/i386: Fix shift and mov immediate instructions. 352 * i386_data.h (FCT_imm16): Implement. 353 354 * defs/i386: Use absval instead of abs of lcall and ljmp. 355 Add parameters for cmps. Fix test and mov immediate. 356 * i386_data.h: Implement FCT_absval. 357 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm. 358 359 * defs/i386: Move entries with 0x9b prefix together. 360 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in 361 input. Handle data16 with suffix_W. 362 363 * i386_data.h (FCT_*): Add end parameter to all functions. Check 364 before using more bytes. 365 (FCT_sel): Implement. 366 * i386_disasm.c (i386_disasm): Better handle end of input buffer. 367 Specal opcode 0x99. 368 369 * Makefile.am: Use m4 to preprocess defs/* files. 370 * defs/i386: Adjust appropriately. 371 * i386_data.c (FCT_ax): Implement. 372 (FCT_ax$w): Use FCT_ax. 373 * i386_disasm.c (ADD_STRING): Use _len instead of len. 374 (i386_disasm): If no instruction can be matched because of lack of 375 input and prefixes have been matched, print prefixes. 376 Recognize abort entries. 377 Handle special cases. 378 * i386_gendis.c: Recognize - input file name. 379 * i386_lex.c: Recognize INVALID token. 380 * i386_parse.y: Handle INVALID token input. 381 382 * defs/i386: Fix mov, pop. 383 * i386_data.h (FCT_sreg3): Implement. 384 3852007-12-27 Ulrich Drepper <drepper@redhat.com> 386 387 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor. 388 * i386_data.h (FCT_imms): New function. 389 (FCT_imm$s): Use FCT_imms for handling of signed values. 390 (FCT_imm8): Sign extend values. 391 * i386_disasm.c (i386_disasm): Implement suffix_w0. 392 * i386_parse.y: Emit suffix w0. 393 394 * i386_data.h (FCT_disp8): Add 0x prefix. 395 (FCT_ds_si): Implement. 396 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes. 397 Implement tttn suffix. 398 * i386_parse.y: Emit tttn suffix definition. 399 4002007-12-26 Ulrich Drepper <drepper@redhat.com> 401 402 * i386_data.h (struct instr_enc): Use suffix field. 403 (FCT_dx): Fill in body. 404 (FCT_es_di): Likewise. 405 (FCT_imm$s): Sign-extended byte values. 406 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses. 407 (i386_disasm): Handle suffix. 408 * i386_parse.y: Emit suffix information. 409 * defs/i386: Remove unnecessary suffixes. 410 411 * Makefile.am: Disable building x86-64 version for now. 412 413 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor. 414 * i386_data.h: Pass pointer to prefix to functions. If not prefixes 415 are consumed this means invalid input. 416 * i386_disasm.c: Fix prefix printing. Adjust function calls for 417 parameter change. 418 * i386_parse.y: Recognize moda prefix. 419 4202007-12-21 Ulrich Drepper <drepper@redhat.com> 421 422 * i386_data.h: Fix SIB handling. 423 * i386_disasm.c: Likewise. 424 4252007-12-19 Ulrich Drepper <drepper@redhat.com> 426 427 * defs/i386: Fix up 'and' opcode. 428 4292007-10-31 Ulrich Drepper <drepper@redhat.com> 430 431 * Makefile.am: Add dependencies of the generated files on the source 432 files. 433 (i386_lex_CFLAGS): Add -Wno-sign-compare. 434 435 * defs/i386: A lot more data. 436 * defs/x86_64: Likewise. 437 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3 438 fields. 439 (opfct_t): Add parameter for third operand. 440 (FCT_*): Likewise. 441 (data_prefix): New function. 442 (FCT_abs): Implement. 443 (FCT_ax): Renamed to FCT_ax$w amd implement. 444 (FCT_disp8): Implement. 445 (FCT_dispA): Implement. 446 (FCT_imm): Implement. 447 (FCT_imm$w): Implement. 448 (FCT_imm$s): Don't zero-pad numbers. 449 (FCT_imm8): Likewise. 450 (FCT_rel): Likewise. 451 (general_mod$r_m): New function. 452 (FCT_mod$r_m): Use it. 453 (FCT_mod$r_m$w): New function. 454 (FCT_mod$8r_m): New function. 455 (FCT_reg): Correctly handle 16-bit registers. 456 (FCT_reg$w): New function. 457 * i386_disasm.c (i386_disasm): Handle prefixes better. 458 Pass third parameter to operand functions. 459 * i386_parse.y (struct instruction): Add off3 field. 460 Handle third operand throughout. 461 4622007-02-05 Ulrich Drepper <drepper@redhat.com> 463 464 * i386_disasm.c: New file. 465 * i386_data.h: New file. 466 * i386_gendis.c: New file. 467 * i386_lex.l: New file. 468 * i386_parse.y: New file. 469 * memory-access.h: New file. 470 * x86_64_disasm.c: New file. 471 * defs/i386: New file. 472 * defs/i386.doc: New file. 473 * defs/x86_64: New file. 474 4752005-02-15 Ulrich Drepper <drepper@redhat.com> 476 477 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 478 4792005-02-05 Ulrich Drepper <drepper@redhat.com> 480 481 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS. 482 4832003-08-11 Ulrich Drepper <drepper@redhat.com> 484 485 * Moved to CVS archive. 486