mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:49:13 +02:00
* arm thumb: do not generate illegal ror instructions
git-svn-id: trunk@24439 -
This commit is contained in:
parent
09e742f243
commit
e6489ed7d2
@ -3909,25 +3909,12 @@ unit cgcpu;
|
|||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if is_thumb_imm(a) and not(op in [OP_IMUL,OP_MUL,OP_AND,OP_OR,OP_XOR]) then
|
if is_thumb_imm(a) and (op in [OP_ADD,OP_SUB]) then
|
||||||
case op of
|
|
||||||
OP_NEG:
|
|
||||||
list.concat(taicpu.op_reg_const(A_NEG,dst,a));
|
|
||||||
OP_NOT:
|
|
||||||
list.concat(taicpu.op_reg_const(A_MVN,dst,a));
|
|
||||||
OP_ROL:
|
|
||||||
begin
|
|
||||||
if not(size in [OS_32,OS_S32]) then
|
|
||||||
internalerror(2008072801);
|
|
||||||
list.concat(taicpu.op_reg_const(A_ROR,dst,a));
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
begin
|
begin
|
||||||
// if cgsetflags or setflags then
|
// if cgsetflags or setflags then
|
||||||
a_reg_alloc(list,NR_DEFAULTFLAGS);
|
a_reg_alloc(list,NR_DEFAULTFLAGS);
|
||||||
list.concat(setoppostfix(
|
list.concat(setoppostfix(
|
||||||
taicpu.op_reg_const(op_reg_opcg2asmop[op],dst,a),op_reg_postfix[op]));
|
taicpu.op_reg_const(op_reg_opcg2asmop[op],dst,a),op_reg_postfix[op]));
|
||||||
end;
|
|
||||||
|
|
||||||
if (cgsetflags {!!! or setflags }) and (size in [OS_8,OS_16,OS_32]) then
|
if (cgsetflags {!!! or setflags }) and (size in [OS_8,OS_16,OS_32]) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user