2008-12-31 Ulrich Drepper <drepper@redhat.com> * i386_disasm.c (i386_disasm): Correct resizing of buffer. * i386_parse.y (struct argstring): Add off element. (off_op_str): New global variable. (print_op_str): Print strings as concatenated strings. Keep track of index and length. Update ->off element. (print_op_str_idx): New function. (instrtable_out): Mark op%d_fct as const. Emit two tables for the strings: the string itself (op%d_str) and the index table (op%d_str_idx). * i386_disasm.c (i386_disasm): Adjust for new op%d_str definition. * i386_disasm.c [X86_64] (i386_disasm): Handle rex prefix when printing only prefix. * i386_disasm.c (i386_disasm): Minor optimizations. * i386_parse.y (instrtable_out): No need to emit index, the reader can keep track. * i386_disasm.c (i386_disasm): The index is not emitted anymore, no need to skip it. * i386_disasm.c (amd3dnow): Mark as const. * defs/i386: Add blendvpd and blendvps opcodes. 2008-12-30 Ulrich Drepper <drepper@redhat.com> * defs/i386: Add blendpd and blendps opcodes. 2008-12-19 Ulrich Drepper <drepper@redhat.com> * defs/i386: Add entry for AMD 3DNOW. * i386_disasm.c: Implement AMD 3DNOW disassembly. 2008-12-17 Ulrich Drepper <drepper@redhat.com> * i386_disasm.c (i386_disasm): If instruction matches prefix, undoing the prefix match finishes the instruction. 2008-01-21 Roland McGrath <roland@redhat.com> * defs/i386: Fix typo in comment. * i386_disasm.c (i386_disasm): Handle cltq, cqto. * i386_parse.y: Add sanity check for NMNES macro value. * Makefile.am (i386_parse.o): Fix target in dependency rule. (i386_parse.h): New target with empty commands. (i386_lex.o): Depend on it in place of i386_parse.c. 2008-01-21 Ulrich Drepper <drepper@redhat.com> * Makefile.am (EXTRA_DIST): Remove defs/x86_64. 2008-01-14 Ulrich Drepper <drepper@redhat.com> * defs/i386: Add fixes for opcodes with register number in opcode, 64-bit immediate forms, nop with rex.B. * i386_data.h [X86_64] (FCT_imm64$w): New function. (FCT_oreg): New function. (FCT_oreg$w): New function. * i386_disasm.c (i386_disasm): Reinitialize fmt always before starting the loop to process the string. Handle 0x90 special for x86-64. * i386_parse.y (fillin_arg): Expand synonyms before concatening to form the function name. 2008-01-11 Ulrich Drepper <drepper@redhat.com> * i386_disasm.c (struct output_buffer): Remove symcb and symcbarg. (i386_disasm): Remove appropriate initializers. Use symcb to lookup symbol strings. * i386_disasm.c (struct output_buffer): Add labelbuf, labelbufsize, symaddr_use, and symaddr fields. (i386_disasm): Remove labelbuf and labelbufsize variables. Add back %e format. Implement %a and %l formats. * i386_data.h (general_mod$r_m): Set symaddr_use and symaddr for %rip base addressing. * i386_disasm.c (i386_disasm): Resize output buffer if necessary. Optimize output_data initialization. Free buffers before return. (struct output_data): Remove op1str field. Adjust code. (i386_disasm): Store final NUL btye at end of functions. 2008-01-10 Ulrich Drepper <drepper@redhat.com> * i386_data.h (FCT_crdb): New function. (FCT_ccc): Use FCT_crdb. (FCT_ddd): Likewise. * defs/i386: Fix a few instructions with immediate arguments. * i386_disasm.c: Rewrite interface to callback functions for operands to take a single pointer to a structure. * i386_data.h: Adjust all functions. 2008-01-08 Ulrich Drepper <drepper@redhat.com> * Makefile.am: Enable x86-64 again. * defs/i386: Lots of changes for x86-64. * i386_data.h: Add support for use in x86-64 disassembler. * i386_disasm.c: Likewise. * i386_parse.y: Likewise. * defs/x86_64: Removed. 2008-01-04 Ulrich Drepper <drepper@redhat.com> * defs/i386: Cleanups, remove masks which are not needed. Add remaining Intel opcodes. * i386_data.h (FCT_imm8): Check for input buffer overrun. * i386_disasm.c (i386_disasm): Likewise. * i386_parse.y: Remove suffixes which are not needed anymore. 2008-01-03 Ulrich Drepper <drepper@redhat.com> * defs/i386: Add yet more SSE instructions. 2008-01-02 Ulrich Drepper <drepper@redhat.com> * i386_disasm.c (i386_disasm): Extend matcher to allow tables to contain instructions with prefixes. * defs/i386: Use for many SSE operations. * i386_data.h (FCT_mmxreg2): Removed. 2008-01-01 Ulrich Drepper <drepper@redhat.com> * defs/i386: More 0f prefix support. * i386_data.h (FCT_mmxreg): Implement. (FCT_mmxreg2): Implement. (FCT_mmreg): Remove. * i386_disasm.c (i386_disasm): More special instructions. Fix tttn suffix for cmov. * i386_parse.y: Simplify test for mod/r_m mode. 2007-12-31 Ulrich Drepper <drepper@redhat.com> * defs/i386: Fix order or arguments for mov of control/debug registers. * i386_data.h (FCT_ccc): Implement (FCT_ddd): Implement 2007-12-30 Ulrich Drepper <drepper@redhat.com> * defs/i386: Fix 0f groups 6 and 7. * i386_data.c (FCT_mod$16r_m): Implement. * i386_disasm.c (i386_disasm): Third parameter can also have string. 2007-12-29 Ulrich Drepper <drepper@redhat.com> * defs/i386: Add lots of floating point ops. * i386_data.h (FCT_fmod$fr_m): Removed. (FCT_freg): Implement. * i386_disasm.c (i386_disasm): Implement suffix_D. * i386_parse.y: Emit suffix_D. * defs/i386: Use rel instead of dispA. Fix lcall, dec, div, idiv, imul, inc, jmp, ljmp, mul, neg, not, push, test. * i386_data.h (FCT_dispA): Removed. (FCT_ds_xx): Add test for end of input buffer. * i386_disasm.c (ABORT_ENTRY): Removed. (i386_disasm): Fix handling of SIB. Pass correct address value to operand callbacks. * Makefile.am (*.mnemonics): Filter out INVALID entry. * defs/i386: Define imms8 and use in appropriate places. Add INVALID entries for special opcodes with special mnemonics. Fix int3. Fix typo in shl. Correct xlat. * i386_data.h (FCT_ds_xx): New function. (FCT_ds_si): Use it. (FCT_ds_bx): New function. (FCT_imms8): New function. * i386_disasm.c (MNE_INVALID): Define. (i386_disasm): Handle invalid opcodes in mnemonics printing, not separately. Fix address value passed to operand handlers. * i386_parse.y (bx_reg): Define. (instrtable_out): Handle INVALID entries differently, just use MNE_INVALID value for .mnemonic. 2007-12-28 Ulrich Drepper <drepper@redhat.com> * defs/i386: Fix shift and mov immediate instructions. * i386_data.h (FCT_imm16): Implement. * defs/i386: Use absval instead of abs of lcall and ljmp. Add parameters for cmps. Fix test and mov immediate. * i386_data.h: Implement FCT_absval. * i386_disasm.c: Handle data16 for suffix_w and FCT_imm. * defs/i386: Move entries with 0x9b prefix together. * i386_disasm.c (i386_disasm): Fix recognizing insufficient bytes in input. Handle data16 with suffix_W. * i386_data.h (FCT_*): Add end parameter to all functions. Check before using more bytes. (FCT_sel): Implement. * i386_disasm.c (i386_disasm): Better handle end of input buffer. Specal opcode 0x99. * Makefile.am: Use m4 to preprocess defs/* files. * defs/i386: Adjust appropriately. * i386_data.c (FCT_ax): Implement. (FCT_ax$w): Use FCT_ax. * i386_disasm.c (ADD_STRING): Use _len instead of len. (i386_disasm): If no instruction can be matched because of lack of input and prefixes have been matched, print prefixes. Recognize abort entries. Handle special cases. * i386_gendis.c: Recognize - input file name. * i386_lex.c: Recognize INVALID token. * i386_parse.y: Handle INVALID token input. * defs/i386: Fix mov, pop. * i386_data.h (FCT_sreg3): Implement. 2007-12-27 Ulrich Drepper <drepper@redhat.com> * defs/i386: Fix adc, add, cmp, or, sbb, sub, xchg, xor. * i386_data.h (FCT_imms): New function. (FCT_imm$s): Use FCT_imms for handling of signed values. (FCT_imm8): Sign extend values. * i386_disasm.c (i386_disasm): Implement suffix_w0. * i386_parse.y: Emit suffix w0. * i386_data.h (FCT_disp8): Add 0x prefix. (FCT_ds_si): Implement. * i386_disasm.c (i386_disasm): Increment addr for invalid prefixes. Implement tttn suffix. * i386_parse.y: Emit tttn suffix definition. 2007-12-26 Ulrich Drepper <drepper@redhat.com> * i386_data.h (struct instr_enc): Use suffix field. (FCT_dx): Fill in body. (FCT_es_di): Likewise. (FCT_imm$s): Sign-extended byte values. * i386_disasm.c: Protect ADD_CHAR and ADD_STRING macros. Adjust uses. (i386_disasm): Handle suffix. * i386_parse.y: Emit suffix information. * defs/i386: Remove unnecessary suffixes. * Makefile.am: Disable building x86-64 version for now. * defs/i386: Fix and, bound, cmp, or, pop, sbb, sub, xor. * i386_data.h: Pass pointer to prefix to functions. If not prefixes are consumed this means invalid input. * i386_disasm.c: Fix prefix printing. Adjust function calls for parameter change. * i386_parse.y: Recognize moda prefix. 2007-12-21 Ulrich Drepper <drepper@redhat.com> * i386_data.h: Fix SIB handling. * i386_disasm.c: Likewise. 2007-12-19 Ulrich Drepper <drepper@redhat.com> * defs/i386: Fix up 'and' opcode. 2007-10-31 Ulrich Drepper <drepper@redhat.com> * Makefile.am: Add dependencies of the generated files on the source files. (i386_lex_CFLAGS): Add -Wno-sign-compare. * defs/i386: A lot more data. * defs/x86_64: Likewise. * i386_data.h (struct instr_enc): Add off1_3, off2_3, and off3_3 fields. (opfct_t): Add parameter for third operand. (FCT_*): Likewise. (data_prefix): New function. (FCT_abs): Implement. (FCT_ax): Renamed to FCT_ax$w amd implement. (FCT_disp8): Implement. (FCT_dispA): Implement. (FCT_imm): Implement. (FCT_imm$w): Implement. (FCT_imm$s): Don't zero-pad numbers. (FCT_imm8): Likewise. (FCT_rel): Likewise. (general_mod$r_m): New function. (FCT_mod$r_m): Use it. (FCT_mod$r_m$w): New function. (FCT_mod$8r_m): New function. (FCT_reg): Correctly handle 16-bit registers. (FCT_reg$w): New function. * i386_disasm.c (i386_disasm): Handle prefixes better. Pass third parameter to operand functions. * i386_parse.y (struct instruction): Add off3 field. Handle third operand throughout. 2007-02-05 Ulrich Drepper <drepper@redhat.com> * i386_disasm.c: New file. * i386_data.h: New file. * i386_gendis.c: New file. * i386_lex.l: New file. * i386_parse.y: New file. * memory-access.h: New file. * x86_64_disasm.c: New file. * defs/i386: New file. * defs/i386.doc: New file. * defs/x86_64: New file. 2005-02-15 Ulrich Drepper <drepper@redhat.com> * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. 2005-02-05 Ulrich Drepper <drepper@redhat.com> * Makefile.am (AM_CFLAGS): Define, instead of adding things to DEFS. 2003-08-11 Ulrich Drepper <drepper@redhat.com> * Moved to CVS archive.