| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
| |
Some instructions can have fields to be used by operating system
or for error reporting by user.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instructions description in instruction.cpp has been
pragmatically augmented by tool based on Python MIPS simulator,
hazards analyzer
https://github.com/ppisa/apo-simarch
That code has been originally distilled from from GNU
binutils sources.
Implementation is now inline with my original proposal
Previous solution gets untenable with more complex
instructions and its complexity would grow extremely.
MIPS instruction set with coprocessor instructions
which use sel field, rd used as index, rt as destination
and other peculiarities in newer versions cannot
be processed based on basic CPU control signals.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
exception.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
This allows to use MUSL Lib C printf and scanf implementations.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
instructions.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
It requires one more field to pass to ALU.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
|
| |
SWL, SWR.
The move makes basic memory stage processing more readable.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
Instruction parsing is rough and does not support branch offset computation.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
|
|
|
| |
opcode.
Because individual cache maintenance operations are not decoded,
be on safe side and flush all caches when CACHE operation
is processed,
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
|
| |
BGEZALL.
GCC generates these opcodes for default compilation mode.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
| |
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Memory stage is chosen to be exception commit stage.
Instructions flow postponed and stages holding following
instructions are cleaned. Processing of syscall at decode
stage as jump to the handler would be better solution
in real hardware but for future emulated syscalls
it is better to reach consistent state of registers.
Memory access caused exceptions would require cleanup
even in real hardware.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
independent.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
| |
Remaining are MOVZ and MOVN in the execution phase
and all branch and jump operations in handle_pc().
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
| |
instructions.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
| |
This allows to specify requirement for RS and RD on instruction
basis even for T_R / ALU instructions.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
|
|
|
| |
When any variant of cache instruction is detected
flush and invalidate whole data cache.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
|
|
|
| |
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
|
| |
|
|
|
|
| |
This makes our string format closer to original assembler.
|
|
|
|
| |
THere are exceptions when we care about forwarding and when we don't.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
In reality this internally allows us to see stages even it we are not
using pipelining but that is hidden from outside simply to not confuse
user.
|
|
|
|
|
|
| |
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.
|
| |
|