[GXemul-devel] GXemul 0.4 target PPC
Status: Alpha
Brought to you by:
gavare
From: claude v. <vit...@wa...> - 2008-07-16 07:12:17
|
Hi, I implement Float instructions in PPC target with softfloat. I m looking for an advice. Each float instruction, need to test if FPU is enable. Thus I need the reel PC to launch fpu exception. In ic->args, I can only give 3 parameters (Rd, Ra, Rb). I don't want to provide the word in args and to decode it in the instruction. I try to use this code. int low_pc = ((size_t)cpu->cd.DYNTRANS_ARCH.next_ic - (size_t)cpu->cd.DYNTRANS_ARCH.cur_ic_page) sizeof(struct DYNTRANS_IC); cpu->pc &= ~((DYNTRANS_IC_ENTRIES_PER_PAGE-1) << DYNTRANS_INSTR_ALIGNMENT_SHIFT); cpu->pc += (low_pc << DYNTRANS_INSTR_ALIGNMENT_SHIFT); I get the pc+4 where is the instruction. It seems fine. But I see your implementation of mtmsr and I don't understand why you don't use the code, above, when the instruction is executed. I don't find argument... Other question If I want to give a fourth argument in ic (arch ## _instr_call), I need to reduce the number of translated instructions ? I don't test this modification because I don't see all impacts... Best regards, Claude |