Commit graph

4686 commits

Author SHA1 Message Date
Gabe Black ec5f66190e Fix code that computes displacement size.
--HG--
extra : convert_revision : a9be3eb2b90b88086936aeb4dcf87ec7b58a48cb
2007-07-20 14:57:34 -07:00
Gabe Black 5d882984d1 Add a bitfield to decode based on what prefixes are used.
--HG--
extra : convert_revision : 7ff4998b3249ccfe86ae9cbcc63fb910683707f5
2007-07-20 14:57:04 -07:00
Gabe Black dcfaa348b1 Add a parameter type to read a register index from the opcode itself.
--HG--
extra : convert_revision : d2b5468ebf5df5a6ccadb57a30c52c8d16417b9a
2007-07-20 14:55:16 -07:00
Gabe Black ee22bcd609 Fix function which calculates the carry flag.
--HG--
extra : convert_revision : aeb4f2d4c3936089421dbe80647f28ae36178283
2007-07-20 14:54:17 -07:00
Gabe Black 0baae59c09 Fix carry flag for subtracts, and clean up code slightly.
--HG--
extra : convert_revision : 668f5d5aeba888488b41284de6c72a0d055c4ef4
2007-07-20 14:53:38 -07:00
Gabe Black 0781609693 Fixed width parameter and provided a parameter to flip the carry bit on subtract.
--HG--
extra : convert_revision : d01bb791b000a2fdfc8600f8fb2f8aadd52b0b63
2007-07-20 14:52:44 -07:00
Gabe Black cfadef74d1 x86 fixes
Make the emulation environment consider the rex prefix.
Implement and hook in forms of j, jmp, cmp, syscall, movzx
Added a format for an instruction to carry a call to the SE mode syscalls system
Made memory instructions which refer to the rip do so directly
Made the operand size overridable in the microassembly
Made the "ext" field of register operations 16 bits to hold a sparse encoding of flags to set or conditions to predicate on
Added an explicit "rax" operand for the syscall format
Implemented syscall returns.

--HG--
extra : convert_revision : ae84bd8c6a1d400906e17e8b8c4185f2ebd4c5f2
2007-07-19 15:15:47 -07:00
Gabe Black 09f056a1ef Check for the two opcode prefix correctly and add in some instructions.
--HG--
extra : convert_revision : 751e54843f5c81b81529050a1ae9d46d07c36e97
2007-07-18 17:51:05 -07:00
Gabe Black f6d326d6fc Hook near returns into the decoder.
--HG--
extra : convert_revision : b38d4417552991e44f5d1de1f35d5d1ad8f32340
2007-07-18 17:48:16 -07:00
Gabe Black dbf361128a Implement near returns.
--HG--
extra : convert_revision : 3d6e8a976d31cb016a4b78200716b0ece155137a
2007-07-18 17:47:40 -07:00
Gabe Black 99310a1d93 Make instructions that conditionally set registers set them to their old value if they don't actually execute.
--HG--
extra : convert_revision : 36e63dd0c6ac1a3e1133c7985cf5507b83e9ee45
2007-07-18 17:46:38 -07:00
Gabe Black 776283cff8 Fix the overload which prints ExtMachInst in X86.
--HG--
extra : convert_revision : 2ef8ee71999f36b09270ba9526c2846beda65051
2007-07-18 17:45:43 -07:00
Gabe Black 05a33a443f Make store microops actually store instead of load.
--HG--
extra : convert_revision : fe90f8adc96dd0e680cfa45e4c510a906046ae3d
2007-07-18 17:45:06 -07:00
Gabe Black e209fce9de Fix a comment to refer to the right type of instruction.
--HG--
extra : convert_revision : dd441d8fbaed1ed8b2b66e3ad0275009bd4dcef4
2007-07-18 17:44:12 -07:00
Gabe Black 17f3da6c29 Fix the panic in the "error" format for x86,
--HG--
extra : convert_revision : bd0715b5b63665f9160082d67c5b5d90d2405c5c
2007-07-18 17:43:30 -07:00
Gabe Black 6c54b654a8 Implement some forms of add.
--HG--
extra : convert_revision : adbff2e9b9952ec09853cc43d40243e7262410a7
2007-07-18 16:33:56 -07:00
Gabe Black bafb7ee5c1 Fix the operand types in a section of the decoder.
--HG--
extra : convert_revision : c37600fd65b44817eed2ba653f9d4f08a9869874
2007-07-18 16:26:52 -07:00
Gabe Black b949458d4c Make the data size used by regops overridable in the microassembly.
--HG--
extra : convert_revision : 84d850aa5340c9d02d03502704b063215f6e2140
2007-07-18 16:26:17 -07:00
Gabe Black 387f00e3dd Fill out the miscreg file and add types to miscregs.hh
--HG--
extra : convert_revision : 865432256518c4340d9f319bdd9b7d160dc656a0
2007-07-18 16:12:39 -07:00
Gabe Black 5cca5ca3d9 Hook x86 nop into the decoder.
--HG--
extra : convert_revision : 26f765ecf74a0bb6a1ec89816f1d630a1a8e4553
2007-07-18 16:11:52 -07:00
Gabe Black d21c16fd37 Fix a compilation error for SubBitUnions,
--HG--
extra : convert_revision : aad9388afe81ba6541d0b18fa9777e6ffcfd871c
2007-07-18 16:11:16 -07:00
Gabe Black 3bd42af99e Implement the x86 nop to be a "fault" microop which returns "NoFault".
--HG--
extra : convert_revision : 1b446def756f1d0f80631db944d1cc41be95efbd
2007-07-18 16:10:44 -07:00
Gabe Black dffc40ff62 Add a generateDisassembly function to the MicroFault StaticInst.
--HG--
extra : convert_revision : 73811bf99b26fad413c9b84a54f44e3763ff1835
2007-07-18 16:09:35 -07:00
Gabe Black 6fbcb225af Make name, isMachineCheckFault, and isAlignmentFault const.
--HG--
extra : convert_revision : a27e0cbdfcb2a5fdc5979686f887cec7d106542b
2007-07-18 16:09:00 -07:00
Gabe Black 85f32920fb Calculate the correct address size.
--HG--
extra : convert_revision : 6bd9d5a01ba6600781e3678e0403dca524fb2cba
2007-07-17 20:54:55 -07:00
Gabe Black e524240d68 Make disassembled x86 register indices reflect their size.
This doesn't handle high byte register accesses. It also highlights the fact that address size isn't actually being calculated, and that the size a microop uses needs to be overridable from the microassembly.

