rsmith added inline comments. ================ Comment at: lib/Basic/Targets.cpp:2548 @@ +2547,3 @@ + // All X86 processors but i386 have X87. + if (Kind != CK_i386) + setFeatureEnabledImpl(Features, "x87", true); ---------------- aturetsk wrote: > rsmith wrote: > > What about `CK_Generic`? Also, if `CK_i486` can be used for the 486SX, we > > need to exclude it here too. It looks (from wikipedia) like all the > > "WinChip" flavours of 486 have an x87 unit, but it'd be nice if someone > > could confirm that. Maybe we should have separate `CPUKind`s for 486 SX > > versus 486 DX. > Before this changeset clang would generate x87 instructions for Generic, i386 > and i486. So one can say they had FeatureX87 enabled implicitly. If that was > ok formerly why do we want to change that now? Wouldn't it be better to keep > clang's behavior unchanged? OK, if this means "x87 instructions probably work" (although they may be emulated in software) and not "x87 instructions definitely work", then we shouldn't be checking the CPU kind here at all. It looks like the former is how GCC handles this; it has `-mno-80387` to specify that we're building for an i386 with no support for x87 instructions. Should we handle that flag?
http://reviews.llvm.org/D13980 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits