PageRenderTime 15ms CodeModel.GetById 14ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 0ms

/compiler/aasmsym.pas

https://github.com/slibre/freepascal
Pascal | 71 lines | 31 code | 11 blank | 29 comment | 0 complexity | 5bd3c089bb0de974e8904353a128aad8 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{
 2    Copyright (c) 1998-2007 by Florian Klaempfl and Peter Vreman
 3
 4    Contains abstract assembler instructions for all processor
 5    types, including routines which depend on the symbol table.
 6    These cannot be in aasmtai, because the symbol table units
 7    depend on that one.
 8
 9    * Portions of this code was inspired by the NASM sources
10      The Netwide Assembler is Copyright (c) 1996 Simon Tatham and
11      Julian Hall. All rights reserved.
12
13    This program is free software; you can redistribute it and/or modify
14    it under the terms of the GNU General Public License as published by
15    the Free Software Foundation; either version 2 of the License, or
16    (at your option) any later version.
17
18    This program is distributed in the hope that it will be useful,
19    but WITHOUT ANY WARRANTY; without even the implied warranty of
20    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21    GNU General Public License for more details.
22
23    You should have received a copy of the GNU General Public License
24    along with this program; if not, write to the Free Software
25    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27 ****************************************************************************
28}
29unit aasmsym;
30
31{$i fpcdefs.inc}
32
33interface
34
35    uses
36      aasmtai;
37
38    type
39      tai_cpu_abstract_sym = class(tai_cpu_abstract)
40      protected
41         procedure ppubuildderefimploper(var o:toper);override;
42         procedure ppuderefoper(var o:toper);override;
43      end;
44
45implementation
46
47    uses
48      symsym;
49
50
51    procedure tai_cpu_abstract_sym.ppubuildderefimploper(var o:toper);
52      begin
53        case o.typ of
54          top_local :
55            o.localoper^.localsymderef.build(tlocalvarsym(o.localoper^.localsym));
56        end;
57      end;
58
59
60    procedure tai_cpu_abstract_sym.ppuderefoper(var o:toper);
61      begin
62        case o.typ of
63          top_ref :
64            begin
65            end;
66          top_local :
67            o.localoper^.localsym:=tlocalvarsym(o.localoper^.localsymderef.resolve);
68        end;
69      end;
70
71end.