mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
[ms-inline asm] We only need one bit to represent the AsmDialect in the
MachineInstr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2943e37804
commit
77fffa6fdd
@ -214,8 +214,7 @@ public:
|
||||
// Interpretation of the MIOp_ExtraInfo bit field.
|
||||
Extra_HasSideEffects = 1,
|
||||
Extra_IsAlignStack = 2,
|
||||
Extra_ATTDialect = 3, // AT&T AsmDialect.
|
||||
Extra_IntelDialect = 4, // Intel AsmDialect.
|
||||
Extra_AsmDialect = 3,
|
||||
|
||||
// Inline asm operands map to multiple SDNode / MachineInstr operands.
|
||||
// The first operand is an immediate describing the asm operand, the low
|
||||
|
@ -970,11 +970,7 @@ bool MachineInstr::isStackAligningInlineAsm() const {
|
||||
InlineAsm::AsmDialect MachineInstr::getInlineAsmDialect() const {
|
||||
assert(isInlineAsm() && "getInlineAsmDialect() only works for inline asms!");
|
||||
unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm();
|
||||
if (ExtraInfo & InlineAsm::Extra_IntelDialect)
|
||||
return InlineAsm::AD_Intel;
|
||||
|
||||
assert((ExtraInfo & InlineAsm::Extra_ATTDialect) && "Expected AT&T dialect!");
|
||||
return InlineAsm::AD_ATT; // The default.
|
||||
return InlineAsm::AsmDialect((ExtraInfo >> 2) & 1);
|
||||
}
|
||||
|
||||
int MachineInstr::findInlineAsmFlagIdx(unsigned OpIdx,
|
||||
@ -1579,9 +1575,9 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
|
||||
OS << " [sideeffect]";
|
||||
if (ExtraInfo & InlineAsm::Extra_IsAlignStack)
|
||||
OS << " [alignstack]";
|
||||
if (ExtraInfo & InlineAsm::Extra_ATTDialect)
|
||||
if (getInlineAsmDialect() == InlineAsm::AD_ATT)
|
||||
OS << " [attdialect]";
|
||||
if (ExtraInfo & InlineAsm::Extra_IntelDialect)
|
||||
if (getInlineAsmDialect() == InlineAsm::AD_Intel)
|
||||
OS << " [inteldialect]";
|
||||
|
||||
StartOp = AsmDescOp = InlineAsm::MIOp_FirstOperand;
|
||||
|
@ -6084,10 +6084,8 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
|
||||
ExtraInfo |= InlineAsm::Extra_HasSideEffects;
|
||||
if (IA->isAlignStack())
|
||||
ExtraInfo |= InlineAsm::Extra_IsAlignStack;
|
||||
if (IA->getDialect() == InlineAsm::Extra_ATTDialect)
|
||||
ExtraInfo |= InlineAsm::Extra_ATTDialect;
|
||||
if (IA->getDialect() == InlineAsm::Extra_IntelDialect)
|
||||
ExtraInfo |= InlineAsm::Extra_IntelDialect;
|
||||
// Set the asm dialect.
|
||||
ExtraInfo |= IA->getDialect() << 2;
|
||||
AsmNodeOperands.push_back(DAG.getTargetConstant(ExtraInfo,
|
||||
TLI.getPointerTy()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user