소스 검색

* fixed reading of shifter op in mov instructions, fixes bug #4722

git-svn-id: trunk@3528 -
florian 19 년 전
부모
커밋
d9dfcfa402
3개의 변경된 파일14개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/arm/raarmgas.pas
  3. 12 0
      tests/webtbs/tw4722.pp

+ 1 - 0
.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

+ 1 - 1
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

+ 12 - 0
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: [email protected] }
+procedure SystemCall(n: integer); assembler;
+asm
+  MOV    R0, R0, LSL #0x10
+  SWI    R0
+end;
+
+begin
+end.