From: Dimitar Dimitrov <dimitar@dinux.eu>
To: gcc-patches@gcc.gnu.org
Cc: Dimitar Dimitrov <dimitar@dinux.eu>
Subject: [COMMITTED 7/9] pru: Use HOST_WIDE_INT_1U macro
Date: Tue, 7 May 2024 10:22:39 +0300 [thread overview]
Message-ID: <fa704a5afa5698aae34ab9315c5bcc612b69f78d.1715065537.git.dimitar@dinux.eu> (raw)
In-Reply-To: <cover.1715065537.git.dimitar@dinux.eu>
Use the HOST_WIDE_INT_1U macro instead of literal 1 when constructing
constants for RTL.
gcc/ChangeLog:
* config/pru/pru.md (lshrdi3): Use HOST_WIDE_INT_1U macro.
(ashldi3): Ditto.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
gcc/config/pru/pru.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/config/pru/pru.md b/gcc/config/pru/pru.md
index 2ceea2e7b1c..db7a5af6875 100644
--- a/gcc/config/pru/pru.md
+++ b/gcc/config/pru/pru.md
@@ -870,7 +870,8 @@ (define_expand "lshrdi3"
JUMP_LABEL (j) = skip_hiset_label;
LABEL_NUSES (skip_hiset_label)++;
- emit_insn (gen_iorsi3 (dst_lo, dst_lo, GEN_INT (1 << 31)));
+ const HOST_WIDE_INT bit31_mask = HOST_WIDE_INT_1U << 31;
+ emit_insn (gen_iorsi3 (dst_lo, dst_lo, GEN_INT (bit31_mask)));
emit_label (skip_hiset_label);
emit_insn (gen_rtx_SET (dst_hi,
gen_rtx_LSHIFTRT (SImode, src_hi, const1_rtx)));
@@ -959,7 +960,8 @@ (define_expand "ashldi3"
JUMP_LABEL (j) = skip_hiset_label;
LABEL_NUSES (skip_hiset_label)++;
- emit_insn (gen_iorsi3 (dst_hi, dst_hi, GEN_INT (1 << 0)));
+ const HOST_WIDE_INT bit0_mask = HOST_WIDE_INT_1U << 0;
+ emit_insn (gen_iorsi3 (dst_hi, dst_hi, GEN_INT (bit0_mask)));
emit_label (skip_hiset_label);
emit_insn (gen_rtx_SET (dst_lo,
gen_rtx_ASHIFT (SImode, src_lo, const1_rtx)));
--
2.45.0
next prev parent reply other threads:[~2024-05-07 7:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 7:22 [COMMITTED 0/9] Small cleanups and improvements for PRU backend Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 1/9] pru: Implement TARGET_ADDRESS_COST Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 2/9] pru: Implement zero fill for 64-bit registers Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 3/9] pru: Optimize the extzv and insv patterns Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 4/9] pru: Add pattern variants for zero extending destination Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 5/9] pru: Skip register save if function will not return Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 6/9] pru: Drop usage of ATTRIBUTE_UNUSED Dimitar Dimitrov
2024-05-07 7:22 ` Dimitar Dimitrov [this message]
2024-05-07 7:22 ` [COMMITTED 8/9] pru: Refactor to use passes definition file Dimitar Dimitrov
2024-05-07 7:22 ` [COMMITTED 9/9] pru: New validation pass for minrt Dimitar Dimitrov
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=fa704a5afa5698aae34ab9315c5bcc612b69f78d.1715065537.git.dimitar@dinux.eu \
--to=dimitar@dinux.eu \
--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).