summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/db_disasm.c
Commit message (Collapse)AuthorAgeFilesLines
* Decode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr,jhb2008-08-111-9/+68
| | | | | | | stmxcsr, clflush, lfence, mfence, sfence, syscall, sysret, sysenter, sysexit, pause, monitor, mwait, and swapgs (amd64 only). MFC after: 1 week
* Various fixes:jhb2006-11-131-83/+61
| | | | | | | | | | | | - Remove an extra entry from the array for 0x0f prefixed instruction groups. This fixes decoding of instructions where the second opcode >= 0x80. - Add support for the 64-bit immediate mov instructions. - When short_addr is enabled, don't parse the modr/m byte for a 16-bit address, but as a 32-bit address. - Support %rip relative addressing. - Don't print a displacement of 0 if there is a base or index register. MFC after: 3 days
* Checkpoint today's tidy-up of the WIP disassembler. It now agrees withpeter2005-03-301-11/+40
| | | | | | | | | | | | | objdump --disassemble when disassembling itself in userland. I've added the cmovCC instruction group and tweaked a bunch of size sensitive array indexes to either fix my mistakes and/or force it to work by any means necessary. I'm committing this because it is usable enough to see what is going on when single stepping via ddb. It might still tell lies, but its lies will be far more subtle now. I'm not sure that this is a good thing or not.
* Commit my checkpoint of db_disasm.c that I hacked to understand some amd64peter2005-03-301-79/+116
| | | | | | instructions as it was when I dropped it back in May 31, 2003. I'm committing this as an intermediate stage because back then I thought I understood what I was doing with this file.
* Begin all license/copyright comments with /*-imp2005-01-051-1/+1
|
* Use __FBSDID().obrien2003-07-251-2/+3
| | | | Brought to you by: a boring talk at Ottawa Linux Symposium
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-231-4/+4
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Remove __P.alfred2002-03-201-6/+6
|
* Quiet a variable format-string warning.kris2001-07-191-4/+4
| | | | MFC after: 1 week
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-4/+4
| | | | kernel compile
* Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.bde1998-07-081-9/+9
|
* Removed a wrong comment of mine.bde1997-04-011-10/+2
| | | | Removed unused #includes.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fixed botched tables:bde1997-01-041-128/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the operands for bt, bts, arpl and `enter' were reversed. - btr was reported as bts (with the correct operand order). - cmpxchg was misplaced. It was misplaced differently in the comments. It is misplaced differently again in the i486 manual. I put it where the i586 manual and gas say it is. - fucompp was misplaced. - the rr table for(s) some versions of fstp, fcom and fcomp was non-null. This caused some invalid opcodes to be reported as "" instead of as "<bad instruction>". - the word and long versions of the fi* instructions were reversed. - aaa and daa were reversed. Fixed bugs involving unusual operand sizes: - 32-bit registers weren't always forced for bswap or for moves to and from special registers. - the operand sizes weren't reported for [l]call or [l]jmp. - displacements weren't truncated mod 2^16 when the operand size was 16-bit. - too-large displacements and offsets were fetched, and too-large offsets were reported, when the operand size was 16-bit. - sign extended immediate bytes were extended too far when the operand size was 16-bit. Fixed bugs involving usual operand sizes: - 8-bit source registers weren't forced for mov[sz]b[wl]. - 16-bit source registers weren't forced for mov[sz]w[wl]. - immediate bytes were sometimes reported as sign extended even for byte operations. Same for immediate words in word operations. - the immediate byte was not reported as sign extended for `push'. Finished Pentium support: - cpuid, cmpxchg8b and rsm were missing. Finished i287 support: - fneni, fndisi and fsetpm were missing. These are harmless nops on later FPUs. Improvements: - report invalid opcodes 0xd6 and 0xf1 using .byte. They are special in not causing invalid operand exceptions when executed. - report the immediate byte for unusual aam and aad instuctions. Immediate bytes other than 0x0a always worked and are documented to work on Pentiums.
* Fixed operand order for shld and shrd.bde1996-07-121-82/+80
| | | | | | Finished the constant poisoning that was begun in rev.1.14. Consts aren't very poisonous (or useful) unless -Wcast-qual is in CFLAGS, and it isn't in the default CFLAGS.
* Removed bogus `altfmt' code. No alternative formats are supported, butbde1996-06-081-10/+1
| | | | | | altfmt was abused to sometimes screw up the disassembly of the bytes following unconditional jump instructions. Gas doesn't pad to a longword boundary like the comment said - that is the programmer's responsibility.
* Teach the disassembler about the 0f,3x family of instructionswollman1996-03-281-52/+72
| | | | (RDMSR, RDTSC, WRMSR, and RDPMC).
* Get rid of two and a half printf in the kernel.phk1996-01-151-4/+4
| | | | | | | | | | | | | | | | | | | | Add more features to the one remaining to handle the job: + signed quantity. # alternate format - left padding * read width as next arg. n numeric in (argument specified) default radix. Fix the DDB debugger to use these. Use vprintf in debug routine in pcvt. The warnings from gcc may become more wrong and intolerable because of this. Warning: I have not checked the entire source for unsupported or changed constructs, but generally belive that there are only a few. Suggested by: bde
* Untangled the vm.h include file spaghetti.dg1995-12-071-1/+3
|
* Removed bogus statics in declarations that don't allocate storage.bde1995-10-301-4/+13
| | | | Added prototypes.
* Second batch of cleanup changes.phk1995-10-291-49/+49
| | | | | This time mostly making a lot of things static and some unused variables here and there.
* Remove trailing whitespace.rgrimes1995-05-301-8/+8
|
* Fix disassembly of `bt[crs] $Ib,E'.bde1995-01-291-2/+2
|
* db_disasm.c: Unused var zapped.phk1994-10-081-2/+2
| | | | | | | pmap.c: tons of unused vars zapped, various other warnings silenced. trap.c: unused vars zapped. vm_machdep.c: A wrong argument, which by chance did the right thing, was corrected.
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-131-5/+5
| | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
* Make everything compile with -Wtraditional. Make it easier to distributewollman1993-12-191-2/+3
| | | | | | | | | | | a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andwollman1993-11-251-2/+2
| | | | add same (sans -Werror) to Makefile for future compilations.
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-27/+1
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Fixed two occarances of ldos which should have been lods.rgrimes1993-07-121-2/+5
| | | | (From Christoph Robitschko)
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+1397
OpenPOWER on IntegriCloud