[Mono-dev] Register allocation and overlapping registers
vargaz at gmail.com
Tue Mar 25 17:10:09 UTC 2014
The mono JIT only uses double precision registers in most cases and only
uses single precision ones for temporary purposes, like to implement casts.
There were some problems with choosing these temporary registers, but they
should be fixed in 3.4.0/master.
On Tue, Mar 25, 2014 at 12:23 PM, SilentBob <cinnamondonkey at gmail.com>wrote:
> I'm hoping someone can provide some insight into how the cross-compiler
> handles allocating registers when the registers overlap.
> I'm looking at a case on ARM where the following code:
> double d = 7.2199997900000001;
> float f = (f)d;
> Results in:
> vcvt.f32.f64 s4, d2
> Because the 'd' registers are made up of pairs of 's' registers (in this
> case d2 overlaps with s4 and s5) there is the potential for collision as in
> this case. The end result is that d2 changes as s4 is updated. It would be
> fine if it was not for d2 then being used immediately by the next
> mono_local_regalloc () in mini-codegen.c seems to be translating
> 'float_conv_to_r4 R25 <- R24' and ending up with dreg = 4 and sreg1 = 4
> eventually gets emitted as above.
> Thank you in advance for all help.
> View this message in context:
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list