mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[libcpu] Add CPU_FEATURE_WRN
The new CPU_FEATURE_WRN macro in the cpu features list will cause the kernel to emit a warning but not panic if the feature is missing.
This commit is contained in:
@@ -49,12 +49,16 @@ cpu_id::features() const
|
||||
if (r.regname & (1ull << bit)) \
|
||||
feats.set(feature::name);
|
||||
|
||||
#define CPU_FEATURE_WRN(name, feat_leaf, feat_sub, regname, bit) \
|
||||
CPU_FEATURE_OPT(name, feat_leaf, feat_sub, regname, bit);
|
||||
|
||||
#define CPU_FEATURE_REQ(name, feat_leaf, feat_sub, regname, bit) \
|
||||
CPU_FEATURE_OPT(name, feat_leaf, feat_sub, regname, bit);
|
||||
|
||||
#include "cpu/features.inc"
|
||||
#undef CPU_FEATURE_OPT
|
||||
#undef CPU_FEATURE_REQ
|
||||
#undef CPU_FEATURE_WRN
|
||||
|
||||
return feats;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user