public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8514] RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems.
@ 2024-01-30 6:39 Christoph Mテシllner
0 siblings, 0 replies; only message in thread
From: Christoph Mテシllner @ 2024-01-30 6:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4ac00b7c809ca70775a04708863b9101d94af5c2
commit r14-8514-g4ac00b7c809ca70775a04708863b9101d94af5c2
Author: Jin Ma <jinma@linux.alibaba.com>
Date: Mon Jan 29 17:57:00 2024 +0800
RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems.
When using '%ld' to print 'long long int' variable, 'fprintf' will
produce messy output on a 32-bit system, in an incorrect instruction
being generated, such as 'th.lwib a1,(a0),-16,4294967295'. And the
following error occurred during compilation:
Assembler messages:
Error: improper immediate value (18446744073709551615)
gcc/ChangeLog:
* config/riscv/thead.cc (th_print_operand_address): Change %ld
to %lld.
Diff:
---
gcc/config/riscv/thead.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/thead.cc b/gcc/config/riscv/thead.cc
index 2955bc5f8a9b..e4b8c37bc28e 100644
--- a/gcc/config/riscv/thead.cc
+++ b/gcc/config/riscv/thead.cc
@@ -1141,7 +1141,7 @@ th_print_operand_address (FILE *file, machine_mode mode, rtx x)
return true;
case ADDRESS_REG_WB:
- fprintf (file, "(%s),%ld,%u", reg_names[REGNO (addr.reg)],
+ fprintf (file, "(%s),"HOST_WIDE_INT_PRINT_DEC",%u", reg_names[REGNO (addr.reg)],
INTVAL (addr.offset) >> addr.shift, addr.shift);
return true;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 6:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 6:39 [gcc r14-8514] RISC-V: THEAD: Fix improper immediate value for MODIFY_DISP instruction on 32-bit systems Christoph Mテシllner
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).