<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://www.alphalinux.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Amask</id>
	<title>Amask - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.alphalinux.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Amask"/>
	<link rel="alternate" type="text/html" href="http://www.alphalinux.org/wiki/index.php?title=Amask&amp;action=history"/>
	<updated>2026-05-25T07:33:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.7</generator>
	<entry>
		<id>http://www.alphalinux.org/wiki/index.php?title=Amask&amp;diff=82&amp;oldid=prev</id>
		<title>Gareth: Imported from http://web.archive.org/web/20110529125544/http://www.alphalinux.org/wiki/index.php?title=Amask&amp;action=edit</title>
		<link rel="alternate" type="text/html" href="http://www.alphalinux.org/wiki/index.php?title=Amask&amp;diff=82&amp;oldid=prev"/>
		<updated>2019-08-29T18:13:51Z</updated>

		<summary type="html">&lt;p&gt;Imported from http://web.archive.org/web/20110529125544/http://www.alphalinux.org/wiki/index.php?title=Amask&amp;amp;action=edit&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The ''Architecture Mask'' instruction is used to determine the presence of architectural extensions, such as [[Motion Video Instructions|MVI]] or [[Floating-Point Instruction Extension|FIX]] at runtime.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
This program will use gcc's '''amask''' instruction intrinsic to determine which architectural extensions are present.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
enum CPUFeatures {&lt;br /&gt;
    BWX = ~(1 &amp;gt;&amp;gt; 0),&lt;br /&gt;
    FIX = ~(1 &amp;gt;&amp;gt; 1),&lt;br /&gt;
    CIX = ~(1 &amp;gt;&amp;gt; 2),&lt;br /&gt;
    MVI = ~(1 &amp;gt;&amp;gt; 8)&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#define amask __builtin_alpha_amask&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
        unsigned int features = amask(~0);&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;%X\n&amp;quot;, features);&lt;br /&gt;
&lt;br /&gt;
        if (features &amp;amp; BWX) {&lt;br /&gt;
                puts(&amp;quot;BWX supported.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        if (features &amp;amp; MVI) {&lt;br /&gt;
                puts(&amp;quot;MVI supported.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        if (features &amp;amp; FIX) {&lt;br /&gt;
                puts(&amp;quot;FIX supported.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        if (features &amp;amp; CIX) {&lt;br /&gt;
                puts(&amp;quot;CIX supported.&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        return 0;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Gareth</name></author>
		
	</entry>
</feed>