changed divl to idvl to fix aritmethic exception

This commit is contained in:
Clemens-Dautermann 2021-01-12 22:20:37 +01:00
parent 7cf7c336a7
commit 819a3d67a6

View file

@ -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();