[Top] [All Lists]

bal instruction in gcc 3.x

Subject: bal instruction in gcc 3.x
From: Kishore K <>
Date: Tue, 19 Jul 2005 22:00:20 +0530
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta;; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=naMJeIiUZAmYXUd+/7mKtj1PSe5G6hAIOdZnZfKH9mFWdGDJDBTUCFMqjgQGSPHyg37jfHpjSp37lHjWQMzY+t8TnQFIf483G/nBeTtziv4c/XP6EbptP86kgsZlRc0l4So/yznhgWCXYlPjzTl6evUOF6Jnq9wN9laqhVRKlcU=
Original-recipient: rfc822;
Reply-to: Kishore K <>
We are facing a problem when U-boot is compiled with gcc 3.x

U-boot  uses the following instruction in one of the files.

bal jump_to_symbol

This code gets compiled without any problem with gcc2. However, if I
compile the code
with gcc3, it exits with the error "Cannot branch to unknown symbol".

What should we do to circumvent this problem ?

I replaced 

bal jump_to_symbol 


la t9, jump_to_symbol
jalr t9

Then code gets compiled properly without any problem. Please let me
know, whether this
is correct way of fixing the problem. I am newbie to MIPS assembly
language. Why this
change is required with gcc 3.x compiler ?


<Prev in Thread] Current Thread [Next in Thread>