From 8e07ddb2bcd01ef7fea92e85c2cb52a3a51216ef Mon Sep 17 00:00:00 2001 From: svenbarth Date: Thu, 18 Oct 2012 20:12:07 +0000 Subject: [PATCH] * made internal errors for M68K unique * fixed comment * added comment regarding the potential usage of an address register instead of an int one git-svn-id: trunk@22744 - --- compiler/m68k/cgcpu.pas | 4 ++-- compiler/m68k/n68kcnv.pas | 2 +- compiler/ncgutil.pas | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/m68k/cgcpu.pas b/compiler/m68k/cgcpu.pas index 1eb5a63b23..db64f4d6f9 100644 --- a/compiler/m68k/cgcpu.pas +++ b/compiler/m68k/cgcpu.pas @@ -188,7 +188,7 @@ unit cgcpu; if ref.index <> NR_NO then begin if ref.base <> NR_NO then - internalerror(20020814); + internalerror(2002081401); if (ref.offset < low(shortint)) or (ref.offset > high(shortint)) then isvalidrefoffset := false end @@ -926,7 +926,7 @@ unit cgcpu; begin if (a >= 1) and (a <= 8) then begin - { now allowed to shift an address register } + { not allowed to shift an address register } if (isaddressregister(reg)) then begin scratch_reg := getintregister(list,OS_INT); diff --git a/compiler/m68k/n68kcnv.pas b/compiler/m68k/n68kcnv.pas index 4ed23cea98..af5b48e8f7 100644 --- a/compiler/m68k/n68kcnv.pas +++ b/compiler/m68k/n68kcnv.pas @@ -130,7 +130,7 @@ implementation internalerror(200110011); { has to be handled by a helper } if not signed then - internalerror(20020814); + internalerror(2002081404); location.register:=cg.getfpuregister(current_asmdata.CurrAsmList,opsize); if not(left.location.loc in [LOC_REGISTER,LOC_CREGISTER,LOC_REFERENCE,LOC_CREFERENCE]) then diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index 0393eed937..5a17e54d8f 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -639,6 +639,12 @@ implementation end else {$endif cpu64bitalu} + { Note: for withs of records (and maybe objects, classes, etc.) an + address register could be set here, but that is later + changed to an intregister neverthless when in the + tcgassignmentnode maybechangeloadnodereg is called for the + temporary node; so the workaround for now is to fix the + symptoms... } l.register:=cg.getintregister(list,l.size); end; end;