mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Fix bogus assertion failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d66944388
commit
ac573f61b4
@ -225,7 +225,7 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
||||
MCE.emitByte(BaseOpcode + getX86RegNum(MI.getOperand(0).getReg()));
|
||||
if (MI.getNumOperands() == 2) {
|
||||
unsigned Size = 4;
|
||||
if (Value *V = MI.getOperand(1).getVRegValue()) {
|
||||
if (Value *V = MI.getOperand(1).getVRegValueOrNull()) {
|
||||
assert(Size == 4 && "Don't know how to emit non-pointer values!");
|
||||
MCE.emitGlobalAddress(cast<GlobalValue>(V));
|
||||
} else {
|
||||
|
@ -96,7 +96,7 @@ static void printOp(std::ostream &O, const MachineOperand &MO,
|
||||
const MRegisterInfo &RI) {
|
||||
switch (MO.getType()) {
|
||||
case MachineOperand::MO_VirtualRegister:
|
||||
if (Value *V = MO.getVRegValue()) {
|
||||
if (Value *V = MO.getVRegValueOrNull()) {
|
||||
O << "<" << V->getName() << ">";
|
||||
return;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ static void printOp(std::ostream &O, const MachineOperand &MO,
|
||||
const MRegisterInfo &RI) {
|
||||
switch (MO.getType()) {
|
||||
case MachineOperand::MO_VirtualRegister:
|
||||
if (Value *V = MO.getVRegValue()) {
|
||||
if (Value *V = MO.getVRegValueOrNull()) {
|
||||
O << "<" << V->getName() << ">";
|
||||
return;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
||||
MCE.emitByte(BaseOpcode + getX86RegNum(MI.getOperand(0).getReg()));
|
||||
if (MI.getNumOperands() == 2) {
|
||||
unsigned Size = 4;
|
||||
if (Value *V = MI.getOperand(1).getVRegValue()) {
|
||||
if (Value *V = MI.getOperand(1).getVRegValueOrNull()) {
|
||||
assert(Size == 4 && "Don't know how to emit non-pointer values!");
|
||||
MCE.emitGlobalAddress(cast<GlobalValue>(V));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user