Add an "msasm" flag to inline asm as suggested in PR 5125.

A little ugliness is accepted to keep the binary file format
compatible.  No functional change yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dale Johannesen
2009-10-13 20:46:56 +00:00
parent 9578c7aad6
commit 4360298d2b
10 changed files with 65 additions and 15 deletions

View File

@ -1164,7 +1164,8 @@ bool BitcodeReader::ParseConstants() {
case bitc::CST_CODE_INLINEASM: {
if (Record.size() < 2) return Error("Invalid INLINEASM record");
std::string AsmStr, ConstrStr;
bool HasSideEffects = Record[0];
bool HasSideEffects = Record[0] & 1;
bool IsMsAsm = Record[0] >> 1;
unsigned AsmStrSize = Record[1];
if (2+AsmStrSize >= Record.size())
return Error("Invalid INLINEASM record");
@ -1178,7 +1179,7 @@ bool BitcodeReader::ParseConstants() {
ConstrStr += (char)Record[3+AsmStrSize+i];
const PointerType *PTy = cast<PointerType>(CurTy);
V = InlineAsm::get(cast<FunctionType>(PTy->getElementType()),
AsmStr, ConstrStr, HasSideEffects);
AsmStr, ConstrStr, HasSideEffects, IsMsAsm);
break;
}
}