날먹을 위한 몸부림/나중에 옮기겠지

c++ x64에서 cpu 공급업체 가져오기

프로그래밍하는 지팡이 2023. 1. 9. 19:16

일부 프로그램이나 환경에서 cpu를 조사해야하는 경우가 있을 수가 있음

나중에 하이퍼바이저 작성할 떄 쓰려고 만든 코드임

 

x64에서 인라인 어셈블리를 사용하는 방법은 다음 게시글 참고

 

https://boa9448.tistory.com/26

 

visual studio2019에서 인라인 어셈블리 - 1

머갈통말 vs는 컴파일러를 통해서 x64인라인 어셈블리를 지원하지 않음간단한 어셈블리 프로젝트를 작성하는데 nasm와 같은 외부 어셈블러 사용시 어려움을 느낄 수 있음이번 글을 통해서 외부

boa9448.tistory.com

https://boa9448.tistory.com/27

 

visual studio2019에서 인라인 어셈블리 - 2

머갈통말 앞에서 작성한 프로젝트를 기반으로 x64지원까지 추가해서 만들어봄 결과는 x86과 x64에서 둘 다 작동하는 작은 어셈블리 프로젝트임 뭐 했는지 기억 안난다면 이전글 참고 https://boa9448.t

boa9448.tistory.com

 

 

cpuid 명령어 참고

https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html

 

Intel® 64 and IA-32 Architectures Software Developer Manuals

These manuals describe the architecture and programming environment of the Intel® 64 and IA-32 architectures.

www.intel.com

 


 

 

사용하는 cpu가 인텔이라면 다음과 같은 결과를 볼 수 있음

결과