mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Kill some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb9cffea4a
commit
db7e2e59dd
@ -87,10 +87,6 @@ class ARMAsmParser : public MCTargetAsmParser {
|
||||
bool parseMemory(SmallVectorImpl<MCParsedAsmOperand*> &);
|
||||
bool parseOperand(SmallVectorImpl<MCParsedAsmOperand*> &, StringRef Mnemonic);
|
||||
bool parsePrefix(ARMMCExpr::VariantKind &RefKind);
|
||||
const MCExpr *applyPrefixToExpr(const MCExpr *E,
|
||||
MCSymbolRefExpr::VariantKind Variant);
|
||||
|
||||
|
||||
bool parseMemRegOffsetShift(ARM_AM::ShiftOpc &ShiftType,
|
||||
unsigned &ShiftAmount);
|
||||
bool parseDirectiveWord(unsigned Size, SMLoc L);
|
||||
@ -3068,47 +3064,6 @@ bool ARMAsmParser::parsePrefix(ARMMCExpr::VariantKind &RefKind) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const MCExpr *
|
||||
ARMAsmParser::applyPrefixToExpr(const MCExpr *E,
|
||||
MCSymbolRefExpr::VariantKind Variant) {
|
||||
// Recurse over the given expression, rebuilding it to apply the given variant
|
||||
// to the leftmost symbol.
|
||||
if (Variant == MCSymbolRefExpr::VK_None)
|
||||
return E;
|
||||
|
||||
switch (E->getKind()) {
|
||||
case MCExpr::Target:
|
||||
llvm_unreachable("Can't handle target expr yet");
|
||||
case MCExpr::Constant:
|
||||
llvm_unreachable("Can't handle lower16/upper16 of constant yet");
|
||||
|
||||
case MCExpr::SymbolRef: {
|
||||
const MCSymbolRefExpr *SRE = cast<MCSymbolRefExpr>(E);
|
||||
|
||||
if (SRE->getKind() != MCSymbolRefExpr::VK_None)
|
||||
return 0;
|
||||
|
||||
return MCSymbolRefExpr::Create(&SRE->getSymbol(), Variant, getContext());
|
||||
}
|
||||
|
||||
case MCExpr::Unary:
|
||||
llvm_unreachable("Can't handle unary expressions yet");
|
||||
|
||||
case MCExpr::Binary: {
|
||||
const MCBinaryExpr *BE = cast<MCBinaryExpr>(E);
|
||||
const MCExpr *LHS = applyPrefixToExpr(BE->getLHS(), Variant);
|
||||
const MCExpr *RHS = BE->getRHS();
|
||||
if (!LHS)
|
||||
return 0;
|
||||
|
||||
return MCBinaryExpr::Create(BE->getOpcode(), LHS, RHS, getContext());
|
||||
}
|
||||
}
|
||||
|
||||
assert(0 && "Invalid expression kind!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// \brief Given a mnemonic, split out possible predication code and carry
|
||||
/// setting letters to form a canonical mnemonic and flags.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user