Re: m68k: Simple loop compiles into boundless recursion with -O2

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

 



Thanks Stefan,

> I guess that the label here
> 
> > 1a:	4eb9 0000 0000 	jsr 0 <memset2>   /* <<<--- recursion
> 
> is printed incorrectly and instead a call to memset is done.

I think so too!

> objdump is known to use the first label it finds for an offset, and also
> often uses the wrong section... You should look at the assembly or run
> objdump with `-dr` to also print relocations.

Indeed.

> You may also use the compiler explorer here https://franke.ms/cex/  to
> view the results for some different m68k gcc versions. (note that the %
> for registers is omitted and labels have an underscore).

Neat, so it's printing Motorola (MRI) rather than MIT syntax too. :)

Incidentally, I recently contributed a (small) fix to m68k/Binutils, and
was wondering if anyone would be interested in improving its disassembler:

https://sourceware.org/pipermail/binutils/2021-January/114809.html

Perhaps your Amiga menu could be supplemented with Atari, eventually? ;)

A few weeks ago I begun TOS/libc <https://github.com/frno7/toslibc> and
it's quite functional already. TOS is rather small, after all, compared
to the Freemint project for instance. I provisionally use the restricted
Vlink to produce the program from the final object file produced by GCC
but I plan to write my own free TOS-linker, or, if possible, extend GCC.

Fredrik



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux