1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Add a FIXME and two asserts for now in the ARMAsmParser when it sees .code 16 or

.code 32 if the TargetMachine's isThumb() boolean does not match.  The correct
fix is to switch ARM subtargets at that point and is tracked by rdar://8856789
which is bigger task.

llvm-svn: 123353
This commit is contained in:
Kevin Enderby 2011-01-13 01:07:01 +00:00
parent f4ec824435
commit 1f82daa2d8

View File

@ -1351,10 +1351,20 @@ bool ARMAsmParser::ParseDirectiveCode(SMLoc L) {
return Error(Parser.getTok().getLoc(), "unexpected token in directive");
Parser.Lex();
if (Val == 16)
// FIXME: We need to be able switch subtargets at this point so that
// MatchInstructionImpl() will work when it gets the AvailableFeatures which
// includes Feature_IsThumb or not to match the right instructions. This is
// blocked on the FIXME in llvm-mc.cpp when creating the TargetMachine.
if (Val == 16){
assert(TM.getSubtarget<ARMSubtarget>().isThumb() &&
"switching between arm/thumb not yet suppported via .code 16)");
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code16);
else
}
else{
assert(!TM.getSubtarget<ARMSubtarget>().isThumb() &&
"switching between thumb/arm not yet suppported via .code 32)");
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code32);
}
return false;
}