{"id":106239,"date":"2022-02-09T07:00:00","date_gmt":"2022-02-09T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=106239"},"modified":"2022-02-09T07:21:01","modified_gmt":"2022-02-09T15:21:01","slug":"20220209-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20220209-00\/?p=106239","title":{"rendered":"How can I find out which processor architectures are supported via emulation by the current system?"},"content":{"rendered":"<p>A customer was writing a debugging tool and wanted to know in their installer which processor architectures are supported by the current system, both the native architecture as well as anything supported by emulation. That way, the tool could install the versions that apply to those architectures.<\/p>\n<p>Okay, getting the native architecture is easy. You can call <code>Get\u00adNative\u00adSystem\u00adInfo<\/code> to find out what the native system architecture is.<\/p>\n<p>Getting the emulated ones is a little trickier. Back in the old days, you just hard-coded some knowledge. &#8220;Well, Windows on x86-64 can emulate x86-32. And Windows on AArch64 can emulate x86-32 as well as T32.&#8221; But that broke down with the introduction of HoloLens 2, which is natively AArch64 and omits the x86-32 emulation, and then broke down further with the introduction of x86-64 emulation on native AArch64 systems.<\/p>\n<p>To find out whether a particular architecture is supported in emulation, you can pass it to <code>Is\u00adWow64\u00adGuest\u00adMachine\u00adSupported<\/code> and see what the answer is. Repeat for each architecture you are curious about.<\/p>\n<p>There is no way to get a list of all the architectures supported by emulation, primarily because there&#8217;s no real use for it. I mean, suppose you learn that Windows now supports architecture number 31415. You have no idea what that number means, because it&#8217;s not on your list of known architectures. Even if you somehow figured out that 31415 is <code>IMAGE_<wbr \/>FILE_<wbr \/>MACHINE_<wbr \/>SUPER\u00adMEGA\u00adGREAT<\/code>, that still does you no good because you don&#8217;t have any binaries that support the SuperMegaGreat. Just enumerate through all the ones you support and intersect that with the ones that the operating system supports, and that gives you the ones for which you should install your architecture-specific packages.<\/p>\n<p><b>Bonus chatter<\/b>: Sometimes, the kernel folks get a little cute when picking the ID numbers for new architectures. Here are the ones I was able to guess at:<\/p>\n<table class=\"cp3\" style=\"border-collapse: collapse;\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n<tbody>\n<tr>\n<th>Architecture<\/th>\n<th>Value (hex)<\/th>\n<th>Proposed explanation<\/th>\n<\/tr>\n<tr>\n<td>CEF<\/td>\n<td><code>0x0CEF<\/code><\/td>\n<td>Hex digits spell out name<\/td>\n<\/tr>\n<tr>\n<td>CEE<\/td>\n<td><code>0xC0EE<\/code><\/td>\n<td>Why not <code>0x0CEE<\/code>?<\/td>\n<\/tr>\n<tr>\n<td>EBC<\/td>\n<td><code>0x0EBC<\/code><\/td>\n<td>Hex digits spell out name<\/td>\n<\/tr>\n<tr>\n<td>AMD64<\/td>\n<td><code>0x8664<\/code><\/td>\n<td>Also known as x<u>86<\/u>&#8211;<u>64<\/u><\/td>\n<\/tr>\n<tr>\n<td>ARM64<\/td>\n<td><code>0xAA64<\/code><\/td>\n<td>Also known as <u>AA<\/u>rch<u>64<\/u><\/td>\n<\/tr>\n<tr>\n<td>MIPS16<\/td>\n<td><code>0x0266<\/code><\/td>\n<td rowspan=\"3\">There&#8217;s clearly something going on here<br \/>\nbut I don&#8217;t know what<\/td>\n<\/tr>\n<tr>\n<td>MIPSFPU<\/td>\n<td><code>0x0366<\/code><\/td>\n<\/tr>\n<tr>\n<td>MIPSFPU16<\/td>\n<td><code>0x0466<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Fortunately, there&#8217;s a special function for that, or at least for enough of that to serve your needs.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-106239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Fortunately, there&#8217;s a special function for that, or at least for enough of that to serve your needs.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/106239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=106239"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/106239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=106239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=106239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=106239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}