Bug 31582 - iOS -O=float32 fails for some operations on ARM7
Summary: iOS -O=float32 fails for some operations on ARM7
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Mono runtime / AOT compiler ()
Version: XI 8.13 (C6 early alphas)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rodrigo Kumpera
URL:
Depends on:
Blocks:
 
Reported: 2015-07-02 12:30 UTC by Icer addis
Modified: 2015-07-03 14:44 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Attached example project (10.42 KB, application/zip)
2015-07-02 12:30 UTC, Icer addis
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Icer addis 2015-07-02 12:30:10 UTC
Created attachment 11823 [details]
Attached example project

Specifically the pseudo instruction: r4_conv_to_u8 when building for ARM7.

Here is example code:

       struct Vector2 {public float x,y;}
        static ulong Test_r4_conv_to_u8(Vector2 size)
        {
            return ((ulong)size.y)<<32 
                | (ulong)size.x<<16; 

        }

I think the conversion is the problem, not the struct value.

The opcode is missing from ARM7:
https://github.com/mono/mono/blob/master/mono/mini/cpu-arm.md#r4-opcodes

But it is present here for ARM64:
https://github.com/mono/mono/blob/0c604e7175d0248eb03fe0aa8d8b07d28362bbfc/mono/mini/cpu-arm64.md#r4-opcodes

And there is this case block which may be relevant:
https://github.com/mono/mono/blob/master/mono/mini/mini-arm.c#L5504

I suggest testing all instructions because there may be more lurking...
Comment 2 Rodrigo Kumpera 2015-07-03 13:31:48 UTC
I'm working on it.
Comment 3 Rodrigo Kumpera 2015-07-03 14:44:13 UTC
Fixed on mono master/5d93b2a292c7609596b9ec0492cd6f80658e3a8f.