From c4cee15481b6ce6da899de910c91c9dd4cb72893 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 18 Mar 2013 01:03:37 +0000 Subject: [PATCH] * bug fix in tcg8086.a_load_reg_reg for loading larger register to a smaller one git-svn-id: branches/i8086@23914 - --- compiler/i8086/cgcpu.pas | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/compiler/i8086/cgcpu.pas b/compiler/i8086/cgcpu.pas index 0c9cc2179e..8463c2d8bf 100644 --- a/compiler/i8086/cgcpu.pas +++ b/compiler/i8086/cgcpu.pas @@ -728,25 +728,17 @@ unit cgcpu; list.concat(instr); end; -// var -// op: tasmop; -// s: topsize; -// instr:Taicpu; begin check_register_size(fromsize,reg1); check_register_size(tosize,reg2); - if tcgsize2size[tosize]<=tcgsize2size[fromsize] then - fromsize:=tosize; - -{ if tcgsize2size[fromsize]>tcgsize2size[tosize] then + if tcgsize2size[fromsize]>tcgsize2size[tosize] then begin + if tosize in [OS_32, OS_S32] then + internalerror(2013031801); reg1:=makeregsize(list,reg1,tosize); - s:=tcgsize2opsize[tosize]; - op:=A_MOV; - end - else - sizes2load(fromsize,tosize,op,s);} + fromsize:=tosize; + end; if (reg1<>reg2) then begin