mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 14:50:32 +02:00
* Xtensa: patch by Christo Crause: fix addmi/addi handling, resolves #37015
git-svn-id: trunk@45258 -
This commit is contained in:
parent
0fbb1b259e
commit
724676db43
@ -499,7 +499,7 @@ implementation
|
|||||||
{$ifdef EXTDEBUG}
|
{$ifdef EXTDEBUG}
|
||||||
list.concat(tai_comment.Create(strpnew('Value: '+tostr(a))));
|
list.concat(tai_comment.Create(strpnew('Value: '+tostr(a))));
|
||||||
{$endif EXTDEBUG}
|
{$endif EXTDEBUG}
|
||||||
list.concat(taicpu.op_reg_reg_const(A_ADDMI,dst,src,Smallint(a and $ff00)));
|
list.concat(taicpu.op_reg_reg_const(A_ADDMI,dst,src,Smallint((a+128) and $ff00)));
|
||||||
list.concat(taicpu.op_reg_reg_const(A_ADDI,dst,dst,Shortint(a and $ff)));
|
list.concat(taicpu.op_reg_reg_const(A_ADDI,dst,dst,Shortint(a and $ff)));
|
||||||
end
|
end
|
||||||
else if (op=OP_SUB) and (a>=-127) and (a<=128) then
|
else if (op=OP_SUB) and (a>=-127) and (a<=128) then
|
||||||
@ -510,7 +510,7 @@ implementation
|
|||||||
list.concat(tai_comment.Create(strpnew('Value: '+tostr(a))));
|
list.concat(tai_comment.Create(strpnew('Value: '+tostr(a))));
|
||||||
{$endif EXTDEBUG}
|
{$endif EXTDEBUG}
|
||||||
a:=-a;
|
a:=-a;
|
||||||
list.concat(taicpu.op_reg_reg_const(A_ADDMI,dst,src,Smallint(a and $ff00)));
|
list.concat(taicpu.op_reg_reg_const(A_ADDMI,dst,src,Smallint((a+128) and $ff00)));
|
||||||
list.concat(taicpu.op_reg_reg_const(A_ADDI,dst,dst,Shortint(a and $ff)));
|
list.concat(taicpu.op_reg_reg_const(A_ADDI,dst,dst,Shortint(a and $ff)));
|
||||||
end
|
end
|
||||||
else if (op=OP_SHL) and (a>=1) and (a<=31) then
|
else if (op=OP_SHL) and (a>=1) and (a<=31) then
|
||||||
|
Loading…
Reference in New Issue
Block a user