ARM: Force the condition code for 16 bit thumb instructions to be unconditional.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:01 +0000 (12:58 -0500)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:01 +0000 (12:58 -0500)
Before, because 16 bit thumb instructions didn't set the upper 16 bits of the
ExtMachInst, that field would be interpretted as "equals".

src/arch/arm/predecoder.hh

index 2438f0378585671b055d91e58db41653659bc8d8..63da78dd7cad1a7ae404f137fbf4203e08403ac3 100644 (file)
@@ -126,6 +126,8 @@ namespace ArmISA
                         DPRINTF(Predecoder, "16 bit Thumb.\n");
                         offset += 2;
                         emi.instBits = word;
+                        // Set the condition code field artificially.
+                        emi.condCode = COND_UC;
                     }
                 }
             }