mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 13:59:29 +02:00
* avoid assembler errors for the MovOpMov2MovOp optimziation in case the size of the instruction
gets changed and the first one contains a constant, resolves #34933 git-svn-id: trunk@41021 -
This commit is contained in:
parent
57ffb6fb07
commit
cfd0790f89
@ -1879,6 +1879,10 @@ unit aoptx86;
|
||||
debug_op2str(taicpu(p).opcode)+debug_opsize2str(taicpu(p).opsize)+' '+
|
||||
debug_op2str(taicpu(hp1).opcode)+debug_opsize2str(taicpu(hp1).opsize)+' '+
|
||||
debug_op2str(taicpu(hp2).opcode)+debug_opsize2str(taicpu(hp2).opsize),p);
|
||||
{ limit size of constants as well to avoid assembler errors, but
|
||||
check opsize to avoid overflow when left shifting the 1 }
|
||||
if (taicpu(p).oper[0]^.typ=top_const) and (topsize2memsize[taicpu(hp2).opsize]<=4) then
|
||||
taicpu(p).oper[0]^.val:=taicpu(p).oper[0]^.val and ((qword(1) shl (topsize2memsize[taicpu(hp2).opsize]*8))-1);
|
||||
taicpu(hp1).changeopsize(taicpu(hp2).opsize);
|
||||
taicpu(p).changeopsize(taicpu(hp2).opsize);
|
||||
if taicpu(p).oper[0]^.typ=top_reg then
|
||||
|
Loading…
Reference in New Issue
Block a user