loader: Fix G overflowing for G(4) on 32-bit builds

Prevent G(4) and over from overflowing for 32-bit builds.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
This commit is contained in:
Ahmad Khalifa 2024-05-29 08:30:59 -06:00 committed by Warner Losh
parent dcc7b3698d
commit 5360d017be

View File

@ -36,7 +36,7 @@
#include "loader_efi.h"
#define M(x) ((x) * 1024 * 1024)
#define G(x) (1UL * (x) * 1024 * 1024 * 1024)
#define G(x) (1ULL * (x) * 1024 * 1024 * 1024)
#if defined(__amd64__)
#include <machine/cpufunc.h>