On 01/22/2011 10:48 AM, Sergei Trofimovich wrote:
> I've attached dirty patch. It has not very nice comments, tabs and spaces yet.

Steve perhaps should weigh in here...

> As I understand, TARGET_AUTO_PIC, TARGET_CONSTANT_GP,
> TARGET_NO_PIC should somehow fall into different memory models.
> I don't get exact difference between them.

Yes, auto-pic and constant-gp are slightly different, but ...

> i386  distincts code models in a more fine grained manner:
> CMODEL_* and  CMODEL_*_PIC. Maybe, ia64 should have similar distinction?

With

  SMALL_PIC,            // 21-bit call offsets, 21-bit gp offsets
  MEDIUM,               // 21-bit call offsets, 64-bit absolute data
  MEDIUM_PIC,           // 21-bit call offsets, 64-bit gp offsets
  LARGE,                // 64-bit call offsets, 64-bit absolute data
  LARGE_PIC,            // 64-bit call offsets, 64-bit gp offsets

(no non-pic small), then -mno-pic can be absorbed as MEDIUM.  The
auto-pic option is MEDIUM_PIC, but with a special bit of code in 
the prologue to setup the gp register.

> AFAIU R_IA64_PCREL21B won't let us make calls more, than 2^21 bundles away.
> (~16 megabytes up and down).
> What kind of calls should be emitted in this case? call_gp/call_value_gp?

        brl.call.sptk.many b0 = foo#

which is another X-format insn with a 64-bit offset.


r~

Reply via email to