forked from OSchip/llvm-project
parent
6f043b90ea
commit
f6a6966cd2
|
@ -32,6 +32,7 @@
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
|
#include "llvm/ADT/StringExtras.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
// FIXME: temporary.
|
// FIXME: temporary.
|
||||||
|
@ -5533,8 +5534,16 @@ X86TargetLowering::getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||||
std::pair<unsigned, const TargetRegisterClass*> Res;
|
std::pair<unsigned, const TargetRegisterClass*> Res;
|
||||||
Res = TargetLowering::getRegForInlineAsmConstraint(Constraint, VT);
|
Res = TargetLowering::getRegForInlineAsmConstraint(Constraint, VT);
|
||||||
|
|
||||||
// Not found? Bail out.
|
// Not found as a standard register?
|
||||||
if (Res.second == 0) return Res;
|
if (Res.second == 0) {
|
||||||
|
// GCC calls "st(0)" just plain "st".
|
||||||
|
if (StringsEqualNoCase("{st}", Constraint)) {
|
||||||
|
Res.first = X86::ST0;
|
||||||
|
Res.second = X86::RSTRegisterClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Res;
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, check to see if this is a register class of the wrong value
|
// Otherwise, check to see if this is a register class of the wrong value
|
||||||
// type. For example, we want to map "{ax},i32" -> {eax}, we don't want it to
|
// type. For example, we want to map "{ax},i32" -> {eax}, we don't want it to
|
||||||
|
|
Loading…
Reference in New Issue