From c8e130d5254fef415ddc160a1a3a87967179c4ad Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 18 Jan 2021 22:29:45 +0000 Subject: [PATCH] + added WebAssembly invalid register check in op_reg when compiler is compiled with EXTDEBUG git-svn-id: branches/wasm@48177 - --- compiler/wasm32/aasmcpu.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/wasm32/aasmcpu.pas b/compiler/wasm32/aasmcpu.pas index ad543d8e2f..fe89449f0e 100644 --- a/compiler/wasm32/aasmcpu.pas +++ b/compiler/wasm32/aasmcpu.pas @@ -186,6 +186,10 @@ implementation begin inherited create(op); ops:=1; +{$ifdef EXTDEBUG} + if getregtype(_op1)=R_INVALIDREGISTER then + InternalError(2021011901); +{$endif EXTDEBUG} loadreg(0,_op1); end;