From 1d66269db39319ec1b22e48a5e56a15087aba0ae Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 9 Dec 2021 01:16:51 -0700 Subject: [PATCH] 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 d25b6216f42..9cb4cd2a68d 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); } /*