Re: merge two insts into one in a time sensitive routing

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

 



On Tue, Jan 25, 2011 at 05:04:01PM +0800, Ray Will wrote:

> The following two lines should be merged into one inst. It is the tlb
> refill handler, quite time sensitive.
> 569         uasm_i_lui(p, tmp, PM_HUGE_MASK >> 16);
> 570         uasm_i_ori(p, tmp, tmp, PM_HUGE_MASK & 0xffff);
> 
> Merged to
>  uasm_i_lui(p, tmp, ((PM_HUGE_MASK & 0xffff) | (PM_HUGE_MASK >> 16));

With 4K pages (=> 1M huge pages) we'd want the value 0x001fe000 to be
loaded.  Your change results in in a LUI $tmp, 0xe01f instruction being
generated and that's an illegal value for the c0_pagemask register so
the operation is now architecturally undefined.  Similar for other
page sizes.

All possible values for PM_HUGE_MASK will have bits set in the upper and
lower 16 halves of the register so there will always two instructions be
required to load the pagemask value.

  Ralf



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

  Powered by Linux