[PATCH] [mips] [IAS] Restore STI.FeatureBits in .set pop.

Daniel Sanders daniel.sanders at imgtec.com
Mon Jun 1 09:03:18 PDT 2015


================
Comment at: test/MC/Mips/set-push-pop-directives.s:70
@@ +69,2 @@
+# CHECK-NOT: :[[@LINE-1]]:5: error: instruction requires a CPU feature not currently enabled
+    .set pop
----------------
tomatabacu wrote:
> dsanders wrote:
> > We ought to add a test like:
> >   .set msa
> >   .set push
> >   .set mips32 # MSA not available in MIPS32
> >   addvi.b $w1, $w2, 1 # CHECK: :[[@LINE-1]]:5: error: instruction requires a CPU feature not currently enabled
> >   .set pop
> >   addvi.b $w1, $w2, 1 # CHECK-NOT: :[[@LINE-1]]:5: error: instruction requires a CPU feature not currently enabled
> In GAS (and the IAS) ".set mips32" does not turn off MSA.
> So there are no errors in this case, but GAS does emit warnings for inappropriate option combos (including MIPS32 and MSA).
> 
> These warnings are not implemented in the IAS at the moment.
> They can be added in a separate patch, so I don't think they should block this patch.
MSA was only used as a convenient example. There should be other features bits that can be used to test that indirectly disabled features become enabled again after a .set pop.

> In GAS (and the IAS) ".set mips32" does not turn off MSA.
> So there are no errors in this case, but GAS does emit warnings for inappropriate option combos (including MIPS32 and MSA).

It should emit a diagnostic of some kind. It's not valid to use MSA with MIPS32 or earlier.

Note that the MSA feature is technically still enabled after the '.set mips32' but using MSA instructions is invalid (and should emit errors or warnings) until the '.set pop' restores the ISA to MIPS32r2.

http://reviews.llvm.org/D9156

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list