cpupara.pas 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {
  2. $Id$
  3. Copyright (c) 2002 by Florian Klaempfl
  4. Generates the argument location information for 680x0
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published bymethodpointer
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. { Generates the argument location information for 680x0.
  19. }
  20. unit cpupara;
  21. {$i fpcdefs.inc}
  22. interface
  23. uses
  24. cpubase,
  25. symdef,paramgr;
  26. type
  27. { Returns the location for the nr-st 32 Bit int parameter
  28. if every parameter before is an 32 Bit int parameter as well
  29. and if the calling conventions for the helper routines of the
  30. rtl are used.
  31. }
  32. tm68kparamanager = class(tparamanager)
  33. function getintparaloc(nr : longint) : tparalocation;override;
  34. procedure create_param_loc_info(p : tabstractprocdef);override;
  35. function getselflocation(p : tabstractprocdef) : tparalocation;override;
  36. end;
  37. implementation
  38. uses
  39. verbose;
  40. function tm68kparamanager.getintparaloc(nr : longint) : tparalocation;
  41. begin
  42. fillchar(result,sizeof(tparalocation),0);
  43. end;
  44. procedure tm68kparamanager.create_param_loc_info(p : tabstractprocdef);
  45. begin
  46. { set default para_alignment to target_info.stackalignment }
  47. { if para_alignment=0 then
  48. para_alignment:=aktalignment.paraalign;
  49. }
  50. end;
  51. function tm68kparamanager.getselflocation(p : tabstractprocdef) : tparalocation;
  52. begin
  53. getselflocation.loc:=LOC_REFERENCE;
  54. getselflocation.reference.index.enum:=R_SP;
  55. getselflocation.reference.offset:=4;
  56. end;
  57. begin
  58. paramanager:=tm68kparamanager.create;
  59. end.
  60. {
  61. $Log$
  62. Revision 1.3 2003-01-08 18:43:57 daniel
  63. * Tregister changed into a record
  64. Revision 1.2 2002/12/14 15:02:03 carl
  65. * maxoperands -> max_operands (for portability in rautils.pas)
  66. * fix some range-check errors with loadconst
  67. + add ncgadd unit to m68k
  68. * some bugfix of a_param_reg with LOC_CREFERENCE
  69. Revision 1.1 2002/08/12 15:08:44 carl
  70. + stab register indexes for powerpc (moved from gdb to cpubase)
  71. + tprocessor enumeration moved to cpuinfo
  72. + linker in target_info is now a class
  73. * many many updates for m68k (will soon start to compile)
  74. - removed some ifdef or correct them for correct cpu
  75. }