public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Christophe Lyon <christophe.lyon@linaro.org>,
	gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)
Date: Tue, 12 Nov 2019 11:27:00 -0000	[thread overview]
Message-ID: <a78f6289-6ba0-c0bf-0ea3-944aba235ba9@arm.com> (raw)
In-Reply-To: <CAKdteObyFGLY0bp7z5saUJca-Wy0OOhEkT75Ffv9SMzrJjJUhg@mail.gmail.com>

On 18/10/2019 14:18, Christophe Lyon wrote:
> +thumb1_gen_const_int (rtx op0, HOST_WIDE_INT op1)
> +{
> +  bool mov_done_p = false;
> +  int i;
> +
> +  /* Emit upper 3 bytes if needed.  */
> +  for (i = 0; i < 3; i++)
> +    {
> +      int byte = (op1 >> (8 * (3 - i))) & 0xff;
> +
> +      if (byte)
> +	{
> +	  emit_set_insn (op0, mov_done_p
> +			 ? gen_rtx_PLUS (SImode,op0, GEN_INT (byte))
> +			 : GEN_INT (byte));
> +	  mov_done_p = true;
> +	}
> +
> +      if (mov_done_p)
> +	emit_set_insn (op0, gen_rtx_ASHIFT (SImode, op0, GEN_INT (8)));
> +    }
> +
> +  /* Emit lower byte if needed.  */
> +  if (!mov_done_p)
> +    emit_set_insn (op0, GEN_INT (op1 & 0xff));
> +  else if (op1 & 0xff)
> +    emit_set_insn (op0, gen_rtx_PLUS (SImode, op0, GEN_INT (op1 & 0xff)));
> +}
> +

What about Armv8-m.baseline, which has movw/movt?

R.

  parent reply	other threads:[~2019-11-12 11:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 13:18 Christophe Lyon
2019-11-03 15:07 ` Christophe Lyon
2019-11-12  9:12   ` Christophe Lyon
2019-11-12 10:35 ` Kyrill Tkachov
2019-11-13 14:42   ` Christophe Lyon
2019-11-12 11:17 ` Richard Earnshaw (lists)
2019-11-13 14:46   ` Christophe Lyon
2019-11-18  9:04     ` Christophe Lyon
2019-11-26 15:39       ` Christophe Lyon
2019-12-05 10:13         ` Christophe Lyon
2019-12-11 17:19           ` Christophe Lyon
2019-12-17 10:26             ` Christophe Lyon
2019-12-17 11:02       ` Kyrill Tkachov
2019-12-17 14:36         ` Christophe Lyon
2019-12-17 15:39           ` Kyrill Tkachov
2019-12-17 15:51             ` Christophe Lyon
2020-01-13 15:19             ` Kyrill Tkachov
2020-01-14 14:09               ` Christophe Lyon
2020-01-14 14:10                 ` Kyrill Tkachov
2020-01-14 14:38                   ` Christophe Lyon
2019-11-12 11:27 ` Richard Earnshaw (lists) [this message]
2019-11-13 14:49   ` Christophe Lyon

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=a78f6289-6ba0-c0bf-0ea3-944aba235ba9@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).