projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ac4dfe
)
RISC-V: Fix riscv_subword() for big endian
author
Marcus Comstedt
<marcus@mc.pp.se>
Fri, 19 Mar 2021 19:49:09 +0000
(20:49 +0100)
committer
Kito Cheng
<kito.cheng@sifive.com>
Tue, 23 Mar 2021 09:32:41 +0000
(17:32 +0800)
gcc/
* config/riscv/riscv.c (riscv_subword): Take endianness into
account when calculating the byte offset.
gcc/config/riscv/riscv.c
patch
|
blob
|
history
diff --git
a/gcc/config/riscv/riscv.c
b/gcc/config/riscv/riscv.c
index
fe48db7
..
17cdf70
100644
(file)
--- a/
gcc/config/riscv/riscv.c
+++ b/
gcc/config/riscv/riscv.c
@@
-1966,7
+1966,7
@@
riscv_address_cost (rtx addr, machine_mode mode,
rtx
riscv_subword (rtx op, bool high_p)
{
- unsigned int byte =
high_p
? UNITS_PER_WORD : 0;
+ unsigned int byte =
(high_p != BYTES_BIG_ENDIAN)
? UNITS_PER_WORD : 0;
machine_mode mode = GET_MODE (op);
if (mode == VOIDmode)