changed divl to idvl to fix aritmethic exception
This commit is contained in:
parent
7cf7c336a7
commit
819a3d67a6
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ namespace Compiler.Generator
|
||||||
"movl %eax, %ecx\n" + //move calculated divisor to %ecx
|
"movl %eax, %ecx\n" + //move calculated divisor to %ecx
|
||||||
"pop %rax\n" + //pop divident do %eax
|
"pop %rax\n" + //pop divident do %eax
|
||||||
"cdq\n" +
|
"cdq\n" +
|
||||||
"divl %ecx\n"; //eax contains the result, edx the rest
|
"idivl %ecx\n"; //eax contains the result, edx the rest
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue