[llvm] r222897 - Commit back the correct bits of r222760 (was r222538).

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Nov 27 12:53:08 PST 2014


>> Allow FDE references outside the +/-2GB range supported by PC relative
>> offsets for code models other than small/medium. For JIT application,
>> memory layout is less controlled and can result in truncations
>> otherwise.
>
> Except that this is wrong again. E.g. for llvm-mc, CodeModel::Default is
> always used. The original part of checking Small||Medium is correct --

Not it wasn't, because:

> those are the only code models that provide the 31bit/32bit limitation.
> The architectural issue here is that CodeModel::Default and
> CodeModel::JITDefault are only overwritten during codegen creation.
> Should they be attributes of the Target? Can they change with the ABI?

As you point out, Default and JITDefault make it this far. I agree it
would be nice to map them to Small, Medium, Large or Kernel before
getting here and then this code can just assert that it has one of the
4 known values.

Before that mapping is implemented however, we cannot simply produce
the wrong result and change the tests.

Cheers,
Rafael



More information about the llvm-commits mailing list