public:
X86TargetInfo(const llvm::Triple &Triple) : TargetInfo(Triple) {
BigEndian = false;
- LongDoubleFormat = &llvm::APFloat::x87DoubleExtended;
+ LongDoubleFormat = Triple.isOSIAMCU() ? &llvm::APFloat::IEEEdouble
+ : &llvm::APFloat::x87DoubleExtended;
}
unsigned getFloatEvalMethod() const override {
// X87 evaluates with 80 bits "long double" precision.
}
if (CPU >= CK_i586)
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+
+ if (getTriple().isOSIAMCU()) {
+ Builder.defineMacro("__iamcu");
+ Builder.defineMacro("__iamcu__");
+ }
}
bool X86TargetInfo::hasFeature(StringRef Feature) const {
// insane.
// CHECK-LABEL: define i32 @varArgs(i32 inreg %i1, ...)
int varArgs(int i1, ...) { return i1; }
+
+// CHECK-LABEL: define double @longDoubleArg(double %ld1)
+long double longDoubleArg(long double ld1) { return ld1; }
+