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