diff --git a/Compiler/Generator/Generator.cs b/Compiler/Generator/Generator.cs index 94eef80..bd91e3e 100644 --- a/Compiler/Generator/Generator.cs +++ b/Compiler/Generator/Generator.cs @@ -95,7 +95,7 @@ namespace Compiler.Generator "movl %eax, %ecx\n" + //move calculated divisor to %ecx "pop %rax\n" + //pop divident do %eax "cdq\n" + - "divl %ecx\n"; //eax contains the result, edx the rest + "idivl %ecx\n"; //eax contains the result, edx the rest break; default: throw new ArgumentOutOfRangeException();