Browse Source

+ introduced tabstractprocdef.ofs_address_type - the address type, generated for
ofs()

git-svn-id: trunk@38681 -

nickysn 7 years ago
parent
commit
c7503ca291
2 changed files with 22 additions and 0 deletions
  1. 14 0
      compiler/i8086/symcpu.pas
  2. 8 0
      compiler/symdef.pas

+ 14 - 0
compiler/i8086/symcpu.pas

@@ -112,6 +112,7 @@ type
     constructor create(level:byte);override;
     function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override;
     function address_type:tdef;override;
+    function ofs_address_type:tdef;override;
     function size:asizeint;override;
     procedure declared_far;override;
     procedure declared_near;override;
@@ -133,6 +134,7 @@ type
     constructor create(level:byte;doregister:boolean);override;
     function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override;
     function address_type:tdef;override;
+    function ofs_address_type:tdef;override;
     function size:asizeint;override;
     procedure declared_far;override;
     procedure declared_near;override;
@@ -350,6 +352,12 @@ implementation
     end;
 
 
+  function tcpuprocdef.ofs_address_type:tdef;
+    begin
+      result:=voidnearpointertype;
+    end;
+
+
   function tcpuprocdef.size: asizeint;
     begin
       result:=address_type.size;
@@ -438,6 +446,12 @@ implementation
     end;
 
 
+  function tcpuprocvardef.ofs_address_type:tdef;
+    begin
+      result:=voidnearpointertype;
+    end;
+
+
   function tcpuprocvardef.size:asizeint;
     begin
       if is_addressonly then

+ 8 - 0
compiler/symdef.pas

@@ -634,6 +634,8 @@ interface
           function stack_tainting_parameter(side: tcallercallee): boolean;
           function is_pushleftright: boolean;virtual;
           function address_type:tdef;virtual;
+          { address type, generated for ofs() }
+          function ofs_address_type:tdef;virtual;
           procedure declared_far;virtual;
           procedure declared_near;virtual;
        private
@@ -5222,6 +5224,12 @@ implementation
       end;
 
 
+    function tabstractprocdef.ofs_address_type:tdef;
+      begin
+        result:=address_type;
+      end;
+
+
     procedure tabstractprocdef.declared_far;
       begin
         Message1(parser_w_proc_directive_ignored,'FAR');