@@ -710,6 +710,17 @@ MONO_RESTORE_WARNING
710
710
opcode = (tto_type == MONO_TYPE_I2 ) ? OP_ICONV_TO_I2 : OP_ICONV_TO_U2 ;
711
711
tto_stack = STACK_I4 ;
712
712
} else if (size == 4 ) {
713
+ #if TARGET_SIZEOF_VOID_P == 4
714
+ if (tto_type == MONO_TYPE_I )
715
+ tto_type = MONO_TYPE_I4 ;
716
+ else if (tto_type == MONO_TYPE_U )
717
+ tto_type = MONO_TYPE_U4 ;
718
+
719
+ if (tfrom_type == MONO_TYPE_I )
720
+ tfrom_type = MONO_TYPE_I4 ;
721
+ else if (tfrom_type == MONO_TYPE_U )
722
+ tfrom_type = MONO_TYPE_U4 ;
723
+ #endif
713
724
if ((tfrom_type == MONO_TYPE_R4 ) && ((tto_type == MONO_TYPE_I4 ) || (tto_type == MONO_TYPE_U4 ))) {
714
725
opcode = OP_MOVE_F_TO_I4 ;
715
726
tto_stack = STACK_I4 ;
@@ -722,23 +733,30 @@ MONO_RESTORE_WARNING
722
733
}
723
734
} else if (size == 8 ) {
724
735
#if TARGET_SIZEOF_VOID_P == 8
725
- if ((tfrom_type == MONO_TYPE_R8 ) && ((tto_type == MONO_TYPE_I8 ) || (tto_type == MONO_TYPE_U8 ))) {
726
- opcode = OP_MOVE_F_TO_I8 ;
727
- tto_stack = STACK_I8 ;
728
- } else if ((tto_type == MONO_TYPE_R8 ) && ((tfrom_type == MONO_TYPE_I8 ) || (tfrom_type == MONO_TYPE_U8 ))) {
729
- opcode = OP_MOVE_I8_TO_F ;
730
- tto_stack = STACK_R8 ;
731
- } else {
732
- opcode = OP_MOVE ;
733
- tto_stack = STACK_I8 ;
734
- }
735
- #else
736
- return NULL ;
736
+ if (tto_type == MONO_TYPE_I )
737
+ tto_type = MONO_TYPE_I8 ;
738
+ else if (tto_type == MONO_TYPE_U )
739
+ tto_type = MONO_TYPE_U8 ;
740
+
741
+ if (tfrom_type == MONO_TYPE_I )
742
+ tfrom_type = MONO_TYPE_I8 ;
743
+ else if (tfrom_type == MONO_TYPE_U )
744
+ tfrom_type = MONO_TYPE_U8 ;
737
745
#endif
746
+ if ((tfrom_type == MONO_TYPE_R8 ) && ((tto_type == MONO_TYPE_I8 ) || (tto_type == MONO_TYPE_U8 ))) {
747
+ opcode = OP_MOVE_F_TO_I8 ;
748
+ tto_stack = STACK_I8 ;
749
+ } else if ((tto_type == MONO_TYPE_R8 ) && ((tfrom_type == MONO_TYPE_I8 ) || (tfrom_type == MONO_TYPE_U8 ))) {
750
+ opcode = OP_MOVE_I8_TO_F ;
751
+ tto_stack = STACK_R8 ;
752
+ } else {
753
+ opcode = OP_MOVE ;
754
+ tto_stack = STACK_I8 ;
755
+ }
738
756
}
739
757
} else if (mini_class_is_simd (cfg , tfrom_klass ) && mini_class_is_simd (cfg , tto_klass )) {
740
- opcode = OP_XCAST ;
741
- tto_stack = STACK_VTYPE ;
758
+ opcode = OP_XCAST ;
759
+ tto_stack = STACK_VTYPE ;
742
760
}
743
761
744
762
if (opcode == OP_LDADDR ) {
0 commit comments