Backends/Kinc-HL/hl/src/jit.c
static preg *alloc_cpu_call( jit_ctx *ctx, vreg *r ) {
	preg *p = fetch(r);
	if( p->kind != RCPU ) {
#		ifndef HL_64
		if( r->t->kind == HI64 ) return alloc_fpu(ctx,r,true);
		if( r->size > 4 ) ASSERT(r->size);
#		endif
		p = alloc_reg(ctx, RCPU_CALL);
		load(ctx,p,r);
	} else if( is_call_reg(p) ) {
		preg *p2 = alloc_reg(ctx, RCPU_CALL);
		op64(ctx,MOV,p2,p);
		scratch(p);
		reg_bind(r,p2);
		return p2;
	} else
		RLOCK(p);
	return p;
}
// allocate a register that is not a call parameter

allocate a register that is not a call parameter
allocate a register that is not a call parameter
static preg *alloc_cpu_call( jit_ctx *ctx, vreg *r ) {
	preg *p = fetch(r);
	if( p->kind != RCPU ) {
#		ifndef HL_64
		if( r->t->kind == HI64 ) return alloc_fpu(ctx,r,true);
		if( r->size > 4 ) ASSERT(r->size);
#		endif
		p = alloc_reg(ctx, RCPU_CALL);
		load(ctx,p,r);
	} else if( is_call_reg(p) ) {
		preg *p2 = alloc_reg(ctx, RCPU_CALL);
		op64(ctx,MOV,p2,p);
		scratch(p);
		reg_bind(r,p2);
		return p2;
	} else
		RLOCK(p);
	return p;
}
static preg * alloc_cpu_call ( jit_ctx * ctx , vreg * r ) { preg * p = fetch ( r ) ; if ( p -> kind != RCPU ) { #		ifndef HL_64 if ( r -> t -> kind == HI64 ) return alloc_fpu ( ctx , r , true ) ; if ( r -> size > 4 ) ASSERT ( r -> size ) ; #		endif p = alloc_reg ( ctx , RCPU_CALL ) ; load ( ctx , p , r ) ; } else if ( is_call_reg ( p ) ) { preg * p2 = alloc_reg ( ctx , RCPU_CALL ) ; op64 ( ctx , MOV , p2 , p ) ; scratch ( p ) ; reg_bind ( r , p2 ) ; return p2 ; } else RLOCK ( p ) ; return p ; }
allocate a register that is not a call parameter
allocate a register that is not a call parameter