1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../css/manpage.css" type="text/css" />
7    <link rel="stylesheet" href="../css/timetable.css" type="text/css" />
8    <title>m3x2 - 3x2 multiply</title>
9  </head>
10  <body>
11    <h1>m3x2 - 3x2 multiply</h1>
12
13    <h2>Calling Format</h2>
14    <div class="section">
15      <pre class="definition">
16m3x2    dest.xy, src0, src1
17</pre>
18    </div>
19
20    <h2>Operands</h2>
21    <div class="section">
22      <table class="arguments">
23        <thead>
24          <tr>
25            <th>Name</th>
26            <td>Registers</td>
27          </tr>
28        </thead>
29        <tr>
30          <th>dest</th>
31          <td>
32            An output register or temporary register.<br>Requires the mask { .xy }.<br>
33          </td>
34        </tr>
35        <tr>
36          <th>src0</th>
37          <td>A temporary register, input register, or floating-point constant register.</td>
38        </tr>
39        <tr>
40          <th>src1</th>
41          <td>
42            A temporary register, an input register, or a floating-point constant register.<br>Specifies the starting register of a 3x2 matrix. (In other words, if <SPAN class="argument">src1</SPAN> is <CODE>r0</CODE>, then the 3x2 matrix is stored in <CODE>r0</CODE> and <CODE>r1</CODE>.)<br>
43          </td>
44        </tr>
45      </table>
46      <p class="notice">
47        You cannot specify a floating-point constant register for both <SPAN class="argument">src0</SPAN> and <SPAN class="argument">src1</SPAN>.<br> You cannot specify an input register for both <SPAN class="argument">src0</SPAN> and <SPAN class="argument">src1</SPAN> at the same time.<br> You cannot specify the same register for <SPAN class="argument">dest</SPAN> and <SPAN class="argument">src0</SPAN>.<br>
48      </p>
49      <p class="warning">If you set <SPAN class="argument">dest</SPAN> to the register that immediately follows <SPAN class="argument">src1</SPAN> (this is <SPAN class="argument">src2</SPAN> in Macro Expansion below), there is no way to anticipate the result because the contents of that register will be updated during the execution of the expanded instructions.</p>
50    </div>
51
52    <h2>Overview</h2>
53    <div class="section">
54      <p>
55        Stores the result of multiplying a 3x2 matrix and a 3-component vector in <SPAN class="argument">dest</SPAN>.<br>
56      </p>
57    </div>
58
59    <h2>Operation</h2>
60    <div class="section">
61<pre class="definition">
62src2 = Next_Index_Of ( src1 )
63dest.x = ( src0.x * src1.x ) + ( src0.y * src1.y ) + ( src0.z * src1.z )
64dest.y = ( src0.x * src2.x ) + ( src0.y * src2.y ) + ( src0.z * src2.z )
65</pre>
66    </div>
67
68    <h2>Macro Expansion</h2>
69    <div class="section">
70<pre class="definition">
71dp3     dest.x, src0, src1
72dp3     dest.y, src0, src2  // src2 = next index of src1
73</pre>
74    </div>
75
76    <h2>Code Example</h2>
77    <div class="section">
78<pre class="definition">
79m3x2    r0.xy, r1, c0
80// This is expanded as follows
81// dp3     r0.x, r1, c0
82// dp3     r0.y, r1, c1
83</pre>
84    </div>
85
86    <h2>Timetable</h2>
87    <div class="section">
88      <table class="timetable">
89        <tr>
90          <th></th>
91          <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th>
92        </tr>
93        <tr>
94          <th><CODE>dp3</CODE></th>
95          <td class="read">read</td>
96          <td class="MUL">MUL</td>
97          <td class="ADD">ADD</td>
98          <td class="ADD">ADD</td>
99          <td class="post">post</td>
100          <td class="write">write</td>
101        </tr>
102        <tr>
103          <th><CODE>dp3</CODE></th>
104          <td class="empty"></td>
105          <td class="read">read</td>
106          <td class="MUL">MUL</td>
107          <td class="ADD">ADD</td>
108          <td class="ADD">ADD</td>
109          <td class="post">post</td>
110          <td class="write">write</td>
111          <td class="dummy"></td>
112        </tr>
113      </table>
114    </div>
115
116
117  <h2>Revision History</h2>
118  <div class="section">
119    <dl class="history">
120      <dt>2011/12/20</dt>
121      <dd>Initial version.<br />
122      </dd>
123    </dl>
124  </div>
125
126  <hr><p>CONFIDENTIAL</p></body>
127</html>