--HG--
extra : convert_revision : d495ac4f5756dc55a5f71953ff6963b3c030e6cb
2007-07-17 18:12:33 -07:00
Gabe Black 2e80f71dcd Implemented jnz.
--HG--
extra : convert_revision : ea169ad68acbb3383443586b783b831b3a9eecf9
2007-07-17 16:55:33 -07:00
Gabe Black 62ffc71fab Use limm to set up immediate value for subtract instruction.
--HG--
extra : convert_revision : f94e391e36a47c2f5222f30d7e28f48f7875db58
2007-07-17 16:50:13 -07:00
Gabe Black d77d4c04b7 Implement the jz instruction.
--HG--
extra : convert_revision : 7c0bd7ce244f724ac03bbb5fdf770c7a3eba78b4
2007-07-17 15:36:45 -07:00
Gabe Black c4004482a5 Make "test" set some condition codes.
It still needs to zero the overflow and carry flags to be correct.

--HG--
extra : convert_revision : 73cb3a55f7b4234389d9355f5ad45da6aaaa6c60
2007-07-17 15:35:34 -07:00
Gabe Black a6757095c3 Add in support for condition code flags.
Some microops can set the condition codes, and some of them can be predicated on them. Some of the codes aren't implemented because it was unclear from the AMD patent what they actually did. They are used with string instructions, but they use variables IP, DTF, and SSTF which don't appear to be documented.

--HG--
extra : convert_revision : 2236cccd07d0091762b50148975f301bb1d2da3f
2007-07-17 15:33:18 -07:00
Gabe Black cf846d5205 Add in operand which holds the condition code bits of the flag register.
--HG--
extra : convert_revision : 416052f41fccc8286b3bdbe8d559512a761224f2
2007-07-17 15:28:48 -07:00
Gabe Black bbf7163dd9 Add symbols for each of the flags a microop could set and each condition it could check.
--HG--
extra : convert_revision : 1f542b8aadfd5146539cadef631b49d77f578472
2007-07-17 15:27:28 -07:00
Gabe Black cbc24d6600 Actually include miscregs.hh
--HG--
extra : convert_revision : 6ebf906d2211b94f28c173f0d2da91bd446fcb2c
2007-07-17 13:30:23 -07:00
Gabe Black b0643a08a3 Create a file to describe misc registers.
Define bitfields, indices, etc.

