summaryrefslogtreecommitdiff
path: root/rtl/core/decode/mux.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-12-15 00:41:05 -0600
committerAlejandro Soto <alejandro@34project.org>2022-12-16 16:29:10 -0600
commit7bf965b755b667f7da05e0995c2f09c54a8a2f11 (patch)
tree6695c6f9aecd84bdc542261d4bc32d73ef050ea8 /rtl/core/decode/mux.sv
parentae7fd6a060c9bb1ce9db83f8eb23fa19e8fa0e7a (diff)
Implement swi (system call)
Diffstat (limited to 'rtl/core/decode/mux.sv')
-rw-r--r--rtl/core/decode/mux.sv13
1 files changed, 10 insertions, 3 deletions
diff --git a/rtl/core/decode/mux.sv b/rtl/core/decode/mux.sv
index 25e390b..297ad33 100644
--- a/rtl/core/decode/mux.sv
+++ b/rtl/core/decode/mux.sv
@@ -56,6 +56,7 @@ module core_decode_mux
ldst,
mul,
psr,
+ swi,
coproc,
bkpt,
psr_saved,
@@ -71,6 +72,8 @@ module core_decode_mux
always_comb begin
mul = 0;
+ swi = 0;
+ psr = 0;
ldst = 0;
bkpt = 0;
branch = 0;
@@ -81,7 +84,6 @@ module core_decode_mux
conditional = 0;
restore_spsr = 0;
- psr = 0;
psr_saved = 0;
psr_write = 0;
update_flags = 0;
@@ -215,8 +217,13 @@ module core_decode_mux
psr_wr_control = msr_fields.c;
end
- /*`GROUP_SWP: ;
- `INSN_SWI: ;*/
+ // WONTFIX: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9757>
+ //`GROUP_SWP: ;
+
+ `INSN_SWI: begin
+ swi = 1;
+ dec_data.uses_rn = 0;
+ end
/* No es parte de ARMv4 pero U-Boot lo necesita. esto se
* decodifica igual que `mov pc, lr` ya que no tenemos Thumb.