16.02.2013 Aufrufe

24531904_j

24531904_j

24531904_j

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

pshr ─ 並列右シフト (Parallel Shift Right)<br />

書式 : (qp) pshr2r 1 = r 3 , r 2 signed_form, two_byte_form, variable_form I5<br />

(qp) pshr2r 1 = r 3 , count 5 signed_form, two_byte_form, fixed_form I6<br />

(qp) pshr2.ur 1 = r 3 , r 2 unsigned_form, two_byte_form, variable_form I5<br />

(qp) pshr2.ur 1 = r 3 , count 5 unsigned_form, two_byte_form, fixed_form I6<br />

(qp) pshr4r 1 = r 3 , r 2 signed_form, four_byte_form, variable_form I5<br />

(qp) pshr4r 1 = r 3 , count 5 signed_form, four_byte_form, fixed_form I6<br />

(qp) pshr4.ur 1 = r 3 , r 2 unsigned_form, four_byte_form, variable_form I5<br />

(qp) pshr4.ur 1 = r 3 , count 5 unsigned_form, four_byte_form, fixed_form I6<br />

説明 : GR r 2 の各デー タ要素が、 GR r 3 または即値フ ィールド count 5 のスカラ ・ シフ ト ・ カウン<br />

ト だけ、 それぞれ独立に右にシフ ト される。 各要素の上位ビ ッ ト には、 算術シフ ト の場<br />

合は GR r 3 の各デー タ要素の符号ビ ッ ト の初期値が埋め ら れ、 論理シ フ ト の場合はゼ ロ<br />

が埋められる。 シフ ト ・ カウン ト は符号なし として解釈される。 シフ ト ・ カウン ト が 15<br />

(16 ビ ッ ト の数値の場合 ) あるいは 31 (32 ビ ッ ト の数値の場合 ) を超える場合は、 GR r 3<br />

の各デ ー タ要素の符号ビ ッ ト の初期値、 お よ び符号付き、 符号なしの ど ち ら のシ フ ト が<br />

行われたかに よ って、 結果はすべて 0 ビットかすべて1 ビッ トになる。 結果はGR r 1 に<br />

格納 さ れる。<br />

操作 : if (PR[qp]) {<br />

check_target_register(r 1 );<br />

shift_count = (variable_form ? GR[r 2 ] : count 5 );<br />

tmp_nat = (variable_form ? GR[r 2 ].nat : 0);<br />

if (two_byte_form) { // two_byte_form<br />

if (shift_count u> 16)<br />

shift_count = 16;<br />

if (unsigned_form) { // unsigned shift<br />

GR[r 1 ]{15:0} = shift_right_unsigned(zero_ext(GR[r 3 ]{15:0}, 16),<br />

shift_count);<br />

GR[r 1 ]{31:16} = shift_right_unsigned(zero_ext(GR[r 3 ]{31:16}, 16),<br />

shift_count);<br />

GR[r 1 ]{47:32} = shift_right_unsigned(zero_ext(GR[r 3 ]{47:32}, 16),<br />

shift_count);<br />

GR[r 1 ]{63:48} = shift_right_unsigned(zero_ext(GR[r 3 ]{63:48}, 16),<br />

shift_count);<br />

} else { // signed shift<br />

GR[r 1 ]{15:0} = shift_right_signed(sign_ext(GR[r 3 ]{15:0}, 16),<br />

shift_count);<br />

GR[r 1 ]{31:16} = shift_right_signed(sign_ext(GR[r 3 ]{31:16}, 16),<br />

shift_count);<br />

GR[r 1 ]{47:32} = shift_right_signed(sign_ext(GR[r 3 ]{47:32}, 16),<br />

shift_count);<br />

GR[r 1 ]{63:48} = shift_right_signed(sign_ext(GR[r 3 ]{63:48}, 16),<br />

shift_count);<br />

}<br />

} else { // four_byte_form<br />

if (shift_count > 32)<br />

shift_count = 32;<br />

if (unsigned_form) { // unsigned shift<br />

GR[r 1 ]{31:0} = shift_right_unsigned(zero_ext(GR[r 3 ]{31:0}, 32),<br />

shift_count);<br />

GR[r 1 ]{63:32} = shift_right_unsigned(zero_ext(GR[r 3 ]{63:32}, 32),<br />

shift_count);<br />

} else { // signed shift<br />

GR[r 1]{31:0} = shift_right_signed(sign_ext(GR[r 3]{31:0}, 32),<br />

shift_count);<br />

3:198 第 3 巻 : 命令リファレンス<br />

pshr

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!