[05/40] cpu/cris: Add u-stall virtual unit to CRIS v32

Message ID 24baefe92148f4b7968115ba13de9b0c863a65f6.1666258361.git.research_trasio@irq.a4lg.com
State Committed
Headers
Series sim+gdb: Suppress warnings if built with Clang (big batch 1) |

Commit Message

Tsukasa OI Oct. 20, 2022, 9:32 a.m. UTC
  Because CRIS v32 model does not define u-stall virtual unit, CGEN-generated
sim/cris/decodev32.h does not define the function declaration of
crisv32f_model_crisv32_u_stall.

It led to a hack in commit 4e6e8ba7c565 ("sim: cris: clean up missing func
prototype warnings"), manually adding the declaration of
crisv32f_model_crisv32_u_stall.

To **not** touch CGEN-generated files manually, this commit adds u-stall
virtual unit for CRIS v32 to let CGEN generate the function declaration of
crisv32f_model_crisv32_u_stall automatically.

This is still hackish but less than the previous one.

cpu/ChangeLog:

	* cris.cpu: Add u-stall virtual unit to CRIS v32.
---
 cpu/cris.cpu | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/cpu/cris.cpu b/cpu/cris.cpu
index cd85f4e94e2..a2d054f954c 100644
--- a/cpu/cris.cpu
+++ b/cpu/cris.cpu
@@ -284,6 +284,7 @@ 
   (unit u-const16 "Fetch 16-bit operand" () 1 1 () () () ())
   (unit u-const32 "Fetch 32-bit operand" () 1 1 () () () ())
   (unit u-skip4 "Skip 4 bytes" () 1 1 () () () ())
+  (unit u-stall "Stall unit" () 1 1 () () () ())
 
   ; For v32, we need to keep track of inputs (for movem destination
   ; cycle penalties) and output (for e.g. memory source and jump