@@ -3173,46 +3173,44 @@ bool RISCVAsmParser::parseDirectiveOption() {
31733173 return false ;
31743174 }
31753175
3176- if (Option == " rvc " ) {
3176+ if (Option == " exact " ) {
31773177 if (Parser.parseEOL ())
31783178 return true ;
31793179
3180- getTargetStreamer ().emitDirectiveOptionRVC ();
3181- setFeatureBits (RISCV::FeatureStdExtC, " c " );
3182- clearFeatureBits (RISCV::FeatureDisableAsmCompression,
3183- " disable-asm-compression " );
3180+ getTargetStreamer ().emitDirectiveOptionExact ();
3181+ setFeatureBits (RISCV::FeatureExactAssembly,
3182+ " exact-asm " );
3183+ clearFeatureBits (RISCV::FeatureRelax, " relax " );
31843184 return false ;
31853185 }
31863186
3187- if (Option == " norvc " ) {
3187+ if (Option == " noexact " ) {
31883188 if (Parser.parseEOL ())
31893189 return true ;
31903190
3191- getTargetStreamer ().emitDirectiveOptionNoRVC ();
3192- clearFeatureBits (RISCV::FeatureStdExtC, " c" );
3193- clearFeatureBits (RISCV::FeatureStdExtZca, " zca" );
3194- setFeatureBits (RISCV::FeatureDisableAsmCompression,
3195- " disable-asm-compression" );
3191+ getTargetStreamer ().emitDirectiveOptionNoExact ();
3192+ clearFeatureBits (RISCV::FeatureExactAssembly,
3193+ " exact-asm" );
3194+ setFeatureBits (RISCV::FeatureRelax, " relax" );
31963195 return false ;
31973196 }
31983197
3199- if (Option == " autocompress " ) {
3198+ if (Option == " rvc " ) {
32003199 if (Parser.parseEOL ())
32013200 return true ;
32023201
3203- getTargetStreamer ().emitDirectiveOptionAutoCompress ();
3204- clearFeatureBits (RISCV::FeatureDisableAsmCompression,
3205- " disable-asm-compression" );
3202+ getTargetStreamer ().emitDirectiveOptionRVC ();
3203+ setFeatureBits (RISCV::FeatureStdExtC, " c" );
32063204 return false ;
32073205 }
32083206
3209- if (Option == " noautocompress " ) {
3207+ if (Option == " norvc " ) {
32103208 if (Parser.parseEOL ())
32113209 return true ;
32123210
3213- getTargetStreamer ().emitDirectiveOptionNoAutoCompress ();
3214- setFeatureBits (RISCV::FeatureDisableAsmCompression,
3215- " disable-asm-compression " );
3211+ getTargetStreamer ().emitDirectiveOptionNoRVC ();
3212+ clearFeatureBits (RISCV::FeatureStdExtC, " c " );
3213+ clearFeatureBits (RISCV::FeatureStdExtZca, " zca " );
32163214 return false ;
32173215 }
32183216
@@ -3254,8 +3252,8 @@ bool RISCVAsmParser::parseDirectiveOption() {
32543252
32553253 // Unknown option.
32563254 Warning (Parser.getTok ().getLoc (), " unknown option, expected 'push', 'pop', "
3257- " 'rvc', 'norvc', 'arch', 'relax' or "
3258- " 'norelax '" );
3255+ " 'rvc', 'norvc', 'arch', 'relax', 'norelax', "
3256+ " 'exact' or 'noexact '" );
32593257 Parser.eatToEndOfStatement ();
32603258 return false ;
32613259}
@@ -3466,11 +3464,12 @@ bool RISCVAsmParser::parseDirectiveVariantCC() {
34663464void RISCVAsmParser::emitToStreamer (MCStreamer &S, const MCInst &Inst) {
34673465 MCInst CInst;
34683466 bool Res = false ;
3469- if (!getSTI ().hasFeature (RISCV::FeatureDisableAsmCompression))
3470- Res = RISCVRVC::compress (CInst, Inst, getSTI ());
3467+ const MCSubtargetInfo &STI = getSTI ();
3468+ if (!STI.hasFeature (RISCV::FeatureExactAssembly))
3469+ Res = RISCVRVC::compress (CInst, Inst, STI);
34713470 if (Res)
34723471 ++RISCVNumInstrsCompressed;
3473- S.emitInstruction ((Res ? CInst : Inst), getSTI () );
3472+ S.emitInstruction ((Res ? CInst : Inst), STI );
34743473}
34753474
34763475void RISCVAsmParser::emitLoadImm (MCRegister DestReg, int64_t Value,
0 commit comments