Re: bal instruction in gcc 3.x

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

 



On Wed, 20 Jul 2005, Kishore K wrote:

> On the other hand, if I replace 
> 
> bal jump_to_label   
> 
> by 
> 
> la t9, jump_to_label
> jalr t9
> 
> I don't see any warning. What could be the reason ?

 Implicit assumptions in the "jal" macro.

> Can you suggest, what should be done to make the code safe for
> building on 64 bit processor.

 In this case:

	dla	t9, jump_to_label
	jalr	t9

Though we actually have auxiliary macros to make the resulting code 
readable.  So in the end you should really use something like this:

#include <asm/asm.h>

	PTR_LA	t9, jump_to_label
	jalr	t9

letting the whole mess be hidden in headers.

  Maciej


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

  Powered by Linux