From owner-p4-projects Thu Oct 3 12:34:40 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4385F37B425; Thu, 3 Oct 2002 12:34:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 457AA37B476 for ; Thu, 3 Oct 2002 12:34:31 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F190443E6E for ; Thu, 3 Oct 2002 12:34:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g93JYUCo002709 for ; Thu, 3 Oct 2002 12:34:30 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g93JYUZ6002704 for perforce@freebsd.org; Thu, 3 Oct 2002 12:34:30 -0700 (PDT) Date: Thu, 3 Oct 2002 12:34:30 -0700 (PDT) Message-Id: <200210031934.g93JYUZ6002704@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 18599 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18599 Change 18599 by peter@peter_daintree on 2002/10/03 12:34:07 just call exit(main()) rather than doing asm for now. I think gcc does a 'good enough' job. But just in case, take a shot at updating the asm code. Affected files ... .. //depot/projects/hammer/lib/csu/x86_64/crt1.c#4 edit Differences ... ==== //depot/projects/hammer/lib/csu/x86_64/crt1.c#4 (text+ko) ==== @@ -100,7 +100,7 @@ monstartup(&eprol, &etext); #endif _init(); -#ifndef __GNUC__ +#ifndef __GNUC__dont_care_yet exit( main(argc, argv, env) ); #else /* @@ -124,15 +124,12 @@ * of compiling main() with -fomit-frame-pointer. */ __asm__(" - andl $~0xf, %%esp # align stack to 16-byte boundary - subl $12+12, %%esp # space for args and padding - movl %0, 0(%%esp) - movl %1, 4(%%esp) - movl %2, 8(%%esp) + andl $~0xf, %%rsp # align stack to 16-byte boundary + subq $8, %%rsp # align after return address call main - movl %%eax, 0(%%esp) + movl %%eax, %%edi call exit - " : : "r" (argc), "r" (argv), "r" (env) : "ax", "cx", "dx", "memory"); + " : : "D" (argc), "S" (argv), "d" (env) : "ax", "dx", "si", "di", "memory"); #endif } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message