summaryrefslogtreecommitdiff
path: root/compiler/aasmsym.pas
blob: e3d7c63d1b8f5ab12cc9b46aae8fbc8b65c42a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
    Copyright (c) 1998-2007 by Florian Klaempfl and Peter Vreman

    Contains abstract assembler instructions for all processor
    types, including routines which depend on the symbol table.
    These cannot be in aasmtai, because the symbol table units
    depend on that one.

    * Portions of this code was inspired by the NASM sources
      The Netwide Assembler is Copyright (c) 1996 Simon Tatham and
      Julian Hall. All rights reserved.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

 ****************************************************************************
}
unit aasmsym;

{$i fpcdefs.inc}

interface

    uses
      aasmtai;

    type
      tai_cpu_abstract_sym = class(tai_cpu_abstract)
      protected
         procedure ppubuildderefimploper(var o:toper);override;
         procedure ppuderefoper(var o:toper);override;
      end;

implementation

    uses
      symsym;


    procedure tai_cpu_abstract_sym.ppubuildderefimploper(var o:toper);
      begin
        case o.typ of
          top_local :
            o.localoper^.localsymderef.build(tlocalvarsym(o.localoper^.localsym));
          else
            ;
        end;
      end;


    procedure tai_cpu_abstract_sym.ppuderefoper(var o:toper);
      begin
        case o.typ of
          top_ref :
            begin
            end;
          top_local :
            o.localoper^.localsym:=tlocalvarsym(o.localoper^.localsymderef.resolve);
          else
            ;
        end;
      end;

end.