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
25502041
Commit
25502041
authored
Aug 04, 2010
by
Richard Henderson
Committed by
Richard Henderson
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate red-zone logic into ix86_using_red_zone.
From-SVN: r162885
parent
cdcb5f26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
gcc/ChangeLog
+4
-0
gcc/config/i386/i386.c
+14
-7
No files found.
gcc/ChangeLog
View file @
25502041
2010-08-04 Richard Henderson <rth@redhat.com>
* config/i386/i386.c (ix86_using_red_zone): New.
(ix86_compute_frame_layout, ix86_add_cfa_restore_note,
ix86_expand_prologue, ix86_force_to_memory): Use it.
* config/i386/i386.c (ix86_expand_prologue): Simplify logic
saving the int registers.
...
...
gcc/config/i386/i386.c
View file @
25502041
...
...
@@ -2201,6 +2201,14 @@ static const char *const cpu_names[TARGET_CPU_DEFAULT_max] =
"bdver1"
};
/* Return true if a red-zone is in use. */
static
inline
bool
ix86_using_red_zone
(
void
)
{
return
TARGET_RED_ZONE
&&
!
TARGET_64BIT_MS_ABI
;
}
/* Implement TARGET_HANDLE_OPTION. */
static
bool
...
...
@@ -8459,7 +8467,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
||
(
TARGET_64BIT
&&
frame
->
to_allocate
>=
(
HOST_WIDE_INT
)
0x80000000
))
frame
->
save_regs_using_mov
=
false
;
if
(
!
TARGET_64BIT_MS_ABI
&&
TARGET_RED_ZONE
if
(
ix86_using_red_zone
()
&&
current_function_sp_is_unchanging
&&
current_function_is_leaf
&&
!
ix86_current_function_calls_tls_descriptor
)
...
...
@@ -8542,8 +8550,7 @@ static GTY(()) rtx queued_cfa_restores;
static
void
ix86_add_cfa_restore_note
(
rtx
insn
,
rtx
reg
,
HOST_WIDE_INT
red_offset
)
{
if
(
TARGET_RED_ZONE
&&
!
TARGET_64BIT_MS_ABI
if
(
ix86_using_red_zone
()
&&
red_offset
+
RED_ZONE_SIZE
>=
0
&&
crtl
->
args
.
pops_args
<
65536
)
return
;
...
...
@@ -9387,7 +9394,7 @@ ix86_expand_prologue (void)
at least on x86_64 the stack probe can turn into a call that clobbers
a red zone location */
if
(
!
int_registers_saved
&&
(
TARGET_RED_ZONE
&&
!
TARGET_64BIT_MS_ABI
)
&&
ix86_using_red_zone
(
)
&&
(
!
TARGET_STACK_PROBE
||
allocate
<
CHECK_STACK_LIMIT
))
{
ix86_emit_save_regs_using_mov
((
frame_pointer_needed
...
...
@@ -25774,7 +25781,7 @@ ix86_force_to_memory (enum machine_mode mode, rtx operand)
rtx
result
;
gcc_assert
(
reload_completed
);
if
(
!
TARGET_64BIT_MS_ABI
&&
TARGET_RED_ZONE
)
if
(
ix86_using_red_zone
()
)
{
result
=
gen_rtx_MEM
(
mode
,
gen_rtx_PLUS
(
Pmode
,
...
...
@@ -25782,7 +25789,7 @@ ix86_force_to_memory (enum machine_mode mode, rtx operand)
GEN_INT
(
-
RED_ZONE_SIZE
)));
emit_move_insn
(
result
,
operand
);
}
else
if
(
(
TARGET_64BIT_MS_ABI
||
!
TARGET_RED_ZONE
)
&&
TARGET_64BIT
)
else
if
(
TARGET_64BIT
)
{
switch
(
mode
)
{
...
...
@@ -25849,7 +25856,7 @@ ix86_force_to_memory (enum machine_mode mode, rtx operand)
void
ix86_free_from_memory
(
enum
machine_mode
mode
)
{
if
(
!
TARGET_RED_ZONE
||
TARGET_64BIT_MS_ABI
)
if
(
!
ix86_using_red_zone
()
)
{
int
size
;
...
...
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