void do_lea ( unsigned int ra, unsigned int imm ) { if((ra>7)||(imm>0xFFFF)) { printf("do_lea limit fail pc = %u \n",__pc__); exit(1); } if((imm&0x3F)==0) { do_lui(ra,imm); } else if((imm&0xFFC0)==0x0000) { do_addi(ra,0,imm&0x7F); } else if((imm&0xFFC0)==0xFFC0) { do_addi(ra,0,imm&0x7F); } else { do_lui(ra,imm&0xFFC0); do_addi(ra,0,imm&0x3F); } }
void Ppc405Iss::op_addis() { uint32_t base = m_ins.d.ra ? r_gp[m_ins.d.ra] : 0; do_addi( base, m_ins.d.imm<<16, 0, false ); }
void Ppc405Iss::op_addic() { do_addi( r_gp[m_ins.d.ra], sign_ext(m_ins.d.imm, 16), 0, true ); }
void Ppc405Iss::op_addic_() { uint32_t tmp = do_addi( r_gp[m_ins.d.ra], sign_ext(m_ins.d.imm, 16), 0, true ); crSetSigned( 0, tmp, 0 ); }
void Ppc405Iss::op_addi() { uint32_t base = m_ins.d.ra ? r_gp[m_ins.d.ra] : 0; do_addi( base, sign_ext(m_ins.d.imm, 16), 0, false ); }