Commit f67ecfdc authored by Connor Abbott's avatar Connor Abbott

Merge branch 'midgard-discard' into 'disasm-midgard'

Midgard discard

See merge request !4
parents 2173447c 28038dbf
......@@ -141,7 +141,7 @@ static void print_alu_opcode(lima_t6xx_alu_op_e op)
int_op = alu_opcode_names[op][0] == 'i';
} else
printf("op_%02X", op);
printf("alu_op_%02X", op);
/* For constant analysis */
is_instruction_int = int_op;
......@@ -152,7 +152,7 @@ static void print_ld_st_opcode(lima_t6xx_load_store_op_e op)
if (load_store_opcode_names[op])
printf("%s", load_store_opcode_names[op]);
else
printf("op_%02X", op);
printf("ldst_op_%02X", op);
}
static bool is_embedded_constant_half = false;
......@@ -466,7 +466,7 @@ static void print_compact_branch_writeout_field(uint16_t word)
{
lima_t6xx_branch_uncond_t br_uncond;
memcpy((char*) &br_uncond, (char*) &word, sizeof(br_uncond));
printf("br_uncond ");
printf("br.uncond ");
if (br_uncond.unknown != 1)
printf("unknown:%d, ", br_uncond.unknown);
if (br_uncond.offset > 0)
......@@ -476,10 +476,21 @@ static void print_compact_branch_writeout_field(uint16_t word)
}
case lima_t6xx_jmp_writeout_op_branch_cond:
case lima_t6xx_jmp_writeout_op_writeout:
case lima_t6xx_jmp_writeout_op_discard:
{
lima_t6xx_branch_cond_t br_cond;
memcpy((char*) &br_cond, (char*) &word, sizeof(br_cond));
printf("br_cond.");
printf("br.");
switch (op)
{
case lima_t6xx_jmp_writeout_op_branch_cond: printf("cond."); break;
case lima_t6xx_jmp_writeout_op_writeout: printf("write."); break;
case lima_t6xx_jmp_writeout_op_discard: printf("discard."); break;
default: break;
}
switch (br_cond.cond)
{
case 0: printf("unk0"); break;
......@@ -496,7 +507,7 @@ static void print_compact_branch_writeout_field(uint16_t word)
}
default:
{
printf("op_%d\n", word & 0x7);
printf("br_op_%d\n", word & 0x7);
}
}
}
......@@ -664,6 +675,13 @@ static void print_alu_word(uint32_t* words, unsigned num_quad_words,
(float) (hconsts[2]),
(float) (hconsts[3]));
#endif
uint16_t* hconsts = (uint16_t*) consts;
printf("hconstants %g, %g, %g, %g\n",
ogt_hfloat_to_float((ogt_hfloat_t) hconsts[0]),
ogt_hfloat_to_float((ogt_hfloat_t) hconsts[1]),
ogt_hfloat_to_float((ogt_hfloat_t) hconsts[2]),
ogt_hfloat_to_float((ogt_hfloat_t) hconsts[3]));
} else {
uint32_t* fconsts = (uint32_t*) consts;
printf("fconstants %g, %g, %g, %g\n",
......
......@@ -181,6 +181,7 @@ typedef enum
{
lima_t6xx_jmp_writeout_op_branch_uncond = 1,
lima_t6xx_jmp_writeout_op_branch_cond = 2,
lima_t6xx_jmp_writeout_op_discard = 4,
lima_t6xx_jmp_writeout_op_writeout = 7,
} lima_t6xx_jmp_writeout_op_e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment