cghlcpu.pas 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. {
  2. Copyright (c) 2012 by Jonas Maebe
  3. Member of the Free Pascal development team
  4. This unit replaces all abstract methods of cgobj that are unused for
  5. targets that are based on the high level code generator with stubs that
  6. result in an internalerror
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. ****************************************************************************
  19. }
  20. unit cghlcpu;
  21. {$mode objfpc}
  22. interface
  23. uses
  24. globtype,verbose,
  25. aasmbase,aasmdata,
  26. symtype,symdef,
  27. cpubase,cgbase,cgutils,cgobj;
  28. type
  29. thlbasecgcpu = class(tcg)
  30. public
  31. procedure g_stackpointer_alloc(list: TAsmList; size: longint); override;
  32. procedure g_proc_exit(list: TAsmList; parasize: longint; nostackframe: boolean); override;
  33. procedure g_proc_entry(list: TAsmList; localsize: longint; nostackframe: boolean); override;
  34. procedure g_overflowcheck(list: TAsmList; const Loc: tlocation; def: tdef); override;
  35. procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint); override;
  36. {$ifdef cpuflags}
  37. procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister); override;
  38. procedure a_jmp_flags(list: TAsmList; const f: TResFlags; l: tasmlabel); override;
  39. {$endif}
  40. procedure g_concatcopy(list: TAsmList; const source, dest: treference; len: tcgint); override;
  41. procedure a_op_reg_reg(list: TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister); override;
  42. procedure a_op_const_reg(list: TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); override;
  43. procedure a_load_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
  44. procedure a_load_reg_ref(list: TAsmList; fromsize, tosize: tcgsize; register: tregister; const ref: treference); override;
  45. procedure a_load_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; register: tregister); override;
  46. procedure a_load_const_reg(list: TAsmList; size: tcgsize; a: tcgint; register: tregister); override;
  47. procedure a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister); override;
  48. procedure a_loadfpu_reg_ref(list: TAsmList; fromsize, tosize: tcgsize; reg: tregister; const ref: treference); override;
  49. procedure a_loadfpu_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; reg: tregister); override;
  50. procedure a_loadaddr_ref_reg(list: TAsmList; const ref: treference; r: tregister); override;
  51. procedure a_jmp_name(list: TAsmList; const s: string); override;
  52. procedure a_jmp_always(list: TAsmList; l: tasmlabel); override;
  53. procedure a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
  54. procedure a_call_reg(list: TAsmList; reg: tregister); override;
  55. procedure a_call_name(list: TAsmList; const s: string; weak: boolean); override;
  56. procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: tcgsize; src, dst: TRegister); override;
  57. end;
  58. implementation
  59. { thlbasecgcpu }
  60. procedure thlbasecgcpu.a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: tcgsize; src, dst: TRegister);
  61. begin
  62. internalerror(2012042801);
  63. end;
  64. procedure thlbasecgcpu.a_call_name(list: TAsmList; const s: string; weak: boolean);
  65. begin
  66. internalerror(2012042802);
  67. end;
  68. procedure thlbasecgcpu.a_call_reg(list: TAsmList; reg: tregister);
  69. begin
  70. internalerror(2012042803);
  71. end;
  72. procedure thlbasecgcpu.a_cmp_reg_reg_label(list: TAsmList; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel);
  73. begin
  74. internalerror(2012042804);
  75. end;
  76. procedure thlbasecgcpu.a_jmp_always(list: TAsmList; l: tasmlabel);
  77. begin
  78. internalerror(2012042805);
  79. end;
  80. {$ifdef cpuflags}
  81. procedure thlbasecgcpu.a_jmp_flags(list: TAsmList; const f: TResFlags; l: tasmlabel);
  82. begin
  83. internalerror(2012042806);
  84. end;
  85. {$endif}
  86. procedure thlbasecgcpu.a_jmp_name(list: TAsmList; const s: string);
  87. begin
  88. internalerror(2012042807);
  89. end;
  90. procedure thlbasecgcpu.a_loadaddr_ref_reg(list: TAsmList; const ref: treference; r: tregister);
  91. begin
  92. internalerror(2012042808);
  93. end;
  94. procedure thlbasecgcpu.a_loadfpu_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; reg: tregister);
  95. begin
  96. internalerror(2012042809);
  97. end;
  98. procedure thlbasecgcpu.a_loadfpu_reg_ref(list: TAsmList; fromsize, tosize: tcgsize; reg: tregister; const ref: treference);
  99. begin
  100. internalerror(2012042810);
  101. end;
  102. procedure thlbasecgcpu.a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister);
  103. begin
  104. internalerror(2012042811);
  105. end;
  106. procedure thlbasecgcpu.a_load_const_reg(list: TAsmList; size: tcgsize; a: tcgint; register: tregister);
  107. begin
  108. internalerror(2012042812);
  109. end;
  110. procedure thlbasecgcpu.a_load_ref_reg(list: TAsmList; fromsize, tosize: tcgsize; const ref: treference; register: tregister);
  111. begin
  112. internalerror(2012042813);
  113. end;
  114. procedure thlbasecgcpu.a_load_reg_ref(list: TAsmList; fromsize, tosize: tcgsize; register: tregister; const ref: treference);
  115. begin
  116. internalerror(2012042814);
  117. end;
  118. procedure thlbasecgcpu.a_load_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister);
  119. begin
  120. internalerror(2012042815);
  121. end;
  122. procedure thlbasecgcpu.a_op_const_reg(list: TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister);
  123. begin
  124. internalerror(2012042816);
  125. end;
  126. procedure thlbasecgcpu.a_op_reg_reg(list: TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister);
  127. begin
  128. internalerror(2012042817);
  129. end;
  130. procedure thlbasecgcpu.g_concatcopy(list: TAsmList; const source, dest: treference; len: tcgint);
  131. begin
  132. internalerror(2012042818);
  133. end;
  134. {$ifdef cpuflags}
  135. procedure thlbasecgcpu.g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister);
  136. begin
  137. internalerror(2012042819);
  138. end;
  139. {$endif}
  140. procedure thlbasecgcpu.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
  141. begin
  142. internalerror(2012042820);
  143. end;
  144. procedure thlbasecgcpu.g_overflowcheck(list: TAsmList; const Loc: tlocation; def: tdef);
  145. begin
  146. internalerror(2012042820);
  147. end;
  148. procedure thlbasecgcpu.g_proc_entry(list: TAsmList; localsize: longint; nostackframe: boolean);
  149. begin
  150. internalerror(2012042821);
  151. end;
  152. procedure thlbasecgcpu.g_proc_exit(list: TAsmList; parasize: longint; nostackframe: boolean);
  153. begin
  154. internalerror(2012042822);
  155. end;
  156. procedure thlbasecgcpu.g_stackpointer_alloc(list: TAsmList; size: longint);
  157. begin
  158. internalerror(2012042823);
  159. end;
  160. end.