* [PATCH v1] LoongArch: Fix bug for tmpdir-g++.dg-struct-layout-1/t033.
@ 2022-04-11 7:08 Lulu Cheng
2022-04-15 7:01 ` Lulu Cheng
0 siblings, 1 reply; 2+ messages in thread
From: Lulu Cheng @ 2022-04-11 7:08 UTC (permalink / raw)
To: gcc-patches; +Cc: xry111, xuchenghua, chenglulu
From: chenglulu <chenglulu@loongson.cn>
gcc/ChangeLog:
* config/loongarch/loongarch.cc: Fix bug for
tmpdir-g++.dg-struct-layout-1/t033.
---
gcc/config/loongarch/loongarch.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index 6e24111a79d..f22150a60cc 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -473,13 +473,14 @@ loongarch_pass_aggregate_in_fpr_and_gpr_p (const_tree type,
static rtx
loongarch_pass_fpr_single (machine_mode type_mode, unsigned regno,
- machine_mode value_mode)
+ machine_mode value_mode,
+ HOST_WIDE_INT offset)
{
rtx x = gen_rtx_REG (value_mode, regno);
if (type_mode != value_mode)
{
- x = gen_rtx_EXPR_LIST (VOIDmode, x, const0_rtx);
+ x = gen_rtx_EXPR_LIST (VOIDmode, x, GEN_INT (offset));
x = gen_rtx_PARALLEL (type_mode, gen_rtvec (1, x));
}
return x;
@@ -539,7 +540,8 @@ loongarch_get_arg_info (struct loongarch_arg_info *info,
{
case 1:
return loongarch_pass_fpr_single (mode, fregno,
- TYPE_MODE (fields[0].type));
+ TYPE_MODE (fields[0].type),
+ fields[0].offset);
case 2:
return loongarch_pass_fpr_pair (mode, fregno,
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] LoongArch: Fix bug for tmpdir-g++.dg-struct-layout-1/t033.
2022-04-11 7:08 [PATCH v1] LoongArch: Fix bug for tmpdir-g++.dg-struct-layout-1/t033 Lulu Cheng
@ 2022-04-15 7:01 ` Lulu Cheng
0 siblings, 0 replies; 2+ messages in thread
From: Lulu Cheng @ 2022-04-15 7:01 UTC (permalink / raw)
To: gcc-patches; +Cc: xry111, xuchenghua
Hi,all: This patch has been merged into the master branch. Thanks! Lulu
Cheng 在 2022/4/11 下午3:08, Lulu Cheng 写道:
> From: chenglulu <chenglulu@loongson.cn>
>
> gcc/ChangeLog:
>
> * config/loongarch/loongarch.cc: Fix bug for
> tmpdir-g++.dg-struct-layout-1/t033.
> ---
> gcc/config/loongarch/loongarch.cc | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
> index 6e24111a79d..f22150a60cc 100644
> --- a/gcc/config/loongarch/loongarch.cc
> +++ b/gcc/config/loongarch/loongarch.cc
> @@ -473,13 +473,14 @@ loongarch_pass_aggregate_in_fpr_and_gpr_p (const_tree type,
>
> static rtx
> loongarch_pass_fpr_single (machine_mode type_mode, unsigned regno,
> - machine_mode value_mode)
> + machine_mode value_mode,
> + HOST_WIDE_INT offset)
> {
> rtx x = gen_rtx_REG (value_mode, regno);
>
> if (type_mode != value_mode)
> {
> - x = gen_rtx_EXPR_LIST (VOIDmode, x, const0_rtx);
> + x = gen_rtx_EXPR_LIST (VOIDmode, x, GEN_INT (offset));
> x = gen_rtx_PARALLEL (type_mode, gen_rtvec (1, x));
> }
> return x;
> @@ -539,7 +540,8 @@ loongarch_get_arg_info (struct loongarch_arg_info *info,
> {
> case 1:
> return loongarch_pass_fpr_single (mode, fregno,
> - TYPE_MODE (fields[0].type));
> + TYPE_MODE (fields[0].type),
> + fields[0].offset);
>
> case 2:
> return loongarch_pass_fpr_pair (mode, fregno,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-15 7:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 7:08 [PATCH v1] LoongArch: Fix bug for tmpdir-g++.dg-struct-layout-1/t033 Lulu Cheng
2022-04-15 7:01 ` Lulu Cheng
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).