/compiler/aasmsym.pas

https://github.com/slibre/freepascal · Pascal · 71 lines · 31 code · 11 blank · 29 comment · 0 complexity · 5bd3c089bb0de974e8904353a128aad8 MD5 · raw file

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