decoder.isa
来自「M5,一个功能强大的多处理器系统模拟器.很多针对处理器架构,性能的研究都使用它作」· ISA 代码 · 共 1,286 行 · 第 1/5 页
ISA
1,286 行
0x0: c_f_s({{ cond = 0; }}, SinglePrecision, UnorderedFalse); 0x1: c_un_s({{ cond = 0; }}, SinglePrecision, UnorderedTrue); 0x2: c_eq_s({{ cond = (Fs.sf == Ft.sf); }}, UnorderedFalse); 0x3: c_ueq_s({{ cond = (Fs.sf == Ft.sf); }}, UnorderedTrue); 0x4: c_olt_s({{ cond = (Fs.sf < Ft.sf); }}, UnorderedFalse); 0x5: c_ult_s({{ cond = (Fs.sf < Ft.sf); }}, UnorderedTrue); 0x6: c_ole_s({{ cond = (Fs.sf <= Ft.sf); }}, UnorderedFalse); 0x7: c_ule_s({{ cond = (Fs.sf <= Ft.sf); }}, UnorderedTrue); } } 0x7: decode FUNCTION_LO { format FloatCompareOp { 0x0: c_sf_s({{ cond = 0; }}, SinglePrecision, UnorderedFalse, QnanException); 0x1: c_ngle_s({{ cond = 0; }}, SinglePrecision, UnorderedTrue, QnanException); 0x2: c_seq_s({{ cond = (Fs.sf == Ft.sf);}}, UnorderedFalse, QnanException); 0x3: c_ngl_s({{ cond = (Fs.sf == Ft.sf); }}, UnorderedTrue, QnanException); 0x4: c_lt_s({{ cond = (Fs.sf < Ft.sf); }}, UnorderedFalse, QnanException); 0x5: c_nge_s({{ cond = (Fs.sf < Ft.sf); }}, UnorderedTrue, QnanException); 0x6: c_le_s({{ cond = (Fs.sf <= Ft.sf); }}, UnorderedFalse, QnanException); 0x7: c_ngt_s({{ cond = (Fs.sf <= Ft.sf); }}, UnorderedTrue, QnanException); } } } //Table A-15 MIPS32 COP1 Encoding of Function Field When rs=D 0x1: decode FUNCTION_HI { 0x0: decode FUNCTION_LO { format FloatOp { 0x0: add_d({{ Fd.df = Fs.df + Ft.df; }}); 0x1: sub_d({{ Fd.df = Fs.df - Ft.df; }}); 0x2: mul_d({{ Fd.df = Fs.df * Ft.df; }}); 0x3: div_d({{ Fd.df = Fs.df / Ft.df; }}); 0x4: sqrt_d({{ Fd.df = sqrt(Fs.df); }}); 0x5: abs_d({{ Fd.df = fabs(Fs.df); }}); 0x7: neg_d({{ Fd.df = -1 * Fs.df; }}); } 0x6: BasicOp::mov_d({{ Fd.df = Fs.df; }}); } 0x1: decode FUNCTION_LO { format FloatConvertOp { 0x0: round_l_d({{ val = Fs.df; }}, ToLong, Round); 0x1: trunc_l_d({{ val = Fs.df; }}, ToLong, Trunc); 0x2: ceil_l_d({{ val = Fs.df; }}, ToLong, Ceil); 0x3: floor_l_d({{ val = Fs.df; }}, ToLong, Floor); 0x4: round_w_d({{ val = Fs.df; }}, ToWord, Round); 0x5: trunc_w_d({{ val = Fs.df; }}, ToWord, Trunc); 0x6: ceil_w_d({{ val = Fs.df; }}, ToWord, Ceil); 0x7: floor_w_d({{ val = Fs.df; }}, ToWord, Floor); } } 0x2: decode FUNCTION_LO { 0x1: decode MOVCF { format BasicOp { 0x0: movf_d({{ Fd.df = (getCondCode(FCSR,CC) == 0) ? Fs.df : Fd.df; }}); 0x1: movt_d({{ Fd.df = (getCondCode(FCSR,CC) == 1) ? Fs.df : Fd.df; }}); } } format BasicOp { 0x2: movz_d({{ Fd.df = (Rt == 0) ? Fs.df : Fd.df; }}); 0x3: movn_d({{ Fd.df = (Rt != 0) ? Fs.df : Fd.df; }}); } format FloatOp { 0x5: recip_d({{ Fd.df = 1 / Fs.df }}); 0x6: rsqrt_d({{ Fd.df = 1 / sqrt(Fs.df) }}); } format CP1Unimpl { default: unknown(); } } 0x4: decode FUNCTION_LO { format FloatConvertOp { 0x0: cvt_s_d({{ val = Fs.df; }}, ToSingle); 0x4: cvt_w_d({{ val = Fs.df; }}, ToWord); 0x5: cvt_l_d({{ val = Fs.df; }}, ToLong); } default: CP1Unimpl::unknown(); } 0x6: decode FUNCTION_LO { format FloatCompareOp { 0x0: c_f_d({{ cond = 0; }}, DoublePrecision, UnorderedFalse); 0x1: c_un_d({{ cond = 0; }}, DoublePrecision, UnorderedTrue); 0x2: c_eq_d({{ cond = (Fs.df == Ft.df); }}, UnorderedFalse); 0x3: c_ueq_d({{ cond = (Fs.df == Ft.df); }}, UnorderedTrue); 0x4: c_olt_d({{ cond = (Fs.df < Ft.df); }}, UnorderedFalse); 0x5: c_ult_d({{ cond = (Fs.df < Ft.df); }}, UnorderedTrue); 0x6: c_ole_d({{ cond = (Fs.df <= Ft.df); }}, UnorderedFalse); 0x7: c_ule_d({{ cond = (Fs.df <= Ft.df); }}, UnorderedTrue); } } 0x7: decode FUNCTION_LO { format FloatCompareOp { 0x0: c_sf_d({{ cond = 0; }}, DoublePrecision, UnorderedFalse, QnanException); 0x1: c_ngle_d({{ cond = 0; }}, DoublePrecision, UnorderedTrue, QnanException); 0x2: c_seq_d({{ cond = (Fs.df == Ft.df); }}, UnorderedFalse, QnanException); 0x3: c_ngl_d({{ cond = (Fs.df == Ft.df); }}, UnorderedTrue, QnanException); 0x4: c_lt_d({{ cond = (Fs.df < Ft.df); }}, UnorderedFalse, QnanException); 0x5: c_nge_d({{ cond = (Fs.df < Ft.df); }}, UnorderedTrue, QnanException); 0x6: c_le_d({{ cond = (Fs.df <= Ft.df); }}, UnorderedFalse, QnanException); 0x7: c_ngt_d({{ cond = (Fs.df <= Ft.df); }}, UnorderedTrue, QnanException); } } default: CP1Unimpl::unknown(); } 0x2: CP1Unimpl::unknown(); 0x3: CP1Unimpl::unknown(); 0x7: CP1Unimpl::unknown(); //Table A-16 MIPS32 COP1 Encoding of Function Field When rs=W 0x4: decode FUNCTION { format FloatConvertOp { 0x20: cvt_s_w({{ val = Fs.uw; }}, ToSingle); 0x21: cvt_d_w({{ val = Fs.uw; }}, ToDouble); 0x26: CP1Unimpl::cvt_ps_w(); } default: CP1Unimpl::unknown(); } //Table A-16 MIPS32 COP1 Encoding of Function Field When rs=L1 //Note: "1. Format type L is legal only if 64-bit floating point operations //are enabled." 0x5: decode FUNCTION_HI { format FloatConvertOp { 0x20: cvt_s_l({{ val = Fs.ud; }}, ToSingle); 0x21: cvt_d_l({{ val = Fs.ud; }}, ToDouble); 0x26: CP1Unimpl::cvt_ps_l(); } default: CP1Unimpl::unknown(); } //Table A-17 MIPS64 COP1 Encoding of Function Field When rs=PS1 //Note: "1. Format type PS is legal only if 64-bit floating point operations //are enabled. " 0x6: decode FUNCTION_HI { 0x0: decode FUNCTION_LO { format Float64Op { 0x0: add_ps({{ Fd1.sf = Fs1.sf + Ft2.sf; Fd2.sf = Fs2.sf + Ft2.sf; }}); 0x1: sub_ps({{ Fd1.sf = Fs1.sf - Ft2.sf; Fd2.sf = Fs2.sf - Ft2.sf; }}); 0x2: mul_ps({{ Fd1.sf = Fs1.sf * Ft2.sf; Fd2.sf = Fs2.sf * Ft2.sf; }}); 0x5: abs_ps({{ Fd1.sf = fabs(Fs1.sf); Fd2.sf = fabs(Fs2.sf); }}); 0x6: mov_ps({{ Fd1.sf = Fs1.sf; Fd2.sf = Fs2.sf; }}); 0x7: neg_ps({{ Fd1.sf = -(Fs1.sf); Fd2.sf = -(Fs2.sf); }}); default: CP1Unimpl::unknown(); } } 0x1: CP1Unimpl::unknown(); 0x2: decode FUNCTION_LO { 0x1: decode MOVCF { format Float64Op { 0x0: movf_ps({{ Fd1 = (getCondCode(FCSR, CC) == 0) ? Fs1 : Fd1; Fd2 = (getCondCode(FCSR, CC+1) == 0) ? Fs2 : Fd2; }}); 0x1: movt_ps({{ Fd2 = (getCondCode(FCSR, CC) == 1) ? Fs1 : Fd1; Fd2 = (getCondCode(FCSR, CC+1) == 1) ? Fs2 : Fd2; }}); } } format Float64Op { 0x2: movz_ps({{ Fd1 = (getCondCode(FCSR, CC) == 0) ? Fs1 : Fd1; Fd2 = (getCondCode(FCSR, CC) == 0) ? Fs2 : Fd2; }}); 0x3: movn_ps({{ Fd1 = (getCondCode(FCSR, CC) == 1) ? Fs1 : Fd1; Fd2 = (getCondCode(FCSR, CC) == 1) ? Fs2 : Fd2; }}); } default: CP1Unimpl::unknown(); } 0x3: CP1Unimpl::unknown(); 0x4: decode FUNCTION_LO { 0x0: FloatOp::cvt_s_pu({{ Fd
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?