summaryrefslogtreecommitdiff
path: root/compiler/x86/nx86mat.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/x86/nx86mat.pas')
-rw-r--r--compiler/x86/nx86mat.pas8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/x86/nx86mat.pas b/compiler/x86/nx86mat.pas
index d056f364bf..5d41b57650 100644
--- a/compiler/x86/nx86mat.pas
+++ b/compiler/x86/nx86mat.pas
@@ -99,6 +99,7 @@ interface
op : tasmop;
hreg : tregister;
begin
+ op:=A_NONE;
secondpass(left);
location_reset(location,LOC_MMXREGISTER,OS_NO);
hreg:=tcgx86(cg).getmmxregister(current_asmdata.CurrAsmList);
@@ -142,6 +143,9 @@ interface
mmxs32bit,mmxu32bit:
op:=A_PSUBD;
end;
+ if op = A_NONE then
+ internalerror(201408202);
+
emit_reg_reg(op,S_NO,location.register,hreg);
emit_reg_reg(A_MOVQ,S_NO,hreg,location.register);
end;
@@ -523,8 +527,8 @@ interface
else
emit_reg_reg(A_XOR,opsize,regd,regd);
- {Division depends on the right type.}
- if is_signed(right.resultdef) then
+ { Division depends on the result type }
+ if is_signed(resultdef) then
op:=A_IDIV
else
op:=A_DIV;