From 4b281dd6c94923b9820e1ade12600a2d08517fd5 Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 2 Apr 2020 23:05:49 +0000 Subject: [PATCH] * changed the ifndef avr to ifdef avr in GetNextReg git-svn-id: branches/z80@44522 - --- compiler/cgobj.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/cgobj.pas b/compiler/cgobj.pas index 2688536a32..8fde5ab872 100644 --- a/compiler/cgobj.pas +++ b/compiler/cgobj.pas @@ -742,15 +742,15 @@ implementation {$if defined(cpu8bitalu) or defined(cpu16bitalu)} function tcg.GetNextReg(const r: TRegister): TRegister; begin -{$ifndef AVR} +{$ifdef AVR} + { the AVR code generator depends on the fact that it can do GetNextReg also on physical registers } + if (getsupreg(r)>=first_int_imreg) and not(has_next_reg[getsupreg(r)]) then + internalerror(2017091103); +{$else AVR} if getsupreg(r)=first_int_imreg) and not(has_next_reg[getsupreg(r)]) then - internalerror(2017091103); {$endif AVR} if getregtype(r)<>R_INTREGISTER then internalerror(2017091101);