Re: Assembler issues while compiling pkgsrc packages

Martin Husemann <[email protected]>
Newsgroups gmane.os.netbsd.ports.arm
Message-ID <[email protected]>
On Thu, Apr 18, 2024 at 02:37:32PM +0000, John Klos wrote:
> What can be done to stop the generation of assembler that doesn't work on
> earmv4?

Who does generate it? This is a common bug in hand written assembler files
when the author does not think back to armv4. The fix is pretty simple
(when no thumb code is involved), something like:

#if defined (_ARM_ARCH_4T) || defined(__ARM_ARCH_ISA_THUMB)
# define RET            bx              lr
#else
# define RET            mov             pc, lr
#endif

and then use RET everywhere instead of "bx lr".

Martin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.