[libc-commits] [libc] [libc][uefi] add crt1 (PR #132150)
Tristan Ross via libc-commits
libc-commits at lists.llvm.org
Mon May 5 21:32:30 PDT 2025
================
@@ -0,0 +1,99 @@
+//===----------- UEFI implementation of error utils --------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_UEFI_ERROR_H
+#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_UEFI_ERROR_H
+
+#include "hdr/errno_macros.h"
+#include "include/llvm-libc-types/EFI_STATUS.h"
+#include "src/__support/CPP/array.h"
+#include "src/__support/CPP/limits.h"
+#include "src/__support/macros/attributes.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+#define EFI_ERROR_MAX_BIT (cpp::numeric_limits<EFI_STATUS>::max())
+#define EFI_ENCODE_ERROR(value) \
+ (EFI_ERROR_MAX_BIT | (EFI_ERROR_MAX_BIT >> 2) | (value))
+#define EFI_ENCODE_WARNING(value) ((EFI_ERROR_MAX_BIT >> 2) | (value))
----------------
RossComputerGuy wrote:
Done
https://github.com/llvm/llvm-project/pull/132150
More information about the libc-commits
mailing list