forked from OSchip/llvm-project
parent
724b81087d
commit
84e5bf0c95
|
@ -42985,6 +42985,14 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
|||
// GCC Constraint Letters
|
||||
switch (Constraint[0]) {
|
||||
default: break;
|
||||
// 'A' means [ER]AX + [ER]DX.
|
||||
case 'A':
|
||||
if (Subtarget.is64Bit())
|
||||
return std::make_pair(X86::RAX, &X86::GR64_ADRegClass);
|
||||
assert((Subtarget.is32Bit() || Subtarget.is16Bit()) &&
|
||||
"Expecting 64, 32 or 16 bit subtarget");
|
||||
return std::make_pair(X86::EAX, &X86::GR32_ADRegClass);
|
||||
|
||||
// TODO: Slight differences here in allocation order and leaving
|
||||
// RIP in the class. Do they matter any more here than they do
|
||||
// in the normal allocation?
|
||||
|
@ -43184,14 +43192,6 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
|||
if (StringRef("{fpsr}").equals_lower(Constraint))
|
||||
return std::make_pair(X86::FPSW, &X86::FPCCRRegClass);
|
||||
|
||||
// 'A' means [ER]AX + [ER]DX.
|
||||
if (Constraint == "A") {
|
||||
if (Subtarget.is64Bit())
|
||||
return std::make_pair(X86::RAX, &X86::GR64_ADRegClass);
|
||||
assert((Subtarget.is32Bit() || Subtarget.is16Bit()) &&
|
||||
"Expecting 64, 32 or 16 bit subtarget");
|
||||
return std::make_pair(X86::EAX, &X86::GR32_ADRegClass);
|
||||
}
|
||||
return Res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue