Re: Phix: float32 return value
- Posted by petelomax 4 days ago
- 75 views
My bad, I shd've gotten line nos from 1.0.5 srcs... maybe next time.
D:\testpool\ray_workplace\Phix\pilasm.e:4338
elsif ttidx=T_movsd or ttidx=T_movss then op = iff(ttidx=T_movsd?..
^ duplicate case value [3364, il offset:2791]
That error means it has converted the if to a switch (for performance reasons) but hit a snag in that
there are two (or more) branches for 3364 (T_movsd) - there is one on the-1.0.5-line 4291 (ie where I should have pointed you).
I'll have a think about making the error say "duplicate case value [3364 on lines 4338 and 4291]".
Edit:I have found a temporary workaround. the return value is now int.
C_DOUBLE instead of C_FLOAT return types would also be hassle-free (as long as the C code is returning a 64-bit float and not a 32-bit float), if that helps or you need the fractions.
Should you want to leave it as-is for now, I'm happy if you`re happy.
(undo if you can, but having non-compilable sources for the compiler itself lying around is not really going to hurt you, unless/until some other snag has no similar workaround)

