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
55a51460
Commit
55a51460
authored
Sep 08, 2012
by
Anthony Green
Committed by
Anthony Green
Sep 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize moxie function prologues
From-SVN: r191088
parent
e4d8437d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
gcc/ChangeLog
+7
-0
gcc/config/moxie/moxie.c
+15
-5
No files found.
gcc/ChangeLog
View file @
55a51460
2012-09-07 Anthony Green <green@moxielogic.com>
* config/moxie/moxie.c (moxie_expand_prologue): Optimize prologue
for functions with large static stack requirements.
(moxie_expand_epilogue): Use $r12 instead of $r5 for pulling saved
values off of the stack.
2012-09-07 Nick Clifton <nickc@redhat.com>
2012-09-07 Nick Clifton <nickc@redhat.com>
* config/v850/v850.h (DBX_DEBUGGING_INFO): Define.
* config/v850/v850.h (DBX_DEBUGGING_INFO): Define.
...
...
gcc/config/moxie/moxie.c
View file @
55a51460
/* Target Code for moxie
/* Target Code for moxie
Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation
Copyright (C) 2008, 2009, 2010, 2011
, 2012
Free Software Foundation
Contributed by Anthony Green.
Contributed by Anthony Green.
This file is part of GCC.
This file is part of GCC.
...
@@ -293,8 +293,8 @@ moxie_expand_prologue (void)
...
@@ -293,8 +293,8 @@ moxie_expand_prologue (void)
if
(
cfun
->
machine
->
size_for_adjusting_sp
>
0
)
if
(
cfun
->
machine
->
size_for_adjusting_sp
>
0
)
{
{
int
i
=
cfun
->
machine
->
size_for_adjusting_sp
;
int
i
=
cfun
->
machine
->
size_for_adjusting_sp
;
while
(
i
>
255
)
while
(
(
i
>=
255
)
&&
(
i
<=
510
)
)
{
{
insn
=
emit_insn
(
gen_subsi3
(
stack_pointer_rtx
,
insn
=
emit_insn
(
gen_subsi3
(
stack_pointer_rtx
,
stack_pointer_rtx
,
stack_pointer_rtx
,
...
@@ -302,13 +302,23 @@ moxie_expand_prologue (void)
...
@@ -302,13 +302,23 @@ moxie_expand_prologue (void)
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
i
-=
255
;
i
-=
255
;
}
}
if
(
i
>
0
)
if
(
i
<=
255
)
{
{
insn
=
emit_insn
(
gen_subsi3
(
stack_pointer_rtx
,
insn
=
emit_insn
(
gen_subsi3
(
stack_pointer_rtx
,
stack_pointer_rtx
,
stack_pointer_rtx
,
GEN_INT
(
i
)));
GEN_INT
(
i
)));
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
}
}
else
{
rtx
reg
=
gen_rtx_REG
(
SImode
,
MOXIE_R12
);
insn
=
emit_move_insn
(
reg
,
GEN_INT
(
i
));
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
insn
=
emit_insn
(
gen_subsi3
(
stack_pointer_rtx
,
stack_pointer_rtx
,
reg
));
RTX_FRAME_RELATED_P
(
insn
)
=
1
;
}
}
}
}
}
...
@@ -320,7 +330,7 @@ moxie_expand_epilogue (void)
...
@@ -320,7 +330,7 @@ moxie_expand_epilogue (void)
if
(
cfun
->
machine
->
callee_saved_reg_size
!=
0
)
if
(
cfun
->
machine
->
callee_saved_reg_size
!=
0
)
{
{
reg
=
gen_rtx_REG
(
Pmode
,
MOXIE_R
5
);
reg
=
gen_rtx_REG
(
Pmode
,
MOXIE_R
12
);
if
(
cfun
->
machine
->
callee_saved_reg_size
<=
255
)
if
(
cfun
->
machine
->
callee_saved_reg_size
<=
255
)
{
{
emit_move_insn
(
reg
,
hard_frame_pointer_rtx
);
emit_move_insn
(
reg
,
hard_frame_pointer_rtx
);
...
...
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