Browse Source

* Fix syscall calling convention parsing

git-svn-id: trunk@47471 -
michael 4 years ago
parent
commit
cf68d1f965
2 changed files with 7 additions and 1 deletions
  1. 0 1
      packages/fcl-passrc/src/pparser.pp
  2. 7 0
      packages/fcl-passrc/tests/tcprocfunc.pas

+ 0 - 1
packages/fcl-passrc/src/pparser.pp

@@ -5375,7 +5375,6 @@ begin
           begin
           if CurTokenIsIdentifier('legacy') or CurTokenIsIdentifier('BaseSysV') then
             NextToken;
-          NextToken; // remove offset
           end;
       end;
       if IsProcType then

+ 7 - 0
packages/fcl-passrc/tests/tcprocfunc.pas

@@ -122,6 +122,7 @@ type
     procedure TestCallingConventionSysV_ABI_CDec;
     procedure TestCallingConventionSysV_ABI_Default;
     procedure TestCallingConventionVectorCall;
+    procedure TestCallingConventionSysCall;
     Procedure TestProcedurePublic;
     Procedure TestProcedurePublicIdent;
     Procedure TestFunctionPublic;
@@ -812,6 +813,12 @@ begin
   AssertProc([],[],ccVectorCall,0);
 end;
 
+procedure TTestProcedureFunction.TestCallingConventionSysCall;
+begin
+  ParseProcedure('; syscall abc');
+  AssertProc([],[],ccSysCall,0);
+end;
+
 procedure TTestProcedureFunction.TestCallingConventionHardFloat;
 begin
   ParseProcedure('; HardFloat');