From: Mark Wooding Date: Wed, 18 May 2016 08:17:01 +0000 (+0100) Subject: base/dispatch.c: Add documentation for some internal functions. X-Git-Tag: 2.2.3~1^2~22^2~11 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/11b179777b6b29afe0c960f62d7e2ea33b01cccd base/dispatch.c: Add documentation for some internal functions. --- diff --git a/base/dispatch.c b/base/dispatch.c index 337f2bec..4b5e17a9 100644 --- a/base/dispatch.c +++ b/base/dispatch.c @@ -101,6 +101,15 @@ static void cpuid(struct cpuid *cc, unsigned a, unsigned c) static unsigned cpuid_maxleaf(void) { struct cpuid c; cpuid(&c, 0, 0); return (c.a); } +/* --- @cpuid_features_p@ --- * + * + * Arguments: @unsigned dbits@ = bits to check in EDX + * @unsigned cbits@ = bits to check in ECX + * + * Returns: Nonzero if all the requested bits are set in the CPUID result + * on leaf 1. + */ + static int cpuid_features_p(unsigned dbits, unsigned cbits) { struct cpuid c; @@ -109,6 +118,14 @@ static int cpuid_features_p(unsigned dbits, unsigned cbits) return ((c.d & dbits) == dbits && (c.c & cbits) == cbits); } +/* --- @xmm_registers_available_p@ --- * + * + * Arguments: --- + * + * Returns: Nonzero if the operating system has made the XMM registers + * available for use. + */ + static int xmm_registers_available_p(void) { #ifdef __GNUC__