aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/alu.cpp
Commit message (Collapse)AuthorAge
* Fix program end by exception if divisor is zero for div instruction.Pavel Pisa2019-03-10
| | | | | | | | | | | | | | | | | | | | Problem reported by Jakub Broz. Correct behaviour according to MIPS Architecture for Programmers Volume II-A: The MIPS32 Instruction Set Manual which describes DIV instruction Format: DIV rs, rt No arithmetic exception occurs under any circumstances. Restrictions: If the divisor in GPR rt is zero, the arithmetic result value is UNPREDICTABLE. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implemented coprocessor 0 registers access and register EPC and Cause set by ↵Pavel Pisa2019-03-04
| | | | | | exception. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement ROTR and ROTRV and full decode of WSBH, SEB and SEH.Pavel Pisa2019-02-24
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Pass arithmetic exception trough pipeline and implement trap support and ↵Pavel Pisa2019-02-17
| | | | | | instructions. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Multiply and accumulate and CLZ/CLO operations added.Pavel Pisa2019-02-15
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement EXT instruction used in GLIBC startup.Pavel Pisa2019-02-15
| | | | | | It requires one more field to pass to ALU. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement MUL operation which stores result to the register.Pavel Pisa2019-02-14
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Minimal implementation of RDHWR to support dummy TLS region.Pavel Pisa2019-02-08
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement BSHFL instruction and ignore RDHWR instruction.Pavel Pisa2019-02-07
|
* Remove dependency of ALU operation encoding on MIPS instruction format.Pavel Pisa2019-02-07
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Reorganize PC handling and implement full REGIMM decode.Pavel Pisa2019-02-05
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct shift operation and make ALU_OP_MOVZ and ALU_OP_MOVN encoding ↵Pavel Pisa2019-02-05
| | | | | | independent. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Add license to the source files.Pavel Pisa2019-02-04
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement BREAK instruction to stop continuous execution.Pavel Pisa2019-02-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement instructions MULT, MULTU, DIV, DIVU.Pavel Pisa2019-02-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Include support for JALR support.Pavel Pisa2019-01-31
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Initial support for JAL.Pavel Pisa2019-01-31
| | | | | | | The JR, BEQ, BNE are most probably incorrect still. There is missing forwarding for pipelined execution. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct signed arithmetic overflow exception.Pavel Pisa2019-01-31
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement LUIKarel Kočí2018-04-08
|
* Cleanup some todos in codeKarel Kočí2018-01-15
|
* Fix SRA and SRAV instructionsKarel Kočí2018-01-15
| | | | | | This implementation is correct one but there is no guarantee that it will work with all compilers so we should always check on given platform that tests pass (and potentially fix it).
* Fix fall trough warning of gcc 7+Karel Kočí2018-01-05
|
* Initial implementation of reverse instruction conversionKarel Kočí2018-01-03
| | | | | | This is rude implementation. We always print all fields. In future we should add flags to set what fields should be hidden on per instruction bases.
* Put qtmips_machine to machine namespaceKarel Kočí2017-12-17
|
* Revert "Suppress some warning"Karel Kočí2017-12-17
| | | | This reverts commit 5bf637a429bbcf09092b8d189010c50d61c3562f.
* Implement branch and jump instructionsKarel Kočí2017-12-12
|
* Suppress some warningKarel Kočí2017-12-12
| | | | | You can call it a fix but in reality it has same effect but I accept that this is better.
* Add crude implementation of MOV* instructionsKarel Kočí2017-11-25
| | | | I don't like how it's implemented but I have no other idea atm.
* Implement instructions for moving from and to HI and LO registersKarel Kočí2017-11-25
|
* Fix SLTU instructionKarel Kočí2017-11-25
|
* Implement tests for few more arithmetic instructionsKarel Kočí2017-11-21
|
* Another huge pile of work for about two monthsKarel Kočí2017-11-19
| | | | | | Well I should commit every change instead of this madness. I am not documenting changes as all this is just improvements and implementation progression.
* Just something I had staggedKarel Kočí2017-11-19