ncpucall.pas 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 load_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(procinfo).maxpushedparasize
  49. then
  50. TSparcProcInfo(procinfo).maxpushedparasize:=datasize;
  51. end;
  52. procedure TSparcCallNode.load_framepointer;
  53. begin
  54. InternalError(2002101000);
  55. end;
  56. begin
  57. ccallnode:=TSparcCallNode;
  58. end.
  59. {
  60. $Log$
  61. Revision 1.8 2003-02-05 22:44:55 mazen
  62. * making UNIT lower case.
  63. Revision 1.7 2003/02/04 21:50:54 mazen
  64. * fixing internal errors related to notn when compiling RTL
  65. Revision 1.6 2003/01/22 22:30:03 mazen
  66. - internal errors rmoved from a_loar_reg_reg when reg sizes differs from 32
  67. Revision 1.5 2002/11/14 21:42:08 mazen
  68. * fixing return value variable address
  69. Revision 1.4 2002/10/10 19:57:52 mazen
  70. * Just to update repsitory
  71. Revision 1.3 2002/09/30 19:12:14 mazen
  72. * function prologue fixed
  73. Revision 1.2 2002/08/30 13:16:23 mazen
  74. *call parameter handling is now based on the new param manager
  75. Revision 1.2 2002/08/17 09:23:49 florian
  76. * first part of procinfo rewrite
  77. Revision 1.1 2002/08/13 21:40:59 florian
  78. * more fixes for ppc calling conventions
  79. }