From d9dfcfa4020b9b2b135ad263e838eb3e0826dc3d Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 14 May 2006 16:28:16 +0000 Subject: [PATCH] * fixed reading of shifter op in mov instructions, fixes bug #4722 git-svn-id: trunk@3528 - --- .gitattributes | 1 + compiler/arm/raarmgas.pas | 2 +- tests/webtbs/tw4722.pp | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/webtbs/tw4722.pp diff --git a/.gitattributes b/.gitattributes index 760a5e2c38..aaae4b1553 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6791,6 +6791,7 @@ tests/webtbs/tw4675.pp svneol=native#text/plain tests/webtbs/tw4678.pp -text tests/webtbs/tw4700.pp svneol=native#text/plain tests/webtbs/tw4704.pp -text +tests/webtbs/tw4722.pp svneol=native#text/plain tests/webtbs/tw4763.pp svneol=native#text/plain tests/webtbs/tw4768.pp -text tests/webtbs/tw4778.pp svneol=native#text/plain diff --git a/compiler/arm/raarmgas.pas b/compiler/arm/raarmgas.pas index 5831e55536..e96cbd4d57 100644 --- a/compiler/arm/raarmgas.pas +++ b/compiler/arm/raarmgas.pas @@ -615,7 +615,7 @@ Unit raarmgas; ((operandnum=3) and not(instr.opcode in [A_UMLAL,A_UMULL,A_SMLAL,A_SMULL])) then begin Consume(AS_COMMA); - if not(TryBuildShifterOp(instr.Operands[4] as tarmoperand)) then + if not(TryBuildShifterOp(instr.Operands[operandnum+1] as tarmoperand)) then Message(asmr_e_illegal_shifterop_syntax); Inc(operandnum); end diff --git a/tests/webtbs/tw4722.pp b/tests/webtbs/tw4722.pp new file mode 100644 index 0000000000..ed58a2fa86 --- /dev/null +++ b/tests/webtbs/tw4722.pp @@ -0,0 +1,12 @@ +{ %cpu=arm } +{ Source provided for Free Pascal Bug Report 4722 } +{ Submitted by "Francesco Lombardi" on 2006-01-21 } +{ e-mail: francky74@gmail.com } +procedure SystemCall(n: integer); assembler; +asm + MOV R0, R0, LSL #0x10 + SWI R0 +end; + +begin +end.