⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmx_chp2.htm

📁 MMX即多媒体可扩展指令集
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<meta content="charset=gb2312">
</head>
<style type="text/css">
<!--
p,td,body {font: 10.5pt}
small {font: 9pt;}
big {font: 24pt}
h1 {font: 22pt}
h2 {font: 20pt}
h3 {font: 18pt}
h4 {font: 16pt}
h5 {font: 14pt}
h6 {font: 12pt}
A:link {text-decoration: none; color: "#DBCAAE"}
A:visited {text-decoration: none; color: "#DBCAAE"}
A:active {text-decoration: none; color: "#DBCAAE"}
A:hover {text-decoration: none; color: "#FBEACE"}
-->
</style>

<body bgcolor="#000000" text="#DBCAAE" link="#DBCAAE" vlink="#DBCAAE" alink="#DBCAAE" topmargin="10" leftmargin="4">
<p>
<center>
<a href="tppmsgs/msgs0.htm#1" tppabs="http://freemind.163.net/index.html"><img src="bigtitle.gif" tppabs="http://freemind.163.net/bigtitle.gif" width=505 height=92 border="0"></a><br>
</center>
<big><FONT FACE="Arial"><B><FONT COLOR="#FBEACE">D</FONT><FONT COLOR="#EBDABE">A</FONT><FONT COLOR="#DBCAAE">T</FONT><FONT COLOR="#CBBA9E">A</FONT><FONT COLOR="#BBAA8E">B</FONT><FONT COLOR="#AB9A7E">A</FONT><FONT COLOR="#9B8A6E">S</FONT><FONT COLOR="#8B7A5E">E</FONT></B></FONT></big>

<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td bgcolor="#CBBA9E" height="1"></td></tr><tr><td bgcolor="#FBEACE" height="1"></td></tr><tr><td bgcolor="#DBCAAE" height="1"></td></tr><tr><td bgcolor="#BBAA8E" height="1"></td></tr><tr><td bgcolor="#9B8A6E" height="1"></td></tr><tr><td bgcolor="#7B6A4E" height="1"></td></tr><tr><td bgcolor="#5B4A2E" height="1"></td></tr><tr><td bgcolor="#3B2A0E" height="1"></td></tr><tr><td height="10"></td></tr></table>

<center>
<big><font face="黑体">INTEL 体系结构<br>MMX&#153; 技术程序员参考手册</font></big><br>
<small><FONT FACE="Arial"><b>Intel Architecture MMX&#153; Technology Programmer's Reference Manual</b></font></small><br><br>
</center>
<table border="0" width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td align="right"><a href="mmx.htm" tppabs="http://freemind.163.net/database/mmx/mmx.htm">返回</a></td></tr></table>

<table border="0" width="100%"><tr><td bgcolor="#CBBA9E" height="2"></td></tr></table>
</p>

<p><font face="arial">
<h3><b>Chapter 2<BR>INTEL ARCHITECTURE MMX&#153; TECHNOLOGY FEATURES</b></h3>

This chapter provides a general overview of the architectural features of the Intel Architecture MMX&#153; technology.

<H3><a name="2.1">2.1 NEW FEATURES</a></H3>

MMX technology provides the following new features, while maintaining backward compatibility with all existing Intel Architecture microprocessors, IA applications, and operating systems.

<ul>
<li>New data types

<li>Eight MMX registers

<li>Enhanced instruction set
</ul>

The performance of applications which use these new features of MMX technology can be enchanced.

<H3><a name="2.2">2.2 NEW DATA TYPES</a></H3>

The principal data type of the IA MMX technology is the packed fixed-point integer. The decimal point of the fixed-point values is implicit and is left for the user to control for maximum flexibility.<br><br>

The IA MMX technology defines the following four new 64-bit data types (See Figure 2-1):
<ul>
<li>Packed byte  Eight bytes packed into one 64-bit quantity
<li>Packed word  Four words packed into one 64-bit quantity
<li>Packed doubleword Two doublewords packed into one 64-bit quantity
<li>Quadword  One 64-bit quantity
</ul>


<a name="Figure2-1"></a>
<CENTER>
<IMG SRC="3006002.gif" tppabs="http://freemind.163.net/database/mmx/3006002.gif" border=0><br><br>
<small>Figure 2-1. Packed Data Types</small>
</CENTER>

