* question on assembly on SH4 (linux portage)
@ 2003-12-08 14:10 Frederic Marmond
2003-12-11 7:43 ` Frederic Marmond
0 siblings, 1 reply; 2+ messages in thread
From: Frederic Marmond @ 2003-12-08 14:10 UTC (permalink / raw)
To: linux-assembly
Hi,
I'm working on a SH4 portage, and I have a problem in a function.
Using a BSR, we seems to be limited to a 12bits jump.
How may I call a far subroutine?
thanks for help...
Fred
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question on assembly on SH4 (linux portage)
2003-12-08 14:10 question on assembly on SH4 (linux portage) Frederic Marmond
@ 2003-12-11 7:43 ` Frederic Marmond
0 siblings, 0 replies; 2+ messages in thread
From: Frederic Marmond @ 2003-12-11 7:43 UTC (permalink / raw)
To: fmarmond; +Cc: linux-assembly
Well, it seems nobody works on SH4 here? ;)
For information in the archives, opcodes for SH4/SH5 can be found here.
http://www.superh.com/documentation/documents.php?id=17
For self-answering (if anybody wants to switch from x86 to sh4 one day):
BSR and BSRF are for relative jumps, we can use JSR for absolute jumps.
Integration in a C/C++ prog is pretty easy, just have to know that a JSR
needs a indirection (mov.l function_to_call_ptr,rx; jsr @rx) (instead
of: bsr function_to_call)
After few hours working on SH4 assembly, it is not too complexe and
powerfull enough to make it fun to code!
Fred
Frederic Marmond wrote:
> Hi,
> I'm working on a SH4 portage, and I have a problem in a function.
> Using a BSR, we seems to be limited to a 12bits jump.
> How may I call a far subroutine?
>
> thanks for help...
>
> Fred
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-11 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-08 14:10 question on assembly on SH4 (linux portage) Frederic Marmond
2003-12-11 7:43 ` Frederic Marmond
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).