Explorar o código

* Fix syscall calling convention parsing

git-svn-id: trunk@47471 -
michael %!s(int64=4) %!d(string=hai) anos
pai
achega
cf68d1f965

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

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

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

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