[amd64] Fix setting of MonoCompile:ret:dreg in mono_arch_allocate_vars.
The code in mono_arch_allocate_vars would set cfg->ret->dreg to cfg->ret->inst_c0
regardless. This is ok in some cases, but bad in others.
For OP_REGVAR this would do the right thing, dreg should be register that holds
that argument.
For when vret_addr is used, it would modify a var that is not used, so harmless.
For OP_REGOFFSET, inst_c0 alias with inst_offset, which is set to the offset from
RBP to read the var from. So we'd have a dreg set to, sometimes, a negative number.
This was not a problem as after mono_arch_allocate_vars only mono_spill_global_vars
is called and it only checks the dreg in the case of gsharedvt.
The fix is pretty simple, move setting from happening in all cases to only for OP_REGVAR.