This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ret $N on x86
- To: gcc-patches at gcc dot gnu dot org
- Subject: ret $N on x86
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 15 Apr 2000 16:04:27 -0700
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
After coming accross the comment for the use of ret $N in the x86
backend one time too often I looked in the manual and resolved it once
and forever (ahem). Not that this will ever have any influence on how
code is generated.
* i386.c: Yes, the x86 can pop 64k at once using ret $N.
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.156
diff -u -u -w -r1.156 i386.c
--- i386.c 2000/04/13 04:11:52 1.156
+++ i386.c 2000/04/15 23:04:00
@@ -2106,11 +2106,11 @@
{
rtx popc = GEN_INT (current_function_pops_args);
- /* i386 can only pop 32K bytes (maybe 64K? Is it signed?). If
- asked to pop more, pop return address, do explicit add, and jump
- indirectly to the caller. */
+ /* i386 can only pop 64K bytes. If asked to pop more, pop
+ return address, do explicit add, and jump indirectly to the
+ caller. */
- if (current_function_pops_args >= 32768)
+ if (current_function_pops_args >= 65536)
{
rtx ecx = gen_rtx_REG (SImode, 2);
OK to check this in?
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------