ncpucall.pas 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {******************************************************************************
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Generate SPARC assembler for in call nodes
  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 by
  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. unit ncpucall;
  18. {$INCLUDE fpcdefs.inc}
  19. interface
  20. uses
  21. symdef,node,ncal,ncgcal;
  22. type
  23. TSparcCallNode=class(TCgCallNode)
  24. function pass_1:TNode;override;
  25. {Under SPARC, the frame pointer is automatically set by the SAVE instruction
  26. which is part of the stardrad calling mechanism. This function will do nothing.
  27. the frame pointer register is the stack pointer register of the caller, and is
  28. set when generating function prologue in cgcpu.tcgSPARC.g_stackframe_entry}
  29. procedure push_framepointer;override;
  30. end;
  31. implementation
  32. uses
  33. systems,
  34. cutils,verbose,
  35. paramgr,
  36. cgbase,
  37. nmem,nld,ncnv,
  38. cgobj,tgobj,rgobj,rgcpu,cgcpu,cpupi;
  39. function TSparcCallNode.pass_1:TNode;
  40. begin
  41. result:=inherited pass_1;
  42. if assigned(result)
  43. then
  44. exit;
  45. if ProcDefinition is TProcDef
  46. then
  47. with TProcDef(procdefinition).parast do
  48. if datasize>TSparcProcInfo(current_procinfo).maxpushedparasize
  49. then
  50. TSparcProcInfo(current_procinfo).maxpushedparasize:=datasize;
  51. end;
  52. procedure TSparcCallNode.push_framepointer;
  53. begin
  54. end;
  55. begin
  56. ccallnode:=TSparcCallNode;
  57. end.
  58. {
  59. $Log$
  60. Revision 1.11 2003-04-28 09:49:58 mazen
  61. - InternalError removed from TSparcCallNode.push_framepointer as it is called by common coplier code.
  62. Revision 1.10 2003/04/27 11:21:36 peter
  63. * aktprocdef renamed to current_procdef
  64. * procinfo renamed to current_procinfo
  65. * procinfo will now be stored in current_module so it can be
  66. cleaned up properly
  67. * gen_main_procsym changed to create_main_proc and release_main_proc
  68. to also generate a tprocinfo structure
  69. * fixed unit implicit initfinal
  70. Revision 1.9 2003/04/04 15:38:56 peter
  71. * moved generic code from n386cal to ncgcal, i386 now also
  72. uses the generic ncgcal
  73. Revision 1.8 2003/02/05 22:44:55 mazen
  74. * making UNIT lower case.
  75. Revision 1.7 2003/02/04 21:50:54 mazen
  76. * fixing internal errors related to notn when compiling RTL
  77. Revision 1.6 2003/01/22 22:30:03 mazen
  78. - internal errors rmoved from a_loar_reg_reg when reg sizes differs from 32
  79. Revision 1.5 2002/11/14 21:42:08 mazen
  80. * fixing return value variable address
  81. Revision 1.4 2002/10/10 19:57:52 mazen
  82. * Just to update repsitory
  83. Revision 1.3 2002/09/30 19:12:14 mazen
  84. * function prologue fixed
  85. Revision 1.2 2002/08/30 13:16:23 mazen
  86. *call parameter handling is now based on the new param manager
  87. Revision 1.2 2002/08/17 09:23:49 florian
  88. * first part of procinfo rewrite
  89. Revision 1.1 2002/08/13 21:40:59 florian
  90. * more fixes for ppc calling conventions
  91. }