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
0ea6b275
Commit
0ea6b275
authored
Mar 17, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(winnt_function_prologue): Deleted.
(gen_stdcall_suffix): New function. From-SVN: r9199
parent
f6b54ae8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
55 deletions
+23
-55
gcc/config/i386/winnt.c
+23
-55
No files found.
gcc/config/i386/winnt.c
View file @
0ea6b275
...
@@ -27,65 +27,33 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
...
@@ -27,65 +27,33 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tree.h"
#include "tree.h"
#include "flags.h"
#include "flags.h"
/*
This function generates the assembly code for function entry.
/*
Return string which is the former assembler name modified with a
FILE is an stdio stream to output the code to.
suffix consisting of an atsign (@) followed by the number of bytes of
SIZE is an int: how many units of temporary storage to allocate.
*/
arguments
*/
void
char
*
winnt_function_prologue
(
file
,
size
)
gen_stdcall_suffix
(
decl
)
FILE
*
file
;
tree
decl
;
int
size
;
{
{
register
int
regno
;
int
total
=
0
;
int
limit
;
char
*
asmname
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
rtx
xops
[
4
];
char
*
newsym
;
int
pic_reg_used
=
flag_pic
&&
(
current_function_uses_pic_offset_table
||
current_function_uses_const_pool
);
xops
[
0
]
=
stack_pointer_rtx
;
if
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
decl
)))
xops
[
1
]
=
frame_pointer_rtx
;
if
(
TREE_VALUE
(
tree_last
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
decl
))))
xops
[
2
]
=
GEN_INT
(
size
);
==
void_type_node
)
xops
[
3
]
=
gen_rtx
(
REG
,
Pmode
,
0
);
/* eax */
if
(
frame_pointer_needed
)
{
output_asm_insn
(
"push%L1 %1"
,
xops
);
output_asm_insn
(
AS2
(
mov
%
L0
,
%
0
,
%
1
),
xops
);
}
if
(
size
>
4095
)
{
output_asm_insn
(
AS2
(
mov
%
L0
,
%
2
,
%
3
),
xops
);
output_asm_insn
(
"call __chkstk"
,
xops
);
}
else
if
(
size
)
output_asm_insn
(
AS2
(
sub
%
L0
,
%
2
,
%
0
),
xops
);
/* Note If use enter it is NOT reversed args.
This one is not reversed from intel!!
I think enter is slower. Also sdb doesn't like it.
But if you want it the code is:
{
xops[3] = const0_rtx;
output_asm_insn ("enter %2,%3", xops);
}
*/
limit
=
(
frame_pointer_needed
?
FRAME_POINTER_REGNUM
:
STACK_POINTER_REGNUM
);
for
(
regno
=
limit
-
1
;
regno
>=
0
;
regno
--
)
if
((
regs_ever_live
[
regno
]
&&
!
call_used_regs
[
regno
])
||
(
regno
==
PIC_OFFSET_TABLE_REGNUM
&&
pic_reg_used
))
{
{
xops
[
0
]
=
gen_rtx
(
REG
,
SImode
,
regno
);
tree
formal_type
=
TYPE_ARG_TYPES
(
TREE_TYPE
(
decl
));
output_asm_insn
(
"push%L0 %0"
,
xops
);
}
if
(
pic_reg_used
)
while
(
TREE_VALUE
(
formal_type
)
!=
void_type_node
)
{
{
xops
[
0
]
=
pic_offset_table_rtx
;
total
+=
TREE_INT_CST_LOW
(
TYPE_SIZE
(
TREE_VALUE
(
formal_type
)));
xops
[
1
]
=
(
rtx
)
gen_label_rtx
();
formal_type
=
TREE_CHAIN
(
formal_type
);
}
}
output_asm_insn
(
AS1
(
call
,
%
P1
),
xops
);
newsym
=
xmalloc
(
strlen
(
asmname
)
+
10
);
ASM_OUTPUT_INTERNAL_LABEL
(
file
,
"L"
,
CODE_LABEL_NUMBER
(
xops
[
1
]));
sprintf
(
newsym
,
"%s@%d"
,
asmname
,
total
/
BITS_PER_UNIT
);
output_asm_insn
(
AS1
(
pop
%
L0
,
%
0
),
xops
);
return
IDENTIFIER_POINTER
(
get_identifier
(
newsym
));
output_asm_insn
(
"addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0"
,
xops
);
}
}
}
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