mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 05:22:59 +01:00 
			
		
		
		
	o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now
git-svn-id: trunk@34996 -
		
	
			
		
			
				
	
	
		
			72 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
{
 | 
						|
    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));
 | 
						|
        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);
 | 
						|
        end;
 | 
						|
      end;
 | 
						|
 | 
						|
end.
 |