git: 1d66269db393 - main - kboot: simplify _start
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Dec 2021 08:26:12 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=1d66269db39319ec1b22e48a5e56a15087aba0ae
commit 1d66269db39319ec1b22e48a5e56a15087aba0ae
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-12-09 08:16:51 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-12-09 08:25:40 +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
---
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);
}
/*