Re: Setting gp on pic code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Gonzalez wrote:

Hi,

I am trying to set the gp register on pic code as follows:

"la gp,_gp"

Disassembling the resulting code,

"lw gp,0(gp)"
Yes, this is normal... Use the following to set up the GP:
       //init GP
       lui     gp,%HI(_gp)
       ori     gp,%LO(_gp)


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux