Fix some typos and the divide instruction with FP operands

This commit is contained in:
gdkchan 2019-06-12 09:05:58 -03:00
parent f056709136
commit af21f0c73d
3 changed files with 9 additions and 9 deletions

View file

@ -486,11 +486,11 @@ namespace ARMeilleure.CodeGen.X86
}
else if (dest.Type == OperandType.FP32)
{
context.Assembler.Subss(dest, divisor, dividend);
context.Assembler.Divss(dest, divisor, dividend);
}
else /* if (dest.Type == OperandType.FP64) */
{
context.Assembler.Subsd(dest, divisor, dividend);
context.Assembler.Divsd(dest, divisor, dividend);
}
}

View file

@ -134,7 +134,7 @@ namespace ARMeilleure.CodeGen.X86
//Most ALU instructions accepts a 32-bits immediate on the second operand.
//We need to ensure the following:
//- If the constant is on operand 1, we need to move it.
//-- But first, we try to swap operand 1 and 2 if the instruction is comutative.
//-- But first, we try to swap operand 1 and 2 if the instruction is commutative.
//-- Doing so may allow us to encode the constant as operand 2 and avoid a copy.
//- If the constant is on operand 2, we check if the instruction supports it,
//if not, we also add a copy. 64-bits constants are usually not supported.
@ -142,7 +142,7 @@ namespace ARMeilleure.CodeGen.X86
if (src1.Kind == OperandKind.Constant && (!HasConstSrc1(inst) || isVecCopy))
{
if (IsComutative(inst))
if (IsCommutative(inst))
{
src2 = operation.GetSource(1);
@ -583,7 +583,7 @@ namespace ARMeilleure.CodeGen.X86
return false;
}
private static bool IsComutative(Instruction inst)
private static bool IsCommutative(Instruction inst)
{
switch (inst)
{

View file

@ -4,13 +4,13 @@ namespace ARMeilleure
{
public static bool AssumeStrictAbiCompliance { get; set; }
public static bool FastFP { get; set; } = false;
public static bool FastFP { get; set; } = true;
public static bool UseSseIfAvailable { get; set; }
public static bool UseSse2IfAvailable { get; set; }
public static bool UseSse3IfAvailable { get; set; }
public static bool UseSsse3IfAvailable { get; set; }
public static bool UseSse41IfAvailable { get; set; }
public static bool UseSse41IfAvailable { get; set; }
public static bool UseSse42IfAvailable { get; set; }
public static bool UsePopCntIfAvailable { get; set; }
@ -19,7 +19,7 @@ namespace ARMeilleure
internal static bool UseSse3 { get; set; } = true;
internal static bool UseSsse3 { get; set; } = true;
internal static bool UseSse41 { get; set; } = true;
internal static bool UseSse42 { get; set; }
internal static bool UsePopCnt { get; set; }
internal static bool UseSse42 { get; set; } = true;
internal static bool UsePopCnt { get; set; } = true;
}
}