mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Add support for "m" inline asm constraints.
llvm-svn: 28728
This commit is contained in:
parent
8affee249a
commit
82b121e762
@ -128,7 +128,13 @@ namespace {
|
|||||||
bool TryFoldLoad(SDOperand P, SDOperand N,
|
bool TryFoldLoad(SDOperand P, SDOperand N,
|
||||||
SDOperand &Base, SDOperand &Scale,
|
SDOperand &Base, SDOperand &Scale,
|
||||||
SDOperand &Index, SDOperand &Disp);
|
SDOperand &Index, SDOperand &Disp);
|
||||||
|
/// SelectInlineAsmMemoryOperand - Implement addressing mode selection for
|
||||||
|
/// inline asm expressions.
|
||||||
|
virtual bool SelectInlineAsmMemoryOperand(const SDOperand &Op,
|
||||||
|
char ConstraintCode,
|
||||||
|
std::vector<SDOperand> &OutOps,
|
||||||
|
SelectionDAG &DAG);
|
||||||
|
|
||||||
void EmitSpecialCodeForMain(MachineBasicBlock *BB, MachineFrameInfo *MFI);
|
void EmitSpecialCodeForMain(MachineBasicBlock *BB, MachineFrameInfo *MFI);
|
||||||
|
|
||||||
inline void getAddressOperands(X86ISelAddressMode &AM, SDOperand &Base,
|
inline void getAddressOperands(X86ISelAddressMode &AM, SDOperand &Base,
|
||||||
@ -876,6 +882,28 @@ void X86DAGToDAGISel::Select(SDOperand &Result, SDOperand N) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool X86DAGToDAGISel::
|
||||||
|
SelectInlineAsmMemoryOperand(const SDOperand &Op, char ConstraintCode,
|
||||||
|
std::vector<SDOperand> &OutOps, SelectionDAG &DAG){
|
||||||
|
SDOperand Op0, Op1, Op2, Op3;
|
||||||
|
switch (ConstraintCode) {
|
||||||
|
case 'o': // offsetable ??
|
||||||
|
case 'v': // not offsetable ??
|
||||||
|
default: return true;
|
||||||
|
case 'm': // memory
|
||||||
|
if (!SelectAddr(Op, Op0, Op1, Op2, Op3))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
OutOps.resize(4);
|
||||||
|
Select(OutOps[0], Op0);
|
||||||
|
Select(OutOps[1], Op1);
|
||||||
|
Select(OutOps[2], Op2);
|
||||||
|
Select(OutOps[3], Op3);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// createX86ISelDag - This pass converts a legalized DAG into a
|
/// createX86ISelDag - This pass converts a legalized DAG into a
|
||||||
/// X86-specific DAG, ready for instruction scheduling.
|
/// X86-specific DAG, ready for instruction scheduling.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user