mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Mips specific llvm assembler support for branch and jump instructions.
Test case included. Contributer: Vladimir Medic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -143,7 +143,11 @@ getBranchTargetOpValue(const MCInst &MI, unsigned OpNo,
|
||||
SmallVectorImpl<MCFixup> &Fixups) const {
|
||||
|
||||
const MCOperand &MO = MI.getOperand(OpNo);
|
||||
assert(MO.isExpr() && "getBranchTargetOpValue expects only expressions");
|
||||
|
||||
// If the destination is an immediate, we have nothing to do.
|
||||
if (MO.isImm()) return MO.getImm();
|
||||
assert(MO.isExpr() &&
|
||||
"getBranchTargetOpValue expects only expressions or immediates");
|
||||
|
||||
const MCExpr *Expr = MO.getExpr();
|
||||
Fixups.push_back(MCFixup::Create(0, Expr,
|
||||
@@ -159,7 +163,10 @@ getJumpTargetOpValue(const MCInst &MI, unsigned OpNo,
|
||||
SmallVectorImpl<MCFixup> &Fixups) const {
|
||||
|
||||
const MCOperand &MO = MI.getOperand(OpNo);
|
||||
assert(MO.isExpr() && "getJumpTargetOpValue expects only expressions");
|
||||
// If the destination is an immediate, we have nothing to do.
|
||||
if (MO.isImm()) return MO.getImm();
|
||||
assert(MO.isExpr() &&
|
||||
"getJumpTargetOpValue expects only expressions or an immediate");
|
||||
|
||||
const MCExpr *Expr = MO.getExpr();
|
||||
Fixups.push_back(MCFixup::Create(0, Expr,
|
||||
|
||||
Reference in New Issue
Block a user