aoptcpub.pas 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {
  2. Copyright (c) 1998-2002 by Jonas Maebe, member of the Free Pascal
  3. Development Team
  4. This unit contains several types and constants necessary for the
  5. optimizer to work on the LoongArch64 architecture
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit aoptcpub; { Assembler OPTimizer CPU specific Base }
  20. {$I fpcdefs.inc}
  21. interface
  22. { TODO }
  23. uses
  24. aasmcpu, AOptBase, cpubase;
  25. type
  26. { type of a normal instruction }
  27. TInstr = Taicpu;
  28. PInstr = ^TInstr;
  29. { ************************************************************************* }
  30. { **************************** TCondRegs ********************************** }
  31. { ************************************************************************* }
  32. { Info about the conditional registers }
  33. TCondRegs = object
  34. constructor Init;
  35. destructor Done;
  36. end;
  37. { ************************************************************************* }
  38. { **************************** TAoptBaseCpu ******************************* }
  39. { ************************************************************************* }
  40. TAoptBaseCpu = class(TAoptBase)
  41. end;
  42. { ************************************************************************* }
  43. { ******************************* Constants ******************************* }
  44. { ************************************************************************* }
  45. const
  46. { the maximum number of things (registers, memory, ...) a single instruction }
  47. { changes }
  48. MaxCh = 3;
  49. {Oper index of operand that contains the source (reference) with a load }
  50. {instruction }
  51. LoadSrc = 1;
  52. {Oper index of operand that contains the destination (register) with a load }
  53. {instruction }
  54. LoadDst = 0;
  55. {Oper index of operand that contains the source (register) with a store }
  56. {instruction }
  57. StoreSrc = 0;
  58. {Oper index of operand that contains the destination (reference) with a load }
  59. {instruction }
  60. StoreDst = 1;
  61. aopt_uncondjmp = A_B;
  62. aopt_condjmp = A_BXX;
  63. implementation
  64. { ************************************************************************* }
  65. { **************************** TCondRegs ********************************** }
  66. { ************************************************************************* }
  67. constructor TCondRegs.init;
  68. begin
  69. end;
  70. destructor TCondRegs.Done;
  71. {$IFDEF inl}inline;
  72. {$ENDIF inl}
  73. begin
  74. end;
  75. end.