git: 07f1bcde03be - stable/13 - kboot: simplify _start

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 24 Jan 2023 22:09:58 UTC
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=07f1bcde03be9d09360fa5b862b93134efc3ff4a

commit 07f1bcde03be9d09360fa5b862b93134efc3ff4a
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-12-09 08:16:51 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:18 +0000

    kboot: simplify _start
    
    _start can be implemented directly like this. The code generated is
    identical. It's also portable.
    
    Reviewed by:    md5
    Sponsored by:   Netflix
    
    (cherry picked from commit 1d66269db39319ec1b22e48a5e56a15087aba0ae)
---
 stand/powerpc/kboot/main.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c
index d25b6216f421..9cb4cd2a68d7 100644
--- a/stand/powerpc/kboot/main.c
+++ b/stand/powerpc/kboot/main.c
@@ -482,18 +482,7 @@ kboot_kseg_get(int *nseg, void **ptr)
 void
 _start(int argc, const char **argv, char **env)
 {
-// This makes error "variable 'sp' is uninitialized" be just a warning on clang.
-// Initializing 'sp' is not desired here as it would overwrite "r1" original value
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic warning "-Wuninitialized"
-#endif
-	register volatile void **sp asm("r1");
-	main((int)sp[0], (const char **)&sp[1]);
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-
+	main(argc, argv);
 }
 
 /*