Skip to content

Commit d3b2b0f

Browse files
committed
Conformance
1 parent 5c2f4ac commit d3b2b0f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,13 @@ private Status TryScanMethod(MethodIL methodIL, Value[] parameters, Stack<Method
936936
switch (opcode)
937937
{
938938
case ILOpcode.conv_i:
939-
case ILOpcode.conv_u:
940939
stack.Push(StackValueKind.NativeInt,
941940
context.Target.PointerSize == 8 ? ValueTypeValue.FromInt64((long)val) : ValueTypeValue.FromInt32((int)val));
942941
break;
942+
case ILOpcode.conv_u:
943+
stack.Push(StackValueKind.NativeInt,
944+
context.Target.PointerSize == 8 ? ValueTypeValue.FromInt64((long)(ulong)val) : ValueTypeValue.FromInt32((int)(uint)val));
945+
break;
943946
case ILOpcode.conv_i1:
944947
stack.Push(StackValueKind.Int32, ValueTypeValue.FromInt32((sbyte)val));
945948
break;
@@ -959,10 +962,10 @@ private Status TryScanMethod(MethodIL methodIL, Value[] parameters, Stack<Method
959962
stack.Push(StackValueKind.Int32, ValueTypeValue.FromInt32((ushort)val));
960963
break;
961964
case ILOpcode.conv_u4:
962-
stack.Push(StackValueKind.Int32, ValueTypeValue.FromInt32((int)val));
965+
stack.Push(StackValueKind.Int32, ValueTypeValue.FromInt32((int)(uint)val));
963966
break;
964967
case ILOpcode.conv_u8:
965-
stack.Push(StackValueKind.Int64, ValueTypeValue.FromInt64((long)val));
968+
stack.Push(StackValueKind.Int64, ValueTypeValue.FromInt64((long)(ulong)val));
966969
break;
967970
case ILOpcode.conv_r4:
968971
stack.Push(StackValueKind.Float, ValueTypeValue.FromDouble((float)val));

0 commit comments

Comments
 (0)