• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision2a080ce26682f35517b0e20f4ad10559e9270b5d (tree)
Time2015-10-23 02:51:49
AuthorChen Gang <gang.chen.5i5j@gmai...>
CommiterRichard Henderson

Log Message

target-tilegx: Implement prefetch instructions in pipe y2

Originally, tilegx qemu only implement prefetch instructions in pipe x1,
did not implement them in pipe y2.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>

Change Summary

Incremental Difference

--- a/target-tilegx/translate.c
+++ b/target-tilegx/translate.c
@@ -2105,38 +2105,44 @@ static TileExcp decode_y2(DisasContext *dc, tilegx_bundle_bits bundle)
21052105 unsigned srcbdest = get_SrcBDest_Y2(bundle);
21062106 const char *mnemonic;
21072107 TCGMemOp memop;
2108+ bool prefetch_nofault = false;
21082109
21092110 switch (OEY2(opc, mode)) {
21102111 case OEY2(LD1S_OPCODE_Y2, MODE_OPCODE_YA2):
21112112 memop = MO_SB;
2112- mnemonic = "ld1s";
2113+ mnemonic = "ld1s"; /* prefetch_l1_fault */
21132114 goto do_load;
21142115 case OEY2(LD1U_OPCODE_Y2, MODE_OPCODE_YA2):
21152116 memop = MO_UB;
2116- mnemonic = "ld1u";
2117+ mnemonic = "ld1u"; /* prefetch, prefetch_l1 */
2118+ prefetch_nofault = (srcbdest == TILEGX_R_ZERO);
21172119 goto do_load;
21182120 case OEY2(LD2S_OPCODE_Y2, MODE_OPCODE_YA2):
21192121 memop = MO_TESW;
2120- mnemonic = "ld2s";
2122+ mnemonic = "ld2s"; /* prefetch_l2_fault */
21212123 goto do_load;
21222124 case OEY2(LD2U_OPCODE_Y2, MODE_OPCODE_YA2):
21232125 memop = MO_TEUW;
2124- mnemonic = "ld2u";
2126+ mnemonic = "ld2u"; /* prefetch_l2 */
2127+ prefetch_nofault = (srcbdest == TILEGX_R_ZERO);
21252128 goto do_load;
21262129 case OEY2(LD4S_OPCODE_Y2, MODE_OPCODE_YB2):
21272130 memop = MO_TESL;
2128- mnemonic = "ld4s";
2131+ mnemonic = "ld4s"; /* prefetch_l3_fault */
21292132 goto do_load;
21302133 case OEY2(LD4U_OPCODE_Y2, MODE_OPCODE_YB2):
21312134 memop = MO_TEUL;
2132- mnemonic = "ld4u";
2135+ mnemonic = "ld4u"; /* prefetch_l3 */
2136+ prefetch_nofault = (srcbdest == TILEGX_R_ZERO);
21332137 goto do_load;
21342138 case OEY2(LD_OPCODE_Y2, MODE_OPCODE_YB2):
21352139 memop = MO_TEQ;
21362140 mnemonic = "ld";
21372141 do_load:
2138- tcg_gen_qemu_ld_tl(dest_gr(dc, srcbdest), load_gr(dc, srca),
2139- dc->mmuidx, memop);
2142+ if (!prefetch_nofault) {
2143+ tcg_gen_qemu_ld_tl(dest_gr(dc, srcbdest), load_gr(dc, srca),
2144+ dc->mmuidx, memop);
2145+ }
21402146 qemu_log_mask(CPU_LOG_TB_IN_ASM, "%s %s, %s", mnemonic,
21412147 reg_names[srcbdest], reg_names[srca]);
21422148 return TILEGX_EXCP_NONE;