<H3><a name="2.3">2.3 MMX&#153; REGISTERS</a></H3>

The IA MMX technology provides eight 64-bit, general-purpose registers. These registers are aliased on the floating-point registers. The operating system handles the MMX technology as it would handle floating-point. (See Section 4.3 for more details on register aliasing.)<br><br>

The MMX registers can hold packed 64-bit data types. The MMX instructions access the MMX registers directly using the register names MM0 to MM7 (See Figure 2-2).<br><br>

MMX registers can be used to perform calculations on data. They cannot be used to address memory; addressing is accomplished by using the integer registers and standard IA addressing modes.<br><br>

<a name="Figure2-2"></a>
<CENTER><IMG SRC="3006044.gif" tppabs="http://freemind.163.net/database/mmx/3006044.gif" border=0><br><br>
<b>Figure 2-2. MMX&#153; Register Set</b>
</CENTER>

<H3><a name="2.4">2.4 EXTENDED INSTRUCTION SET</a></H3>

The IA MMX instruction set supplies a rich set of instructions that operate on all data elements of a packed data type, in parallel. The MMX instructions can operate on either signed or unsigned data elements.<br><br>

The MMX instructions implement two new principles(discussed in section Packed Data 2.4.2.):

<ul>
<li>Operations on packed data
<li>Saturation arithmetic
</ul>

<H4><a name="2.4.1">2.4.1  Packed Data</a></H4>
The MMX instructions can operate on groups of eight bytes, four words, and two doublewords. These groups of 64 bits are referred to as packed data. The same 64 bits of data can be treated as any one of the packed data types. Data is cast by the type specified by the instruction.<br><br>

For example, the PADDB (Add Packed Bytes) instruction adds two groups of eight packed bytes. The PADDW (Add Packed Words) instruction, which adds packed words, could operate on the same 64 bits as the PADDB instruction treating the 64 bits as four 16-bit words. <FONT COLOR=#901F0F>X_PackedData</FONT>

<H4><a name="2.4.2">2.4.2 Saturation Arithmetic and Wrap Around</a></H4>

The MMX technology supports a new arithmetic capability known as saturating arithmetic. Saturation is best defined by contrasting it with wraparound mode.<br><br>

In wraparound mode, results that overflow or underflow are truncated and only the lower (least significant) bits of the result are returned.  That is, the carry is ignored.<br><br>

In saturation mode, results of an operation that overflow or underflow are clipped (saturated) to a data-range limit for the data type (see Table 2-1). The result of an operation that exceeds the range of a data-type saturates to the maximum value of the range.  A result that is less than the range of a data type saturates to the minimum value of the range. This is useful in many cases, such as color calculations.<br><br>

For example, when the result exceeds the data range limit for signed bytes, it is saturated to 0x7F (0xFF for unsigned bytes).  If a value is less than the data range limit, it is saturated to 0x80 for signed bytes (0x00 for unsigned bytes). <br><br>

Saturation provides a useful feature of avoiding wraparound artifacts. In the example of color calculations, saturation causes a color to remain pure black or pure white without allowing for an inversion.<br><br>

<a name="Table2-1"></a>
<center><table border="0" cellpadding="2" cellspacing="1" bgcolor="#EBDABE">

<TR><TD bgcolor="#000000" COLSPAN=5 WIDTH=524 align=CENTER><small><B>Table 2-1. Data Range Limits for Saturation</B></small></TD></TR>

<TR><TD bgcolor="#000000" WIDTH=175></TD><TD bgcolor="#000000" COLSPAN=2 WIDTH=163><CENTER><B><small>Lower Limit</small></B></CENTER></TD>
<TD bgcolor="#000000" COLSPAN=2 WIDTH=186><CENTER><B><small>Upper Limit</small></B></CENTER></TD></TR>

<TR><TD bgcolor="#000000" WIDTH=175><CENTER><B><small>Signed</small></B></CENTER></TD>
<TD bgcolor="#000000" WIDTH=88><CENTER><B><small>Hexadecimal</small></B></CENTER></TD>
<TD bgcolor="#000000" WIDTH=76><CENTER><B><small>Decimal</small></B></CENTER></TD>
<TD bgcolor="#000000" WIDTH=90><CENTER><B><small>Hexadecimal</small></B></CENTER></TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -