mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-21 03:28:31 +00:00
The way we are trying to figure out banksel immediate operand may yield different results for different type of insns. This will eventually need to be changed but currently let us prevent the crash in cases of incorrect detection of banksel operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c8382ce9a
commit
37831d0a12
@ -77,8 +77,9 @@ bool PIC16AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
||||
// This is not true for external variables as section names for global
|
||||
// variables in all files are same at this time. For eg. initialized
|
||||
// data in put in idata.# section in all files.
|
||||
if (((int)BS.getImm() == 1) &&
|
||||
((Op.isGlobal() && Op.getGlobal()->hasExternalLinkage()) ||
|
||||
if ((BS.getType() == MachineOperand::MO_Immediate
|
||||
&& (int)BS.getImm() == 1)
|
||||
&& ((Op.isGlobal() && Op.getGlobal()->hasExternalLinkage()) ||
|
||||
(NewBank.compare(CurBank) != 0))) {
|
||||
O << "\tbanksel ";
|
||||
printOperand(MI, BankSelVar);
|
||||
|
Loading…
Reference in New Issue
Block a user