00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 #ifndef __SYS_INST_H__ 00037 #define __SYS_INST_H__ 00038 #ident "$Revision$" 00039 00040 /* 00041 * inst.h -- instruction format defines 00042 */ 00043 00044 00045 /* for backward compatibility */ 00046 #define bb_ma_format ma_format 00047 00048 #ifndef _MIPSEL 00049 union mips_instruction { 00050 unsigned word; 00051 unsigned char byte[4]; 00052 struct { 00053 unsigned opcode : 6; 00054 unsigned target : 26; 00055 } j_format; 00056 struct { 00057 unsigned opcode : 6; 00058 unsigned rs : 5; 00059 unsigned rt : 5; 00060 signed simmediate : 16; 00061 } i_format; 00062 struct { 00063 unsigned opcode : 6; 00064 unsigned rs : 5; 00065 unsigned rt : 5; 00066 unsigned uimmediate : 16; 00067 } u_format; 00068 struct { /* new R4K cacheop format */ 00069 unsigned opcode : 6; 00070 unsigned rs : 5; 00071 unsigned c_op : 3; 00072 unsigned cache : 2; 00073 unsigned simmediate : 16; 00074 } c_format; 00075 struct { 00076 unsigned opcode : 6; 00077 unsigned rs : 5; 00078 unsigned rt : 5; 00079 unsigned rd : 5; 00080 unsigned re : 5; 00081 unsigned func : 6; 00082 } r_format; 00083 struct { 00084 unsigned opcode : 6; 00085 unsigned : 1; 00086 unsigned fmt : 4; 00087 unsigned rt : 5; 00088 unsigned rd : 5; 00089 unsigned re : 5; 00090 unsigned func : 6; 00091 } f_format; 00092 struct { 00093 unsigned opcode : 6; 00094 unsigned fr : 5; 00095 unsigned ft : 5; 00096 unsigned fs : 5; 00097 unsigned fd : 5; 00098 unsigned func : 3; 00099 unsigned fmt : 3; 00100 } ma_format; 00101 struct { 00102 unsigned opcode : 6; 00103 unsigned rs : 5; 00104 unsigned ft : 5; 00105 unsigned fs : 5; 00106 unsigned fd : 5; 00107 unsigned func : 6; 00108 } ps_format; 00109 struct { 00110 unsigned opcode : 6; 00111 unsigned sel : 4; 00112 unsigned fmt : 1; 00113 unsigned vt : 5; 00114 unsigned vs : 5; 00115 unsigned vd : 5; 00116 unsigned func : 6; 00117 } v_format; 00118 00119 }; 00120 #endif 00121 00122 #ifdef _MIPSEL 00123 union mips_instruction { 00124 unsigned word; 00125 unsigned char byte[4]; 00126 struct { 00127 unsigned target : 26; 00128 unsigned opcode : 6; 00129 } j_format; 00130 struct { 00131 signed simmediate : 16; 00132 unsigned rt : 5; 00133 unsigned rs : 5; 00134 unsigned opcode : 6; 00135 } i_format; 00136 struct { 00137 unsigned uimmediate : 16; 00138 unsigned rt : 5; 00139 unsigned rs : 5; 00140 unsigned opcode : 6; 00141 } u_format; 00142 struct { 00143 unsigned simmediate : 16; 00144 unsigned cache : 2; 00145 unsigned c_op : 3; 00146 unsigned rs : 5; 00147 unsigned opcode : 6; 00148 } c_format; 00149 struct { 00150 unsigned func : 6; 00151 unsigned re : 5; 00152 unsigned rd : 5; 00153 unsigned rt : 5; 00154 unsigned rs : 5; 00155 unsigned opcode : 6; 00156 } r_format; 00157 struct { 00158 unsigned func : 6; 00159 unsigned re : 5; 00160 unsigned rd : 5; 00161 unsigned rt : 5; 00162 unsigned fmt : 4; 00163 unsigned : 1; 00164 unsigned opcode : 6; 00165 } f_format; 00166 struct { 00167 unsigned fmt : 3; 00168 unsigned func : 3; 00169 unsigned fd : 5; 00170 unsigned fs : 5; 00171 unsigned ft : 5; 00172 unsigned fr : 5; 00173 unsigned opcode : 6; 00174 } ma_format; 00175 struct { 00176 unsigned func : 6; 00177 unsigned fd : 5; 00178 unsigned fs : 5; 00179 unsigned ft : 5; 00180 unsigned rs : 5; 00181 unsigned opcode : 6; 00182 } ps_format; 00183 struct { 00184 unsigned func : 6; 00185 unsigned vd : 5; 00186 unsigned vs : 5; 00187 unsigned vt : 5; 00188 unsigned fmt : 1; 00189 unsigned sel : 4; 00190 unsigned opcode : 6; 00191 } v_format; 00192 }; 00193 #endif 00194 00195 /* major opcodes */ 00196 #define spec_op 0x00 00197 #define bcond_op 0x01 00198 #define j_op 0x02 00199 #define jal_op 0x03 00200 00201 #define beq_op 0x04 00202 #define bne_op 0x05 00203 #define blez_op 0x06 00204 #define bgtz_op 0x07 00205 00206 #define addi_op 0x08 00207 #define addiu_op 0x09 00208 #define slti_op 0x0A 00209 #define sltiu_op 0x0B 00210 00211 #define andi_op 0x0C 00212 #define ori_op 0x0D 00213 #define xori_op 0x0E 00214 #define lui_op 0x0F 00215 00216 #define cop0_op 0x10 00217 #define cop1_op 0x11 00218 #define cop2_op 0x12 00219 #define cop1x_op 0x13 00220 00221 #define beql_op 0x14 00222 #define bnel_op 0x15 00223 #define blezl_op 0x16 00224 #define bgtzl_op 0x17 00225 00226 #define daddi_op 0x18 00227 #define daddiu_op 0x19 00228 #define ldl_op 0x1A 00229 #define ldr_op 0x1B 00230 00231 #define lb_op 0x20 00232 #define lh_op 0x21 00233 #define lwl_op 0x22 00234 #define lw_op 0x23 00235 00236 #define lbu_op 0x24 00237 #define lhu_op 0x25 00238 #define lwr_op 0x26 00239 #define lwu_op 0x27 00240 00241 #define sb_op 0x28 00242 #define sh_op 0x29 00243 #define swl_op 0x2A 00244 #define sw_op 0x2B 00245 00246 #define sdl_op 0x2C 00247 #define sdr_op 0x2D 00248 #define swr_op 0x2E 00249 #define cache_op 0x2F 00250 00251 #define ll_op 0x30 00252 #define lwc1_op 0x31 00253 #define lwc2_op 0x32 00254 #define pref_op 0x33 00255 00256 #define lld_op 0x34 00257 #define ldc1_op 0x35 00258 #define ldc2_op 0x36 00259 #define ld_op 0x37 00260 00261 #define sc_op 0x38 00262 #define swc1_op 0x39 00263 #define swc2_op 0x3A 00264 00265 #define scd_op 0x3C 00266 #define sdc1_op 0x3D 00267 #define sdc2_op 0x3E 00268 #define sd_op 0x3F 00269 00270 /* func field of spec opcode */ 00271 #define sll_op 0x00 00272 #define movc_op 0x01 00273 #define srl_op 0x02 00274 #define sra_op 0x03 00275 00276 #define sllv_op 0x04 00277 #define srlv_op 0x06 00278 #define srav_op 0x07 00279 00280 #define jr_op 0x08 00281 #define jalr_op 0x09 00282 #define movz_op 0x0A 00283 #define movn_op 0x0B 00284 00285 #define syscall_op 0x0C 00286 #define break_op 0x0D 00287 #define spim_op 0x0E 00288 #define sync_op 0x0F 00289 00290 #define mfhi_op 0x10 00291 #define mthi_op 0x11 00292 #define mflo_op 0x12 00293 #define mtlo_op 0x13 00294 00295 #define dsllv_op 0x14 00296 #define dsrlv_op 0x16 00297 #define dsrav_op 0x17 00298 00299 #define mult_op 0x18 00300 #define multu_op 0x19 00301 #define div_op 0x1A 00302 #define divu_op 0x1B 00303 00304 #define dmult_op 0x1C 00305 #define dmultu_op 0x1D 00306 #define ddiv_op 0x1E 00307 #define ddivu_op 0x1F 00308 00309 #define add_op 0x20 00310 #define addu_op 0x21 00311 #define sub_op 0x22 00312 #define subu_op 0x23 00313 00314 #define and_op 0x24 00315 #define or_op 0x25 00316 #define xor_op 0x26 00317 #define nor_op 0x27 00318 00319 #define slt_op 0x2A 00320 #define sltu_op 0x2B 00321 00322 #define dadd_op 0x2C 00323 #define daddu_op 0x2D 00324 #define dsub_op 0x2E 00325 #define dsubu_op 0x2F 00326 00327 #define tge_op 0x30 00328 #define tgeu_op 0x31 00329 #define tlt_op 0x32 00330 #define tltu_op 0x33 00331 00332 #define teq_op 0x34 00333 #define tne_op 0x36 00334 00335 #define dsll_op 0x38 00336 #define dsrl_op 0x3A 00337 #define dsra_op 0x3B 00338 00339 #define dsll32_op 0x3C 00340 #define dsrl32_op 0x3E 00341 #define dsra32_op 0x3F 00342 00343 /* rt field of bcond opcodes */ 00344 #define bltz_op 0x00 00345 #define bgez_op 0x01 00346 #define bltzl_op 0x02 00347 #define bgezl_op 0x03 00348 00349 #define spimi_op 0x04 00350 00351 #define tgei_op 0x08 00352 #define tgeiu_op 0x09 00353 #define tlti_op 0x0A 00354 #define tltiu_op 0x0B 00355 00356 #define teqi_op 0x0C 00357 #define tnei_op 0x0E 00358 00359 #define bltzal_op 0x10 00360 #define bgezal_op 0x11 00361 #define bltzall_op 0x12 00362 #define bgezall_op 0x13 00363 00364 /* rs field of cop opcodes */ 00365 #define mfc_op 0x00 00366 #define dmfc_op 0x01 00367 #define cfc_op 0x02 00368 #define mtc_op 0x04 00369 #define dmtc_op 0x05 00370 #define ctc_op 0x06 00371 #define bc_op 0x08 00372 #define cop_op 0x10 00373 #define copm_op 0x18 00374 00375 /* func field of cop0 COI opcodes */ 00376 #define tlbr_op 0x01 00377 #define tlbwi_op 0x02 00378 #define tlbwr_op 0x06 00379 #define tlbp_op 0x08 00380 #define rfe_op 0x10 00381 #define eret_op 0x18 00382 00383 /* func field of cop0 COM opcodes */ 00384 #define tlbr1_op 0x01 00385 #define tlbw_op 0x02 00386 #define tlbp1_op 0x08 00387 #define dctr_op 0x09 00388 #define dctw_op 0x0A 00389 00390 /* fmt field of cop1 opcodes */ 00391 #define s_fmt 0 00392 #define d_fmt 1 00393 #define e_fmt 2 00394 #define q_fmt 3 00395 #define w_fmt 4 00396 #define l_fmt 5 00397 #define ps_fmt 6 00398 00399 /* func field of cop1/{s,d,w} opcodes */ 00400 #define fadd_op 0x00 00401 #define fsub_op 0x01 00402 #define fmul_op 0x02 00403 #define fdiv_op 0x03 00404 00405 #define fsqrt_op 0x04 00406 #define fabs_op 0x05 00407 #define fmov_op 0x06 00408 #define fneg_op 0x07 00409 00410 #define froundl_op 0x08 00411 #define ftruncl_op 0x09 00412 #define fceill_op 0x0a 00413 #define ffloorl_op 0x0b 00414 00415 #define fround_op 0x0c 00416 #define ftrunc_op 0x0d 00417 #define fceil_op 0x0e 00418 #define ffloor_op 0x0f 00419 00420 #define fmovc_op 0x11 00421 #define fmovz_op 0x12 00422 #define fmovn_op 0x13 00423 00424 #define frecip_op 0x15 00425 #define frsqrt_op 0x16 00426 00427 #define fcvts_op 0x20 00428 #define fcvtspl_op 0x20 00429 #define fcvtd_op 0x21 00430 #define fcvte_op 0x22 00431 00432 #define fcvtw_op 0x24 00433 #define fcvtl_op 0x25 00434 #define fcvtps_op 0x26 00435 #define fcvtspu_op 0x28 00436 #define fpll_op 0x2c 00437 #define fplu_op 0x2d 00438 #define fpul_op 0x2e 00439 #define fpuu_op 0x2f 00440 00441 #define fcmp_op 0x30 00442 00443 /* func field of cop1x opcodes */ 00444 00445 #define lwxc1_op 0x00 00446 #define ldxc1_op 0x01 00447 #define luxc1_op 0x05 00448 #define swxc1_op 0x08 00449 #define sdxc1_op 0x09 00450 #define suxc1_op 0x0d 00451 #define pfetch_op 0x0f 00452 #define alnv_ps_op 0x1c 00453 #define madd_s_op 0x20 00454 #define madd_d_op 0x21 00455 #define madd_e_op 0x22 00456 #define madd_ps_op 0x26 00457 #define msub_s_op 0x28 00458 #define msub_d_op 0x29 00459 #define msub_e_op 0x2a 00460 #define msub_ps_op 0x2e 00461 #define nmadd_s_op 0x30 00462 #define nmadd_d_op 0x31 00463 #define nmadd_e_op 0x32 00464 #define nmadd_ps_op 0x36 00465 #define nmsub_s_op 0x38 00466 #define nmsub_d_op 0x39 00467 #define nmsub_e_op 0x3a 00468 #define nmsub_ps_op 0x3e 00469 00470 /* func field of cop2 opcodes */ 00471 #define vmsgn_op 0x00 00472 #define vcmp_eq_op 0x01 00473 #define vpickf_op 0x02 00474 #define vpickt_op 0x03 00475 #define vcmp_lt_op 0x04 00476 #define vcmp_le_op 0x05 00477 #define vmin_op 0x06 00478 #define vmax_op 0x07 00479 #define vsub_op 0x0a 00480 #define vadd_op 0x0b 00481 #define vand_op 0x0c 00482 #define vxor_op 0x0d 00483 #define vor_op 0x0e 00484 #define vnor_op 0x0f 00485 #define vsll_op 0x10 00486 #define vsrl_op 0x12 00487 #define vsra_op 0x13 00488 #define valni_ob_op 0x18 00489 #define valnv_ob_op 0x19 00490 #define valni_qh_op 0x1a 00491 #define valnv_qh_op 0x1b 00492 #define vshfl_op 0x1f 00493 #define vrnd_zu_op 0x20 00494 #define vrnd_nau_op 0x21 00495 #define vrnd_neu_op 0x22 00496 #define vrnd_zs_op 0x24 00497 #define vrnd_nas_op 0x25 00498 #define vrnd_nes_op 0x26 00499 #define vmul_op 0x30 00500 #define vmuls_op 0x32 00501 #define vmula_op 0x33 00502 #define vsuba_op 0x36 00503 #define vadda_op 0x37 00504 #define vwac_op 0x3e 00505 #define vrac_op 0x3f 00506 00507 /* format field of cop2 opcodes */ 00508 #define ob_fmt 0x0 00509 #define qh_fmt 0x1 00510 00511 /* func field for mad opcodes (ma_format.func) */ 00512 #define madd_op 0x04 00513 #define msub_op 0x05 00514 #define nmadd_op 0x06 00515 #define nmsub_op 0x07 00516 00517 /* obsolete opcodes */ 00518 #define cop3_op 0x13 00519 00520 00521 #ifdef _LANGUAGE_PASCAL 00522 00523 #ifdef _MIPSEB 00524 type 00525 mips_instruction = 00526 packed record 00527 case cardinal of 00528 0: ( 00529 word: cardinal; 00530 ); 00531 1: ( 00532 byte: packed array[0..3] of 0..255; 00533 ); 00534 2: ( 00535 opcode: 0..63; 00536 target: 0..67108863; 00537 ); 00538 3: ( 00539 opcode3: 0..63; 00540 rs: 0..31; 00541 rt: 0..31; 00542 simmediate: -32768..32767; 00543 ); 00544 4: ( 00545 opcode4: 0..63; 00546 rs4: 0..63; 00547 rt4: 0..63; 00548 uimmediate: 0..65535; 00549 ); 00550 5: ( 00551 opcode5: 0..63; 00552 rs5: 0..63; 00553 rt5: 0..63; 00554 rd5: 0..63; 00555 re5: 0..63; 00556 func: 0..63; 00557 ); 00558 end {record}; 00559 #endif 00560 00561 #ifdef _MIPSEL 00562 type 00563 mips_instruction = 00564 packed record 00565 case cardinal of 00566 0: ( 00567 word: cardinal; 00568 ); 00569 1: ( 00570 byte: packed array[0..3] of 0..255; 00571 ); 00572 2: ( 00573 target: 0..67108863; 00574 opcode: 0..63; 00575 ); 00576 3: ( 00577 simmediate: -32768..32767; 00578 rt: 0..31; 00579 rs: 0..31; 00580 opcode3: 0..63; 00581 ); 00582 4: ( 00583 uimmediate: 0..65535; 00584 rt4: 0..63; 00585 rs4: 0..63; 00586 opcode4: 0..63; 00587 ); 00588 5: ( 00589 func: 0..63; 00590 re5: 0..63; 00591 rd5: 0..63; 00592 rt5: 0..63; 00593 rs5: 0..63; 00594 opcode5: 0..63; 00595 ); 00596 end {record}; 00597 #endif 00598 00599 const 00600 /* major opcodes */ 00601 spec_op = 16#00; 00602 bcond_op = 16#01; 00603 j_op = 16#02; 00604 jal_op = 16#03; 00605 00606 beq_op = 16#04; 00607 bne_op = 16#05; 00608 blez_op = 16#06; 00609 bgtz_op = 16#07; 00610 00611 addi_op = 16#08; 00612 addiu_op = 16#09; 00613 slti_op = 16#0A; 00614 sltiu_op = 16#0B; 00615 00616 andi_op = 16#0C; 00617 ori_op = 16#0D; 00618 xori_op = 16#0E; 00619 lui_op = 16#0F; 00620 00621 cop0_op = 16#10; 00622 cop1_op = 16#11; 00623 cop2_op = 16#12; 00624 cop1x_op = 16#13; 00625 00626 beql_op = 16#14; 00627 bnel_op = 16#15; 00628 blezl_op = 16#16; 00629 bgtzl_op = 16#17; 00630 00631 daddi_op = 16#18; 00632 daddiu_op = 16#19; 00633 ldl_op = 16#1A; 00634 ldr_op = 16#1B; 00635 00636 lb_op = 16#20; 00637 lh_op = 16#21; 00638 lwl_op = 16#22; 00639 lw_op = 16#23; 00640 00641 lbu_op = 16#24; 00642 lhu_op = 16#25; 00643 lwr_op = 16#26; 00644 lwu_op = 16#27; 00645 00646 sb_op = 16#28; 00647 sh_op = 16#29; 00648 swl_op = 16#2A; 00649 sw_op = 16#2B; 00650 00651 sdl_op = 16#2C; 00652 sdr_op = 16#2D; 00653 swr_op = 16#2E; 00654 cache_op = 16#2F; 00655 00656 ll_op = 16#30; 00657 lwc1_op = 16#31; 00658 lwc2_op = 16#32; 00659 pref_op = 16#33; 00660 00661 lld_op = 16#34; 00662 ldc1_op = 16#35; 00663 ldc2_op = 16#36; 00664 ld_op = 16#37; 00665 00666 sc_op = 16#38; 00667 swc1_op = 16#39; 00668 swc2_op = 16#3A; 00669 00670 scd_op = 16#3C; 00671 sdc1_op = 16#3D; 00672 sdc2_op = 16#3E; 00673 sd_op = 16#3F; 00674 00675 /* func field of spec opcode */ 00676 sll_op = 16#00; 00677 movc_op = 16#01; 00678 srl_op = 16#02; 00679 sra_op = 16#03; 00680 00681 sllv_op = 16#04; 00682 srlv_op = 16#06; 00683 srav_op = 16#07; 00684 00685 jr_op = 16#08; 00686 jalr_op = 16#09; 00687 movz_op = 16#0A; 00688 movn_op = 16#0B; 00689 00690 syscall_op = 16#0C; 00691 break_op = 16#0D; 00692 spim_op = 16#0E; 00693 sync_op = 16#0F; 00694 00695 mfhi_op = 16#10; 00696 mthi_op = 16#11; 00697 mflo_op = 16#12; 00698 mtlo_op = 16#13; 00699 00700 dsllv_op = 16#14; 00701 dsrlv_op = 16#16; 00702 dsrav_op = 16#17; 00703 00704 mult_op = 16#18; 00705 multu_op = 16#19; 00706 div_op = 16#1A; 00707 divu_op = 16#1B; 00708 00709 dmult_op = 16#1C; 00710 dmultu_op = 16#1D; 00711 ddiv_op = 16#1E; 00712 ddivu_op = 16#1F; 00713 00714 add_op = 16#20; 00715 addu_op = 16#21; 00716 sub_op = 16#22; 00717 subu_op = 16#23; 00718 00719 and_op = 16#24; 00720 or_op = 16#25; 00721 xor_op = 16#26; 00722 nor_op = 16#27; 00723 00724 slt_op = 16#2A; 00725 sltu_op = 16#2B; 00726 00727 dadd_op = 16#2C; 00728 daddu_op = 16#2D; 00729 dsub_op = 16#2E; 00730 dsubu_op = 16#2F; 00731 00732 tge_op = 16#30; 00733 tgeu_op = 16#31; 00734 tlt_op = 16#32; 00735 tltu_op = 16#33; 00736 00737 teq_op = 16#34; 00738 tne_op = 16#36; 00739 00740 dsll_op = 16#38; 00741 dsrl_op = 16#3A; 00742 dsra_op = 16#3B; 00743 00744 dsll32_op = 16#3C; 00745 dsrl32_op = 16#3E; 00746 dsra32_op = 16#3F; 00747 00748 /* rt field of bcond opcodes */ 00749 bltz_op = 16#00; 00750 bgez_op = 16#01; 00751 bltzl_op = 16#02; 00752 bgezl_op = 16#03; 00753 00754 spimi_op = 16#04; 00755 00756 tgei_op = 16#08; 00757 tgeiu_op = 16#09; 00758 tlti_op = 16#0A; 00759 tltiu_op = 16#0B; 00760 00761 teqi_op = 16#0C; 00762 tnei_op = 16#0E; 00763 00764 bltzal_op = 16#10; 00765 bgezal_op = 16#11; 00766 bltzall_op = 16#12; 00767 bgezall_op = 16#13; 00768 00769 /* rs field of cop opcodes */ 00770 mfc_op = 16#00; 00771 dmfc_op = 16#01; 00772 cfc_op = 16#02; 00773 mtc_op = 16#04; 00774 dmtc_op = 16#05; 00775 ctc_op = 16#06; 00776 bc_op = 16#08; 00777 cop_op = 16#10; 00778 copm_op = 16#18; 00779 00780 /* func field of cop0 COI opcodes */ 00781 tlbr_op = 16#1; 00782 tlbwi_op = 16#2; 00783 tlbwr_op = 16#6; 00784 tlbp_op = 16#8; 00785 rfe_op = 16#10; 00786 eret_op = 16#18; 00787 00788 /* func field of cop0 COM opcodes */ 00789 tlbr1_op = 16#1; 00790 tlbw_op = 16#2; 00791 tlbp1_op = 16#8; 00792 dctr_op = 16#9; 00793 dctw_op = 16#a; 00794 00795 /* fmt field of cop1 opcodes */ 00796 s_fmt = 0; 00797 d_fmt = 1; 00798 e_fmt = 2; 00799 q_fmt = 3; 00800 w_fmt = 4; 00801 l_fmt = 5; 00802 ps_fmt = 6; 00803 00804 /* func field of cop1/{s,d,w} opcodes */ 00805 fadd_op = 16#00; 00806 fsub_op = 16#01; 00807 fmul_op = 16#02; 00808 fdiv_op = 16#03; 00809 00810 fsqrt_op = 16#04; 00811 fabs_op = 16#05; 00812 fmov_op = 16#06; 00813 fneg_op = 16#07; 00814 00815 froundl_op = 16#08; 00816 ftruncl_op = 16#09; 00817 fceill_op = 16#0a; 00818 ffloorl_op = 16#0b; 00819 00820 fround_op = 16#0c; 00821 ftrunc_op = 16#0d; 00822 fceil_op = 16#0e; 00823 ffloor_op = 16#0f; 00824 00825 fmovc_op = 16#11; 00826 fmovz_op = 16#12; 00827 fmovn_op = 16#13; 00828 00829 frecip_op = 16#15; 00830 frsqrt_op = 16#16; 00831 00832 fcvts_op = 16#20; 00833 fcvtd_op = 16#21; 00834 fcvte_op = 16#22; 00835 00836 fcvtw_op = 16#24; 00837 fcvtl_op = 16#25; 00838 00839 fcmp_op = 16#30; 00840 00841 /* func field of cop1x opcodes */ 00842 lwxc1_op = 16#00; 00843 ldxc1_op = 16#01; 00844 swxc1_op = 16#08; 00845 sdxc1_op = 16#09; 00846 pfetch_op = 16#0F; 00847 madd_s_op = 16#20; 00848 madd_d_op = 16#21; 00849 msub_s_op = 16#28; 00850 msub_d_op = 16#29; 00851 nmadd_s_op = 16#30; 00852 nmadd_d_op = 16#31; 00853 nmsub_s_op = 16#38; 00854 nmsub_d_op = 16#39; 00855 00856 /* func field of mad opcodes */ 00857 madd_op = 16#04; 00858 msub_op = 16#05; 00859 nmadd_op = 16#06; 00860 nmsub_op = 16#07; 00861 00862 #endif /* _LANGUAGE_PASCAL */ 00863 00864 #endif /* __SYS_INST_H__ */
1.5.6