All of lore.kernel.org
 help / color / mirror / Atom feed
From: a.ryabinin@samsung.com (Andrey Ryabinin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: memset: zero out upper bytes in r1
Date: Thu, 08 May 2014 11:59:02 +0400	[thread overview]
Message-ID: <536B3946.9070106@samsung.com> (raw)
In-Reply-To: <20140507234255.GA2050@afzal-ThinkPad-R50e>

On 05/08/14 03:42, Afzal Mohammed wrote:
> 
> int is to be converted to unsigned char in memset, would having above
> change immediately upon entry to memset rather than at a place where it
> won't always execute make intention clearer ? (although it doesn't make
> difference)
> 

I think it's better to keep it near other manipulations with r1.
Plus this will save us from executing extra instruction on 'memset -> 6 -> 5 -> return'
path (memset for size <= 3).


> ubfx r1, r1, #0, #8 would have given the needed typecasting, but seems
> it is available only on ARMv6T2 & above.
> 

Indeed. It might be wrapped it with #if #else, but it will be a bit ugly,
probably not worth to do.

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Ryabinin <a.ryabinin@samsung.com>
To: Afzal Mohammed <afzal.mohd.ma@gmail.com>
Cc: linux@arm.linux.org.uk, open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM PORT" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm: memset: zero out upper bytes in r1
Date: Thu, 08 May 2014 11:59:02 +0400	[thread overview]
Message-ID: <536B3946.9070106@samsung.com> (raw)
In-Reply-To: <20140507234255.GA2050@afzal-ThinkPad-R50e>

On 05/08/14 03:42, Afzal Mohammed wrote:
> 
> int is to be converted to unsigned char in memset, would having above
> change immediately upon entry to memset rather than at a place where it
> won't always execute make intention clearer ? (although it doesn't make
> difference)
> 

I think it's better to keep it near other manipulations with r1.
Plus this will save us from executing extra instruction on 'memset -> 6 -> 5 -> return'
path (memset for size <= 3).


> ubfx r1, r1, #0, #8 would have given the needed typecasting, but seems
> it is available only on ARMv6T2 & above.
> 

Indeed. It might be wrapped it with #if #else, but it will be a bit ugly,
probably not worth to do.





  reply	other threads:[~2014-05-08  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05  7:11 [PATCH] arm: memset: zero out upper bytes in r1 Andrey Ryabinin
2014-05-05  7:11 ` Andrey Ryabinin
2014-05-07 23:42 ` Afzal Mohammed
2014-05-07 23:42   ` Afzal Mohammed
2014-05-08  7:59   ` Andrey Ryabinin [this message]
2014-05-08  7:59     ` Andrey Ryabinin
2014-05-08 14:40     ` Andrey Ryabinin
2014-05-08 14:40       ` Andrey Ryabinin
2014-05-08  8:04 ` Vladimir Murzin
2014-05-08  8:38   ` Vladimir Murzin
2014-05-12  6:58     ` Andrey Ryabinin
2014-05-12  6:58       ` Andrey Ryabinin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=536B3946.9070106@samsung.com \
    --to=a.ryabinin@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.