* m68k assembly question: jsr vs. bsr
@ 2023-02-01 22:17 John Paul Adrian Glaubitz
2023-02-02 7:44 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-02-01 22:17 UTC (permalink / raw)
To: Debian m68k, linux-m68k
Hi!
Can anyone answer this question regarding the difference between "bsr" and "jsr":
> https://github.com/llvm/llvm-project/issues/60354#issuecomment-1412018845
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: m68k assembly question: jsr vs. bsr
2023-02-01 22:17 m68k assembly question: jsr vs. bsr John Paul Adrian Glaubitz
@ 2023-02-02 7:44 ` Geert Uytterhoeven
2023-02-02 18:54 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-02-02 7:44 UTC (permalink / raw)
To: John Paul Adrian Glaubitz; +Cc: Debian m68k, linux-m68k
Hi Adrian,
On Wed, Feb 1, 2023 at 11:17 PM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
> Can anyone answer this question regarding the difference between "bsr" and "jsr":
>
> > https://github.com/llvm/llvm-project/issues/60354#issuecomment-1412018845
"jsr" is an absolute jump to a subroutine.
"bsr" is a relative jump (8-bit, 16-bit, or 32-bit signed offset) to a
subroutine,
i.e. typically for calling a nearby function.
There's also "jbsr", which is an assembler macro that picks the most
appropriate: bsr does not need relocation, but bsr.l is 68020+ only.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: m68k assembly question: jsr vs. bsr
2023-02-02 7:44 ` Geert Uytterhoeven
@ 2023-02-02 18:54 ` Andreas Schwab
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2023-02-02 18:54 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: John Paul Adrian Glaubitz, Debian m68k, linux-m68k
On Feb 02 2023, Geert Uytterhoeven wrote:
> Hi Adrian,
>
> On Wed, Feb 1, 2023 at 11:17 PM John Paul Adrian Glaubitz
> <glaubitz@physik.fu-berlin.de> wrote:
>> Can anyone answer this question regarding the difference between "bsr" and "jsr":
>>
>> > https://github.com/llvm/llvm-project/issues/60354#issuecomment-1412018845
>
> "jsr" is an absolute jump to a subroutine.
> "bsr" is a relative jump (8-bit, 16-bit, or 32-bit signed offset) to a
> subroutine,
> i.e. typically for calling a nearby function.
jsr/jmp also take pcrel, but bsr/bra with 8-bit disp is shorter.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-02 19:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 22:17 m68k assembly question: jsr vs. bsr John Paul Adrian Glaubitz
2023-02-02 7:44 ` Geert Uytterhoeven
2023-02-02 18:54 ` Andreas Schwab
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).