Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
951d8c8a
Commit
951d8c8a
authored
Jun 22, 2016
by
Eric Botcazou
Committed by
Eric Botcazou
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* function.c (assign_parm_setup_reg): Prevent sharing in another case.
From-SVN: r237703
parent
b60fc3bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
2 deletions
+51
-2
gcc/ChangeLog
+4
-0
gcc/function.c
+5
-2
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/guality/param-5.c
+38
-0
No files found.
gcc/ChangeLog
View file @
951d8c8a
2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
* function.c (assign_parm_setup_reg): Prevent sharing in another case.
2016-06-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* config/i386/i386.c (print_reg): Emit an error message on attempt to
...
...
gcc/function.c
View file @
951d8c8a
...
...
@@ -3314,6 +3314,8 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
set_mem_attributes
(
parmreg
,
parm
,
1
);
}
/* We need to preserve an address based on VIRTUAL_STACK_VARS_REGNUM for
the debug info in case it is not legitimate. */
if
(
GET_MODE
(
parmreg
)
!=
GET_MODE
(
rtl
))
{
rtx
tempreg
=
gen_reg_rtx
(
GET_MODE
(
rtl
));
...
...
@@ -3323,7 +3325,8 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
all
->
last_conversion_insn
);
emit_move_insn
(
tempreg
,
rtl
);
tempreg
=
convert_to_mode
(
GET_MODE
(
parmreg
),
tempreg
,
unsigned_p
);
emit_move_insn
(
parmreg
,
tempreg
);
emit_move_insn
(
MEM_P
(
parmreg
)
?
copy_rtx
(
parmreg
)
:
parmreg
,
tempreg
);
all
->
first_conversion_insn
=
get_insns
();
all
->
last_conversion_insn
=
get_last_insn
();
end_sequence
();
...
...
@@ -3331,7 +3334,7 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
did_conversion
=
true
;
}
else
emit_move_insn
(
parmreg
,
rtl
);
emit_move_insn
(
MEM_P
(
parmreg
)
?
copy_rtx
(
parmreg
)
:
parmreg
,
rtl
);
rtl
=
parmreg
;
...
...
gcc/testsuite/ChangeLog
View file @
951d8c8a
2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/guality/param-5.c: New test.
2016-06-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc.target/i386/asm-flag-7.c: New test.
...
...
gcc/testsuite/gcc.dg/guality/param-5.c
0 → 100644
View file @
951d8c8a
/* { dg-do run } */
/* { dg-options "-g" } */
/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
typedef
__UINTPTR_TYPE__
uintptr_t
;
typedef
struct
{
uintptr_t
pa
;
uintptr_t
pb
;
}
fatp_t
__attribute__
((
aligned
(
2
*
__alignof__
(
uintptr_t
))));
__attribute__
((
noinline
,
noclone
))
void
clear_stack
(
void
)
{
char
a
[
128
*
1024
+
128
];
__builtin_memset
(
a
,
0
,
sizeof
(
a
));
}
__attribute__
((
noinline
,
noclone
))
void
foo
(
fatp_t
str
,
int
count
)
{
char
a
[
128
*
1024
];
if
(
count
>
0
)
foo
(
str
,
count
-
1
);
clear_stack
();
count
--
;
/* BREAK */
}
int
main
(
void
)
{
fatp_t
ptr
=
{
31415927
,
27182818
};
foo
(
ptr
,
1
);
return
0
;
}
/* { dg-final { gdb-test 26 "str.pa" "31415927" } } */
/* { dg-final { gdb-test 26 "str.pb" "27182818" } } */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment