mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 22:09:28 +01:00
* generate different code for OS_S8 -> OS_16 conversion which might fold better, idea by Nico Erfurth
git-svn-id: trunk@22027 -
This commit is contained in:
parent
4d31fbc31d
commit
7513291ad8
@ -1235,8 +1235,10 @@ unit cgcpu;
|
||||
begin
|
||||
if tosize=OS_16 then
|
||||
begin
|
||||
list.concat(taicpu.op_reg_reg_const(A_AND,reg2,reg1,$ff));
|
||||
list.concat(taicpu.op_reg_reg(A_SXTB16,reg2,reg2));
|
||||
so.shiftmode:=SM_ROR;
|
||||
so.shiftimm:=16;
|
||||
list.concat(taicpu.op_reg_reg_shifterop(A_SXTB16,reg2,reg1,so));
|
||||
do_shift(SM_LSR,16,reg2);
|
||||
end
|
||||
else
|
||||
list.concat(taicpu.op_reg_reg(A_SXTB,reg2,reg1));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user