1 2012-01-21 Ulrich Drepper <drepper (a] gmail.com> 2 3 * i386_disasm.c (ADD_NSTRING): Define. 4 (i386_disasm): Print color codes in the appropriate places. 5 6 2011-10-16 Roland McGrath <roland (a] hack.frob.com> 7 8 * Makefile.am (libcpu_i386_a_SOURCES): Add i386_dis.h. 9 (libcpu_x86_64_a_SOURCES): Add x86_64_dis.h. 10 (i386_disasm.o, x86_64_disasm.o): Depend on those in $(srcdir). 11 (%_dis.h): Renamed target pattern to ... 12 ($(srcdir)/%_dis.h): ... this. 13 (noinst_HEADERS, noinst_PROGRAMS): Put under [MAINTAINER_MODE]. 14 15 2010-08-16 Roland McGrath <roland (a] redhat.com> 16 17 * Makefile.am (%_defs): New pattern rule. 18 (%_dis.h, %.mnemonics): Define as pattern rules using %_defs input. 19 (CLEANFILES): Include all those files. 20 21 2010-02-15 Roland McGrath <roland (a] redhat.com> 22 23 * Makefile.am: Use config/eu.am for common stuff. 24 25 2009-04-14 Roland McGrath <roland (a] redhat.com> 26 27 * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the 28 default on every machine. 29 30 2009-01-23 Roland McGrath <roland (a] redhat.com> 31 32 * Makefile.am (i386_parse_CFLAGS): Use quotes around command 33 substitution that can produce leading whitespace. 34 35 2009-01-01 Ulrich Drepper <drepper (a] redhat.com> 36 37 * i386_parse.y (instrtable_out): Optimize match_data table by not 38 emitting 0xff masks for leading bytes. 39 * i386_disasm.c (i386_disasm): Adjust reader of match_data. 40 41 * i386_disasm.c (i386_disasm): Reset bufcnt when not matched. We 42 don't expect snprintf to fail. 43 44 2008-12-31 Ulrich Drepper <drepper (a] redhat.com> 45 46 * defs/i386: Add dppd, dpps, insertps, movntdqa, mpsadbw, packusdw, 47 pblendvb, pblendw, pcmpeqq, pcmpestri, pcmpestrm, pcmpistri, pcmpistrm, 48 pcmpgtq, phminposuw, pinsrb, pinsrd, pmaxsb, pmaxsd, pmaxud, pmaxuw, 49 pminsb, pminsd, pminud, pminuw, pmovsxbw, pmovsxbd, pmovsxbq, pmovsxwd, 50 pmovsxwq, pmovsxdq, pmovzxbw, pmovzxbd, pmovzxbq, pmovzxwd, pmovzxwq, 51 pmovzxdq, pmuldq, pmulld, popcnt, ptest, roundss, roundps, roundpd, 52 and roundsd opcodes. 53 54 * i386_disasm.c (i386_disasm): Correct resizing of buffer. 55 56 * i386_parse.y (struct argstring): Add off element. 57 (off_op_str): New global variable. 58 (print_op_str): Print strings as concatenated strings. Keep track 59 of index and length. Update ->off element. 60 (print_op_str_idx): New function. 61 (instrtable_out): Mark op%d_fct as const. 62 Emit two tables for the strings: the string itself (op%d_str) and the 63 index table (op%d_str_idx). 64 * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition. 65 66 * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when 67 printing only prefix. 68 69 * i386_disasm.c (i386_disasm): Minor optimizations. 70 71 * i386_parse.y (instrtable_out): No need to emit index, the reader can 72 keep track. 73 * i386_disasm.c (i386_disasm): The index is not emitted anymore, no 74 need to skip it. 75 76 * i386_disasm.c (amd3dnow): Mark as const. 77 78 * defs/i386: Add blendvpd and blendvps opcodes. 79 80 2008-12-30 Ulrich Drepper <drepper (a] redhat.com> 81 82 * defs/i386: Add blendpd and blendps opcodes. 83 84 2008-12-19 Ulrich Drepper <drepper (a] redhat.com> 85 86 * defs/i386: Add entry for AMD 3DNOW. 87 * i386_disasm.c: Implement AMD 3DNOW disassembly. 88 89 2008-12-17 Ulrich Drepper <drepper (a] redhat.com> 90 91 * i386_disasm.c (i386_disasm): If instruction matches prefix, 92 undoing the prefix match finishes the instruction. 93 94 2008-01-21 Roland McGrath <roland (a] redhat.com> 95 96 * defs/i386: Fix typo in comment. 97 * i386_disasm.c (i386_disasm): Handle cltq, cqto. 98 99 * i386_parse.y: Add sanity check for NMNES macro value. 100 * Makefile.am (i386_parse.o): Fix target in dependency rule. 101 (i386_parse.h): New target with empty commands. 102 (i386_lex.o): Depend on it in place of i386_parse.c. 103 104 2008-01-21 Ulrich Drepper <drepper (a] redhat.com> 105 106 * Makefile.am (EXTRA_DIST): Remove defs/x86_64. 107 108 2008-01-14 Ulrich Drepper <drepper (a] redhat.com> 109 110 * defs/i386: Add fixes for opcodes with register number in opcode, 111 64-bit immediate forms, nop with rex.B. 112 * i386_data.h [X86_64] (FCT_imm64$w): New function. 113 (FCT_oreg): New function. 114 (FCT_oreg$w): New function. 115 * i386_disasm.c (i386_disasm): Reinitialize fmt always before 116 starting the loop to process the string. Handle 0x90 special for 117 x86-64. 118 * i386_parse.y (fillin_arg): Expand synonyms before concatening to 119 form the function name. 120 121 2008-01-11 Ulrich Drepper <drepper (a] redhat.com> 122 123 * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg. 124 (i386_disasm): Remove appropriate initializers. 125 Use symcb to lookup symbol strings. 126 127 * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize, 128 symaddr_use, and symaddr fields. 129 (i386_disasm): Remove labelbuf and labelbufsize variables. 130 Add back %e format. Implement %a and %l formats. 131 132 * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip 133 base addressing. 134 135 * i386_disasm.c (i386_disasm): Resize output buffer if necessary. 136 Optimize output_data initialization. Free buffers before return. 137 (struct output_data): Remove op1str field. Adjust code. 138 (i386_disasm): Store final NUL btye at end of functions. 139 140 2008-01-10 Ulrich Drepper <drepper (a] redhat.com> 141 142 * i386_data.h (FCT_crdb): New function. 143 (FCT_ccc): Use FCT_crdb. 144 (FCT_ddd): Likewise. 145 146 * defs/i386: Fix a few instructions with immediate arguments. 147 148 * i386_disasm.c: Rewrite interface to callback functions for operands 149 to take a single pointer to a structure. 150 * i386_data.h: Adjust all functions. 151 152 2008-01-08 Ulrich Drepper <drepper (a] redhat.com> 153 154 * Makefile.am: Enable x86-64 again. 155 * defs/i386: Lots of changes for x86-64. 156 * i386_data.h: Add support for use in x86-64 disassembler. 157 * i386_disasm.c: Likewise. 158 * i386_parse.y: Likewise. 159 * defs/x86_64: Removed. 160 161 2008-01-04 Ulrich Drepper <drepper (a] redhat.com> 162 163 * defs/i386: Cleanups, remove masks which are not needed. 164 Add remaining Intel opcodes. 165 * i386_data.h (FCT_imm8): Check for input buffer overrun. 166 * i386_disasm.c (i386_disasm): Likewise. 167 * i386_parse.y: Remove suffixes which are not needed anymore. 168 169 2008-01-03 Ulrich Drepper <drepper (a] redhat.com> 170 171 * defs/i386: Add yet more SSE instructions. 172 173 2008-01-02 Ulrich Drepper <drepper (a] redhat.com> 174 175 * i386_disasm.c (i386_disasm): Extend matcher to allow tables to 176 contain instructions with prefixes. 177 * defs/i386: Use for many SSE operations. 178 * i386_data.h (FCT_mmxreg2): Removed. 179 180 2008-01-01 Ulrich Drepper <drepper (a] redhat.com> 181 182 * defs/i386: More 0f prefix support. 183 * i386_data.h (FCT_mmxreg): Implement. 184 (FCT_mmxreg2): Implement. 185 (FCT_mmreg): Remove. 186 * i386_disasm.c (i386_disasm): More special instructions. 187 Fix tttn suffix for cmov. 188 * i386_parse.y: Simplify test for mod/r_m mode. 189 190 2007-12-31 Ulrich Drepper <drepper (a] redhat.com> 191 192 * defs/i386: Fix order or arguments for mov of control/debug registers. 193 * i386_data.h (FCT_ccc): Implement 194 (FCT_ddd): Implement 195 196 2007-12-30 Ulrich Drepper <drepper (a] redhat.com> 197 198 * defs/i386: Fix 0f groups 6 and 7. 199 * i386_data.c (FCT_mod$16r_m): Implement. 200 * i386_disasm.c (i386_disasm): Third parameter can also have string. 201 202 2007-12-29 Ulrich Drepper <drepper (a] redhat.com> 203 204 * defs/i386: Add lots of floating point ops. 205 * i386_data.h (FCT_fmod$fr_m): Removed. 206 (FCT_freg): Implement. 207 * i386_disasm.c (i386_disasm): Implement suffix_D. 208 * i386_parse.y: Emit suffix_D. 209 210 * defs/i386: Use rel instead of dispA. 211 Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push, 212 test. 213 214 * i386_data.h (FCT_dispA): Removed. 215 (FCT_ds_xx): Add test for end of input buffer. 216 * i386_disasm.c (ABORT_ENTRY): Removed. 217 (i386_disasm): Fix handling of SIB. Pass correct address value to 218 operand callbacks. 219 220 * Makefile.am (*.mnemonics): Filter out INVALID entry. 221 * defs/i386: Define imms8 and use in appropriate places. 222 Add INVALID entries for special opcodes with special mnemonics. 223 Fix int3. Fix typo in shl. Correct xlat. 224 * i386_data.h (FCT_ds_xx): New function. 225 (FCT_ds_si): Use it. 226 (FCT_ds_bx): New function. 227 (FCT_imms8): New function. 228 * i386_disasm.c (MNE_INVALID): Define. 229 (i386_disasm): Handle invalid opcodes in mnemonics printing, not 230 separately. Fix address value passed to operand handlers. 231 * i386_parse.y (bx_reg): Define. 232 (instrtable_out): Handle INVALID entries differently, just use 233 MNE_INVALID value for .mnemonic. 234 235 2007-12-28 Ulrich Drepper <drepper (a] redhat.com> 236 237 * defs/i386: Fix shift and mov immediate instructions. 238 * i386_data.h (FCT_imm16): Implement. 239 240 * defs/i386: Use absval instead of abs of lcall and ljmp. 241 Add parameters for cmps. Fix test and mov immediate. 242 * i386_data.h: Implement FCT_absval. 243 * i386_disasm.c: Handle data16 for suffix_w and FCT_imm. 244 245 * defs/i386: Move entries with 0x9b prefix together. 246 * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in 247 input. Handle data16 with suffix_W. 248 249 * i386_data.h (FCT_*): Add end parameter to all functions. Check 250 before using more bytes. 251 (FCT_sel): Implement. 252 * i386_disasm.c (i386_disasm): Better handle end of input buffer. 253 Specal opcode 0x99. 254 255 * Makefile.am: Use m4 to preprocess defs/* files. 256 * defs/i386: Adjust appropriately. 257 * i386_data.c (FCT_ax): Implement. 258 (FCT_ax$w): Use FCT_ax. 259 * i386_disasm.c (ADD_STRING): Use _len instead of len. 260 (i386_disasm): If no instruction can be matched because of lack of 261 input and prefixes have been matched, print prefixes. 262 Recognize abort entries. 263 Handle special cases. 264 * i386_gendis.c: Recognize - input file name. 265 * i386_lex.c: Recognize INVALID token. 266 * i386_parse.y: Handle INVALID token input. 267 268 * defs/i386: Fix mov, pop. 269 * i386_data.h (FCT_sreg3): Implement. 270 271 2007-12-27 Ulrich Drepper <drepper (a] redhat.com> 272 273 * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor. 274 * i386_data.h (FCT_imms): New function. 275 (FCT_imm$s): Use FCT_imms for handling of signed values. 276 (FCT_imm8): Sign extend values. 277 * i386_disasm.c (i386_disasm): Implement suffix_w0. 278 * i386_parse.y: Emit suffix w0. 279 280 * i386_data.h (FCT_disp8): Add 0x prefix. 281 (FCT_ds_si): Implement. 282 * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes. 283 Implement tttn suffix. 284 * i386_parse.y: Emit tttn suffix definition. 285 286 2007-12-26 Ulrich Drepper <drepper (a] redhat.com> 287 288 * i386_data.h (struct instr_enc): Use suffix field. 289 (FCT_dx): Fill in body. 290 (FCT_es_di): Likewise. 291 (FCT_imm$s): Sign-extended byte values. 292 * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses. 293 (i386_disasm): Handle suffix. 294 * i386_parse.y: Emit suffix information. 295 * defs/i386: Remove unnecessary suffixes. 296 297 * Makefile.am: Disable building x86-64 version for now. 298 299 * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor. 300 * i386_data.h: Pass pointer to prefix to functions. If not prefixes 301 are consumed this means invalid input. 302 * i386_disasm.c: Fix prefix printing. Adjust function calls for 303 parameter change. 304 * i386_parse.y: Recognize moda prefix. 305 306 2007-12-21 Ulrich Drepper <drepper (a] redhat.com> 307 308 * i386_data.h: Fix SIB handling. 309 * i386_disasm.c: Likewise. 310 311 2007-12-19 Ulrich Drepper <drepper (a] redhat.com> 312 313 * defs/i386: Fix up 'and' opcode. 314 315 2007-10-31 Ulrich Drepper <drepper (a] redhat.com> 316 317 * Makefile.am: Add dependencies of the generated files on the source 318 files. 319 (i386_lex_CFLAGS): Add -Wno-sign-compare. 320 321 * defs/i386: A lot more data. 322 * defs/x86_64: Likewise. 323 * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3 324 fields. 325 (opfct_t): Add parameter for third operand. 326 (FCT_*): Likewise. 327 (data_prefix): New function. 328 (FCT_abs): Implement. 329 (FCT_ax): Renamed to FCT_ax$w amd implement. 330 (FCT_disp8): Implement. 331 (FCT_dispA): Implement. 332 (FCT_imm): Implement. 333 (FCT_imm$w): Implement. 334 (FCT_imm$s): Don't zero-pad numbers. 335 (FCT_imm8): Likewise. 336 (FCT_rel): Likewise. 337 (general_mod$r_m): New function. 338 (FCT_mod$r_m): Use it. 339 (FCT_mod$r_m$w): New function. 340 (FCT_mod$8r_m): New function. 341 (FCT_reg): Correctly handle 16-bit registers. 342 (FCT_reg$w): New function. 343 * i386_disasm.c (i386_disasm): Handle prefixes better. 344 Pass third parameter to operand functions. 345 * i386_parse.y (struct instruction): Add off3 field. 346 Handle third operand throughout. 347 348 2007-02-05 Ulrich Drepper <drepper (a] redhat.com> 349 350 * i386_disasm.c: New file. 351 * i386_data.h: New file. 352 * i386_gendis.c: New file. 353 * i386_lex.l: New file. 354 * i386_parse.y: New file. 355 * memory-access.h: New file. 356 * x86_64_disasm.c: New file. 357 * defs/i386: New file. 358 * defs/i386.doc: New file. 359 * defs/x86_64: New file. 360 361 2005-02-15 Ulrich Drepper <drepper (a] redhat.com> 362 363 * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 364 365 2005-02-05 Ulrich Drepper <drepper (a] redhat.com> 366 367 * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS. 368 369 2003-08-11 Ulrich Drepper <drepper (a] redhat.com> 370 371 * Moved to CVS archive. 372