Browse Source

+ added tabstractprocdef.address_size which returns the actual address size of the proc, taking into account far procs

git-svn-id: trunk@24835 -
nickysn 12 years ago
parent
commit
b6c979e55f
1 changed files with 11 additions and 0 deletions
  1. 11 0
      compiler/symdef.pas

+ 11 - 0
compiler/symdef.pas

@@ -543,6 +543,7 @@ interface
           procedure init_paraloc_info(side: tcallercallee);
           function stack_tainting_parameter(side: tcallercallee): boolean;
           function is_pushleftright: boolean;
+          function address_size:asizeint;
        private
           procedure count_para(p:TObject;arg:pointer);
           procedure insert_para(p:TObject;arg:pointer);
@@ -4318,6 +4319,16 @@ implementation
 {$endif}
       end;
 
+    function tabstractprocdef.address_size: asizeint;
+      begin
+{$ifdef i8086}
+        if po_far in procoptions then
+          result:=sizeof(pint)+2
+        else
+{$endif i8086}
+          result:=sizeof(pint);
+      end;
+
 
 {***************************************************************************
                                   TPROCDEF