Browse Source

* More base address fixes

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

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

@@ -5373,7 +5373,8 @@ begin
         else
           // remove legacy or basesysv on MorphOS syscalls
           begin
-          if CurTokenIsIdentifier('legacy') or CurTokenIsIdentifier('BaseSysV') or CurTokenIsIdentifier('_ExecBase') then
+          if CurTokenIsIdentifier('legacy')
+             or (Curtoken=tkIdentifier) and (Pos('base',LowerCase(CurtokenText))>0) then
             NextToken;
           end;
       end;

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

@@ -124,6 +124,7 @@ type
     procedure TestCallingConventionVectorCall;
     procedure TestCallingConventionSysCall;
     procedure TestCallingConventionSysCallExecbase;
+    procedure TestCallingConventionSysCallUtilitybase;
     Procedure TestProcedurePublic;
     Procedure TestProcedurePublicIdent;
     Procedure TestFunctionPublic;
@@ -826,6 +827,12 @@ begin
   AssertProc([],[],ccSysCall,0);
 end;
 
+procedure TTestProcedureFunction.TestCallingConventionSysCallUtilitybase;
+begin
+  ParseProcedure('; syscall _utilityBase 123');
+  AssertProc([],[],ccSysCall,0);
+end;
+
 procedure TTestProcedureFunction.TestCallingConventionHardFloat;
 begin
   ParseProcedure('; HardFloat');