public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Marcus Comstedt" <marcus@mc.pp.se>
To: binutils@sourceware.org
Cc: Marcus Comstedt <marcus@mc.pp.se>
Subject: [PATCH v4 7/8] RISC-V: Fix nop generation on big endian
Date: Tue,  5 Jan 2021 22:50:38 +0100	[thread overview]
Message-ID: <20210105215039.8053-8-marcus@mc.pp.se> (raw)
In-Reply-To: <20210105215039.8053-1-marcus@mc.pp.se>

gas/
	* config/tc-riscv.c: (riscv_make_nops):  Use fixed little
	endian memory access functions for storing instructions.
---
 gas/config/tc-riscv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index d7b7ae1ffb..55d5f1b50d 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -3276,13 +3276,13 @@ riscv_make_nops (char *buf, bfd_vma bytes)
   /* Use at most one 2-byte NOP.  */
   if ((bytes - i) % 4 == 2)
     {
-      md_number_to_chars (buf + i, RVC_NOP, 2);
+      number_to_chars_littleendian (buf + i, RVC_NOP, 2);
       i += 2;
     }
 
   /* Fill the remainder with 4-byte NOPs.  */
   for ( ; i < bytes; i += 4)
-    md_number_to_chars (buf + i, RISCV_NOP, 4);
+    number_to_chars_littleendian (buf + i, RISCV_NOP, 4);
 }
 
 /* Called from md_do_align.  Used to create an alignment frag in a
-- 
2.26.2


  parent reply	other threads:[~2021-01-05 21:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 21:50 [PATCH v4 0/8] RISC-V: Implement support for big endian targets Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 1/8] RISC-V: Support assembly and disassembly in big endian mode Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 2/8] RISC-V: Fix relocations " Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 3/8] RISC-V: Add big endian linker scripts Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 4/8] RISC-V: Recognize riscvNNbe* as target Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 5/8] RISC-V: Fix branch frag conversion on big endian Marcus Comstedt
2021-01-05 21:50 ` [PATCH v4 6/8] RISC-V: Mention -mbig-endian and -mlittle-endian in doc Marcus Comstedt
2021-01-05 21:50 ` Marcus Comstedt [this message]
2021-01-05 21:50 ` [PATCH v4 8/8] RISC-V: Fix testsuite failures Marcus Comstedt
2021-01-06 10:22 ` [PATCH v4 0/8] RISC-V: Implement support for big endian targets Nelson Chu
2021-01-06 10:36   ` Marcus Comstedt

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=20210105215039.8053-8-marcus@mc.pp.se \
    --to=marcus@mc.pp.se \
    --cc=binutils@sourceware.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).