24531904_j

24531904_j 24531904_j

16.02.2013 Aufrufe

操作 : if (PR[qp]) { if (p1 == p2) illegal_operation_fault(); tmp_nat = (register_form ? GR[r 2].nat : 0) || GR[r 3].nat; if (register_form) tmp_src = GR[r 2 ]; else if (imm8_form) tmp_src = sign_ext(imm 8 , 8); else // parallel_inequality_form tmp_src = 0; if (crel == ‘eq’) tmp_rel = tmp_src{31:0} == GR[r 3 ]{31:0}; else if (crel == ‘ne’) tmp_rel = tmp_src{31:0} != GR[r 3 ]{31:0}; else if (crel == ‘lt’) tmp_rel = lesser_signed(sign_ext(tmp_src, 32), sign_ext(GR[r 3 ], 32)); else if (crel == ‘le’) tmp_rel = lesser_equal_signed(sign_ext(tmp_src, 32), sign_ext(GR[r 3 ], 32)); else if (crel == ‘gt’) tmp_rel = greater_signed(sign_ext(tmp_src, 32), sign_ext(GR[r 3 ], 32)); else if (crel == ‘ge’) tmp_rel = greater_equal_signed(sign_ext(tmp_src, 32), sign_ext(GR[r 3 ], 32)); else if (crel == ‘ltu’) tmp_rel = lesser(zero_ext(tmp_src, 32), zero_ext(GR[r 3 ], 32)); else if (crel == ‘leu’) tmp_rel = lesser_equal(zero_ext(tmp_src, 32), zero_ext(GR[r 3 ], 32)); else if (crel == ‘gtu’) tmp_rel = greater(zero_ext(tmp_src, 32), zero_ext(GR[r 3 ], 32)); else // ‘geu’ tmp_rel = greater_equal(zero_ext(tmp_src, 32), zero_ext(GR[r 3 ], 32)); cmp4 switch (ctype) { case ‘and’: // and-type compare if (tmp_nat || !tmp_rel) { PR[p 1 ] = 0; PR[p 2 ] = 0; } break; case ‘or’: // or-type compare if (!tmp_nat && tmp_rel) { PR[p 1 ] = 1; PR[p 2 ] = 1; } break; case ‘or.andcm’: // or.andcm-type compare if (!tmp_nat && tmp_rel) { PR[p 1 ] = 1; PR[p 2 ] = 0; } break; case ‘unc’: // unc-type compare default: // normal compare if (tmp_nat) { 3:38 第 3 巻 : 命令リファレンス

cmp4 PR[p1 ] = 0; PR[p2] = 0; } else { PR[p1 ] = tmp_rel; PR[p2] = !tmp_rel; } break; } } else { if (ctype == ‘unc’) { if (p1 == p2) illegal_operation_fault(); PR[p1 ] = 0; PR[p2 ] = 0; } } 割り込み : 無効操作フ ォ ル ト 第 3 巻 : 命令リファレンス 3:39

cmp4<br />

PR[p1 ] = 0;<br />

PR[p2] = 0;<br />

} else {<br />

PR[p1 ] = tmp_rel;<br />

PR[p2] = !tmp_rel;<br />

}<br />

break;<br />

}<br />

} else {<br />

if (ctype == ‘unc’) {<br />

if (p1 == p2)<br />

illegal_operation_fault();<br />

PR[p1 ] = 0;<br />

PR[p2 ] = 0;<br />

}<br />

}<br />

割り込み : 無効操作フ ォ ル ト<br />

第 3 巻 : 命令リファレンス 3:39

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

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!