symi86.pas 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. Copyright (c) 2014 by Florian Klaempfl
  3. Symbol table overrides for i386 and i8086
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit symi86;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. symtype,symdef,symsym,symx86;
  22. type
  23. { ti86procvardef }
  24. ti86procvardef = class(tx86procvardef)
  25. function is_pushleftright: boolean; override;
  26. end;
  27. { ti86procdef }
  28. ti86procdef = class(tx86procdef)
  29. function is_pushleftright: boolean; override;
  30. end;
  31. { ti86absolutevarsym }
  32. ti86absolutevarsym = class(tabsolutevarsym)
  33. protected
  34. procedure ppuload_platform(ppufile: tcompilerppufile); override;
  35. procedure ppuwrite_platform(ppufile: tcompilerppufile); override;
  36. public
  37. absseg : boolean;
  38. end;
  39. implementation
  40. uses
  41. symconst;
  42. { ti86procvardef }
  43. function ti86procvardef.is_pushleftright: boolean;
  44. begin
  45. result:=proccalloption in pushleftright_pocalls;
  46. end;
  47. { ti86procdef }
  48. function ti86procdef.is_pushleftright: boolean;
  49. begin
  50. result:=proccalloption in pushleftright_pocalls;
  51. end;
  52. { ti86absolutevarsym }
  53. procedure ti86absolutevarsym.ppuload_platform(ppufile: tcompilerppufile);
  54. begin
  55. inherited;
  56. if abstyp=toaddr then
  57. absseg:=ppufile.getboolean
  58. else
  59. absseg:=false;
  60. end;
  61. procedure ti86absolutevarsym.ppuwrite_platform(ppufile: tcompilerppufile);
  62. begin
  63. inherited;
  64. if abstyp=toaddr then
  65. ppufile.putboolean(absseg);
  66. end;
  67. end.