aoptcpu.pas 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. Copyright (c) 1998-2002 by Jonas Maebe, member of the Free Pascal
  3. Development Team
  4. This unit implements the ARM optimizer object
  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. }
  18. Unit aoptcpu;
  19. {$i fpcdefs.inc}
  20. Interface
  21. uses cpubase, aasmtai, aopt, aoptcpub;
  22. Type
  23. TCpuAsmOptimizer = class(TAsmOptimizer)
  24. { uses the same constructor as TAopObj }
  25. function PeepHoleOptPass1Cpu(var p: tai): boolean; override;
  26. procedure PeepHoleOptPass2;override;
  27. End;
  28. Implementation
  29. uses
  30. aasmbase,aasmcpu;
  31. function CanBeCond(p : tai) : boolean;
  32. begin
  33. result:=(p.typ=ait_instruction) and (taicpu(p).condition=C_None);
  34. end;
  35. function TCpuAsmOptimizer.PeepHoleOptPass1Cpu(var p: tai): boolean;
  36. var
  37. next1: tai;
  38. begin
  39. result := false;
  40. end;
  41. procedure TCpuAsmOptimizer.PeepHoleOptPass2;
  42. begin
  43. end;
  44. begin
  45. casmoptimizer:=TCpuAsmOptimizer;
  46. End.