mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-31 19:54:27 +01:00
Squashed 'externals/biscuit/' content from commit 1d53c9e6
git-subtree-dir: externals/biscuit git-subtree-split: 1d53c9e6cfe56544982200a5bac15a5de064936b
This commit is contained in:
commit
e4a733d5b2
55 changed files with 40248 additions and 0 deletions
31
examples/cpuinfo/cpuinfo.cpp
Normal file
31
examples/cpuinfo/cpuinfo.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c), 2022, KNS Group LLC (YADRO)
|
||||
//
|
||||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://opensource.org/licenses/MIT.
|
||||
|
||||
#include <biscuit/assembler.hpp>
|
||||
#include <biscuit/cpuinfo.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace biscuit;
|
||||
|
||||
int main()
|
||||
{
|
||||
CPUInfo cpu;
|
||||
|
||||
std::cout << "Has I:" << cpu.Has(RISCVExtension::I) << std::endl;
|
||||
std::cout << "Has M:" << cpu.Has(RISCVExtension::M) << std::endl;
|
||||
std::cout << "Has A:" << cpu.Has(RISCVExtension::A) << std::endl;
|
||||
std::cout << "Has F:" << cpu.Has(RISCVExtension::F) << std::endl;
|
||||
std::cout << "Has D:" << cpu.Has(RISCVExtension::D) << std::endl;
|
||||
std::cout << "Has C:" << cpu.Has(RISCVExtension::C) << std::endl;
|
||||
std::cout << "Has V:" << cpu.Has(RISCVExtension::V) << std::endl;
|
||||
|
||||
if (cpu.Has(RISCVExtension::V)) {
|
||||
std::cout << "VLENB:" << cpu.GetVlenb() << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue