mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user