Skip to contentSkip to conversation

[4597] CRIS: Re-add the X flag to the tb flags, it allows for better code generation and is practially always cleared.

Qemu-devel Edgar E. Iglesias 3 participants 3 messages May 27, 2008 – May 28, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4597

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4597
Author:   edgar_igl
Date:     2008-05-27 21:15:56 +0000 (Tue, 27 May 2008)

Log Message:
-----------
CRIS: Re-add the X flag to the tb flags, it allows for better code generation and is practially always cleared.

Modified Paths:
--------------
trunk/cpu-exec.c

Modified: trunk/cpu-exec.c
===================================================================

cpu-exec.c +1 -1
@@ -218,7 +218,7 @@
     cs_base = 0;
     pc = env->pc;
 #elif defined(TARGET_CRIS)
-    flags = env->pregs[PR_CCS] & U_FLAG;
+    flags = env->pregs[PR_CCS] & (U_FLAG | X_FLAG);
     flags |= env->dslot;
     cs_base = 0;
     pc = env->pc;
#1 lore raw
Quoted 9 lines · Edgar E. Iglesias

Revision: 4597

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4597
Author:   edgar_igl
Date:     2008-05-27 21:15:56 +0000 (Tue, 27 May 2008)

Log Message:
-----------
CRIS: Re-add the X flag to the tb flags, it allows for better code generation and is practially always cleared.

Are you sure this is safe? It means you shouldn't do TB chaining from any block that modifies the X flag, and I don't see any code for that.

Paul

#2 lore raw
Quoted 6 lines · Paul Brook
Quoted 5 lines · Edgar E. Iglesias

Revision: 4597

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4597
Author:   edgar_igl
Date:     2008-05-27 21:15:56 +0000 (Tue, 27 May 2008)
Quoted 7 lines
Quoted 4 lines

Log Message:
-----------
CRIS: Re-add the X flag to the tb flags, it allows for better code generation and is practially always cleared.

Are you sure this is safe? It means you shouldn't do TB chaining from any block that modifies the X flag, and I don't see any code for that.

I wouldn't expect the cris translator to handle broken X sequences (it's a TODO). I'll look into it when adding proper X flag support.

Thanks for the hint, I didn't know the target specific code was responsible for assuring flag consistency at tb chaining.

Best regards

Signature · 2 lines
Edgar E. Iglesias
Axis Communications AB