--HG--
extra : convert_revision : 8fffdc4cf796d304b12b317d8bddf5685bd50cf4
2007-07-17 13:29:40 -07:00
Gabe Black 8f3153ffb3 Create a file of functions for computing condition codes.
These haven't been very thuroughly tested, so use at your own risk.

--HG--
extra : convert_revision : 938885d36fea4a99f8228cdf195a0e0a38dd9031
2007-07-17 13:28:03 -07:00
Gabe Black aad11bf879 Add a spot for the condition code portion of the flag register.
This is stored in the integer register file so that it can be renamed, but it should be a misc reg.

--HG--
extra : convert_revision : eee48f24dd80b145f14427482047c4d8af2521ab
2007-07-17 13:26:06 -07:00
Gabe Black 13ccac1a3c Add a conversion constructor so a bitunion can be initialized to a value.
Previously, the bitunion would need to be declared and then assigned to separately.

--HG--
extra : convert_revision : d229bd83bc7baeca2259d4e7b080f359915015f3
2007-07-17 13:23:42 -07:00
Gabe Black 873b762d4b Move bitunion code into it's own file.
--HG--
extra : convert_revision : 8d55ca9645ee4e357b7f4595435542eb72490331
2007-07-14 17:28:26 -07:00
Gabe Black 4f7809d5e6 Pull some hard coded base classes out of the isa description.
--HG--
rename : src/arch/x86/isa/base.isa => src/arch/x86/isa/outputblock.isa
extra : convert_revision : 7954e7d5eea3b5966c9e273a08bcd169a39f380c
2007-07-14 17:14:19 -07:00
Nathan Binkert 92bb9242fb ignore stuff that we don't want to see in the status
--HG--
extra : convert_revision : c4a4711cf515507d4debcacacef5799adcfe3bef
2007-07-13 22:39:41 -07:00
Nathan Binkert 2c8b9cbd7f transfer tags
--HG--
extra : convert_revision : 7e83aabe9926dae16d4732a6260c89b4344919e9
2007-07-13 22:24:04 -07:00
Korey Sewell 738ecc495b fix store instructions, pass fast/quick Atomic/TimingSimpleCPU regressions...
src/arch/mips/isa/decoder.isa:
    commment out deret instruction for now...
src/arch/mips/isa/formats/fp.isa:
    edit fp format
src/arch/mips/isa/formats/mem.isa:
    fix for basic store instructions

--HG--
extra : convert_revision : 30cb5a474e78ac9292b6ab37d433db947a177731
2007-06-29 15:13:50 -04:00
Korey Sewell e28cbc98a0 o3cpu build for mips
--HG--
extra : convert_revision : 2c0be7a8c0a54ba5b1b2b69468f788d20abc8452
2007-06-28 05:30:46 -04:00
Korey Sewell ac19e0c505 FINISH off merge of mips mt/dsp isa extensions by adding the ControlBitfieldOPerand to ISA Parser. Now, while things do build, we have to fix broken functionality...
src/arch/isa_parser.py:
    add back deleted writeback in Control Operand

--HG--
extra : convert_revision : dba11af220a1281fa53f79d87e4f8752bdfc56db
2007-06-22 21:09:35 -04:00
Korey Sewell c6d137f565 add Control Bitfield class
--HG--
extra : convert_revision : 31e7243c8820cb9f6744c53c417460dee9adaf44
2007-06-22 20:09:46 -04:00
Korey Sewell 753adb38d5 mips import pt. 1
src/arch/mips/SConscript:
    "mips import pt.1".

--HG--
extra : convert_revision : 2e393341938bebf32fb638a209262d074fad4cc1
2007-06-22 19:03:42 -04:00
Gabe Black 16c1b5484f Merge zizzer.eecs.umich.edu:/bk/newmem
into  zizzer.eecs.umich.edu:/.automount/wexford/x/gblack/newmem-o3-micro

--HG--
extra : convert_revision : 3fa3fa4544ff8c9d2135e1befe6c8f4757006a2a
2007-06-22 17:44:33 -04:00
Gabe Black 8e6abaed79 Update of reference outputs. SPARC_SE o3 gzip didn't have reference outputs, mcf has a reduced input size, and most of the other changes are for a change in how branch mispredicts work which makes things more accurate.
--HG--
extra : convert_revision : 33ad6a220945b344d2fc5c6abef8e67467e0c0ec
2007-06-22 15:06:10 -04:00
Gabe Black 70d6044527 Make symbols for regular registers.
--HG--
extra : convert_revision : 28a6df1efe4298877dc2b20179caeb25dfdc4622
2007-06-21 20:35:27 +00:00