void vreg_spill( struct machine_ops *mop, struct emitter *e, struct frame *f, int vreg ){ vreg_operand on = vreg_to_operand( f, vreg, false ); vreg_operand off = vreg_to_operand( f, vreg, true ); if( ISO_REG( on.value ) ) mop->move( e, f->m, off.value, on.value ); if( ISO_REG( on.type ) ) mop->move( e, f->m, off.type, on.type ); }
void mips_b( struct emitter* me, struct machine* m, label l ){ if( !ISL_ABS( l ) ){ EMIT( MI_B( mips_branch( me, l ) ) ); } else if ( ISL_ABSDIRECT( l ) ){ // TODO: make sure within 256MB region by calling MI_J_SAFE EMIT( MI_J( l.abs.k ) ); } else if ( ISO_REG( l.abs ) ) { EMIT( MI_JR( l.abs.reg ) ); } else { assert( ISO_DADDR( l.abs ) ); operand t = OP_TARGETREG( acquire_temp( _MOP, me, m ) ); move( me, m, t, l.abs ); EMIT( MI_JR( t.reg ) ); RELEASE_OR_NOP( me, m ); return; } // delay slot EMIT( MI_NOP() ); }