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
68c5782d
Commit
68c5782d
authored
Aug 04, 2001
by
Richard Henderson
Committed by
Richard Henderson
Aug 04, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* i386.c: Revert 07-30 ix86_output_main_function_alignment_hack.
From-SVN: r44638
parent
8bbbef34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
47 deletions
+4
-47
gcc/ChangeLog
+4
-0
gcc/config/i386/i386.c
+0
-47
No files found.
gcc/ChangeLog
View file @
68c5782d
2001
-
08
-
04
Richard
Henderson
<
rth
@redhat
.
com
>
*
i386
.
c
:
Revert
07
-
30
ix86_output_main_function_alignment_hack
.
2001
-
08
-
04
Neil
Booth
<
neil
@daikokuya
.
demon
.
co
.
uk
>
*
cpphash
.
h
(
struct
cpp_reader
)
:
New
member
directive_line
.
...
...
gcc/config/i386/i386.c
View file @
68c5782d
...
...
@@ -574,7 +574,6 @@ static HOST_WIDE_INT ix86_GOT_alias_set PARAMS ((void));
static
void
ix86_adjust_counter
PARAMS
((
rtx
,
HOST_WIDE_INT
));
static
rtx
ix86_expand_aligntest
PARAMS
((
rtx
,
int
));
static
void
ix86_expand_strlensi_unroll_1
PARAMS
((
rtx
,
rtx
));
static
void
ix86_output_main_function_alignment_hack
PARAMS
((
FILE
*
f
,
int
));
struct
ix86_address
{
...
...
@@ -640,10 +639,6 @@ static void sco_asm_named_section PARAMS ((const char *, unsigned int,
HOST_WIDE_INT
));
# undef TARGET_ASM_FUNCTION_PROLOGUE
# define TARGET_ASM_FUNCTION_PROLOGUE ix86_osf_output_function_prologue
#else
# undef TARGET_ASM_FUNCTION_PROLOGUE
# define TARGET_ASM_FUNCTION_PROLOGUE \
ix86_output_main_function_alignment_hack
#endif
#undef TARGET_ASM_OPEN_PAREN
...
...
@@ -10788,48 +10783,6 @@ ix86_memory_move_cost (mode, class, in)
}
}
/* Most of current runtimes (Jul 2001) do not align stack properly when
entering main, so emit an wrapper to align stack before the real main
code is called.
This can eventually go if we manage to fix the runtimes or teach gcc
to dynamically align stack in main automatically.
Adding check to configure is probably not good idea, as binarry can move
from one shared library to older. */
static
void
ix86_output_main_function_alignment_hack
(
file
,
size
)
FILE
*
file
;
int
size
ATTRIBUTE_UNUSED
;
{
rtx
label
;
char
buf
[
256
];
/* Check that we see main function with maximally 8 bytes of arguments.
if so, emit the hack to align stack for runtimes, where this constraint
is broken. */
if
(
strcmp
(
cfun
->
name
,
"main"
))
return
;
if
(
cfun
->
pops_args
||
cfun
->
args_size
>
12
)
return
;
if
(
PREFERRED_STACK_BOUNDARY
<=
2
)
return
;
label
=
gen_label_rtx
();
fprintf
(
file
,
"
\t
pushl
\t
%%ebp
\n
"
);
fprintf
(
file
,
"
\t
movl
\t
%%esp, %%ebp
\n
"
);
fprintf
(
file
,
"
\t
andl
\t
$0xfffffff0, %%esp
\n
"
);
fprintf
(
file
,
"
\t
pushl
\t
%%ebp
\n
"
);
fprintf
(
file
,
"
\t
pushl
\t
16(%%ebp)
\n
"
);
fprintf
(
file
,
"
\t
pushl
\t
12(%%ebp)
\n
"
);
fprintf
(
file
,
"
\t
pushl
\t
8(%%ebp)
\n
"
);
fprintf
(
file
,
"
\t
call
\t
"
);
ASM_GENERATE_INTERNAL_LABEL
(
buf
,
"L"
,
CODE_LABEL_NUMBER
(
label
));
assemble_name
(
file
,
buf
);
fprintf
(
file
,
"
\n\t
leave
\n
"
);
fprintf
(
file
,
"
\t
ret
\n
"
);
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"L"
,
CODE_LABEL_NUMBER
(
label
));
}
#if defined(TARGET_ELF) && defined(TARGET_COFF)
static
void
sco_asm_named_section
(
name
,
flags
,
align
)
...
...
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