mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 18:15:25 +00:00
20 lines
445 B
C#
20 lines
445 B
C#
|
using ARMeilleure.IntermediateRepresentation;
|
|||
|
|
|||
|
namespace ARMeilleure.CodeGen.X86
|
|||
|
{
|
|||
|
static class CodeGenCommon
|
|||
|
{
|
|||
|
public static bool IsLongConst(Operand op)
|
|||
|
{
|
|||
|
long value = op.Type == OperandType.I32 ? op.AsInt32() : op.AsInt64();
|
|||
|
|
|||
|
return !ConstFitsOnS32(value);
|
|||
|
}
|
|||
|
|
|||
|
private static bool ConstFitsOnS32(long value)
|
|||
|
{
|
|||
|
return value == (int)value;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|