add rdtscp detect

This commit is contained in:
Ricaro.Cui 2021-07-30 14:18:08 +08:00
parent f2475579f6
commit 81a52b291a
1 changed files with 5 additions and 3 deletions

View File

@ -157,9 +157,11 @@ function check_os() {
exit 1 exit 1
fi fi
# check cpu instruction # check cpu instruction
if [ X"$(cat /proc/cpuinfo | grep rdtscp | uniq)" == X"" ] CPU_BIT=$(uname -m)
then if [ X"$CPU_BIT" == X"x86_64" ]; then
echo "The cpu instruction rdtscp is missing." && exit 1 if [ X"$(cat /proc/cpuinfo | grep rdtscp | uniq)" == X"" ]; then
echo "The cpu instruction rdtscp is missing." && exit 1
fi
fi fi
} }