Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 5 Jul 2016 16:08:47 -0400
From: Rich Felker <>
Subject: Re: build musl for armv7m

On Wed, Jun 22, 2016 at 05:21:54PM -0700, Zhao, Weiming wrote:
> diff --git a/src/string/arm/memcpy_le.S b/src/string/arm/memcpy_le.S
> index 4db4844..df9f5c8 100644
> --- a/src/string/arm/memcpy_le.S
> +++ b/src/string/arm/memcpy_le.S
> @@ -241,7 +241,12 @@ non_congruent:
>  	beq     2f
>  	ldr     r5, [r1], #4
>  	sub     r2, r2, #4
> +#if !defined(__thumb2__) || (__ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH > 7)
>  	orr     r4, r3, r5,             lsl lr
> +#else
> +	lsl     r4, r5, lr
> +	orr     r4, r3, r4
> +#endif

I don't see how this new logic makes sense at all. The goal is to use
the less-efficient code for the case where you're building as thumb
and thumb2 is not supported (i.e. limited to thumb1). That would be:

#if defined(__thumb2__) || !defined(__thumb__)
 	orr     r4, r3, r5,             lsl lr
	lsl     r4, r5, lr
	orr     r4, r3, r4

Does that look right?

I'm trying to wrap up the 1.1.15 release right now so I don't think
these changes will make it in, but I want to finish addressing _all_
of the thumb/cortex-m compat issues soon, hopefully in the next
release cycle. Let's start a new thread figuring out what's still


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.