Skip to content

Commit

Permalink
Fix: various issues uncovered by binary provided by @NancyAurum in is…
Browse files Browse the repository at this point in the history
…sue #1287
  • Loading branch information
uxmal committed Jul 22, 2024
1 parent 9fb0d9d commit c7ac7f3
Show file tree
Hide file tree
Showing 22 changed files with 84 additions and 134 deletions.
1 change: 1 addition & 0 deletions src/Core/Expressions/ExpressionTypeAscenderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public DataType VisitBinaryExpression(BinaryExpression binExp)
case OperatorType.FSub:
case OperatorType.FMul:
case OperatorType.FDiv:
case OperatorType.FMod:
dt = PrimitiveType.Create(Domain.Real, binExp.DataType.BitSize);
break;
case OperatorType.Shr:
Expand Down
1 change: 1 addition & 0 deletions src/Decompiler/Scanning/BlockConstantPropagator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ private Expression VisitExpression(Expression e)
OutArgument o => o,
ProcedureConstant pc => pc,
Application app => m.Fn(VisitExpression(app.Procedure), VisitExpressions(app.Arguments)),
ArrayAccess aref => m.ARef(aref.DataType, VisitExpression(aref.Array), VisitExpression(aref.Index)),
_ => Fail(e)
};
}
Expand Down
3 changes: 2 additions & 1 deletion src/Decompiler/Typing/ExpressionTypeDescender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ public bool VisitBinaryExpression(BinaryExpression binExp, TypeVariable tv)
case OperatorType.FSub:
case OperatorType.FMul:
case OperatorType.FDiv:
{
case OperatorType.FMod:
{
var dt = PrimitiveType.Create(Domain.Real, eLeft.DataType.BitSize);
MeetDataType(eLeft, dt);
dt = PrimitiveType.Create(Domain.Real, eRight.DataType.BitSize);
Expand Down
2 changes: 0 additions & 2 deletions src/Environments/Windows/MsMangledNameParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
*/
#endregion

using Reko.Core;
using Reko.Core.Serialization;
using Reko.Core.Types;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace Reko.Environments.Windows
{
Expand Down
1 change: 1 addition & 0 deletions src/Environments/Windows/msvcrt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ size_t fread(void *buffer, size_t size, size_t count, FILE *stream);
int fclose(FILE * fp);
int _fcloseall();
int _mkdir(const char *dirname);
FILE * __iob_func();

[[reko::returns(fpu)]] double _CIpow([[reko::arg(fpu)]]double, [[reko::arg(fpu)]] double);
[[reko::returns(fpu)]] double _CIacos([[reko::arg(fpu)]]double);
Expand Down
3 changes: 2 additions & 1 deletion subjects/Archives/ArTar/hello.reko/hello_O1_bss.asm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions subjects/Elf/ARM64/arm64_elf/subject.reko/subject_bss.asm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7ac7f3

Please sign in to comment.