main_vbs.inc 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* main_vbs.inc: Display of statistics for ld-tigcc
  2. Copyright (C) 2002-2003 Sebastian Reichelt
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  14. // This file is included by main.c
  15. {
  16. if (DisplayStats)
  17. {
  18. printf ("Target Calculators:\n");
  19. if (Program.Calcs & CALC_TI92)
  20. printf (" TI-92\n");
  21. if (Program.Calcs & CALC_TI89)
  22. printf (" TI-89\n");
  23. if (Program.Calcs & CALC_TI92PLUS)
  24. printf (" TI-92 Plus\n");
  25. if (Program.Calcs & CALC_V200)
  26. printf (" V200\n");
  27. printf ("Program Statistics:\n"
  28. " Program Variable Name: %s\\%s\n"
  29. " Program Variable Size: %ld Bytes\n",
  30. ProgramFolder, ProgramName, (long) OptInfo->ProgramSize);
  31. if (OptInfo->DataSize > 0)
  32. {
  33. printf (" Data Variable Size: %ld Bytes\n",
  34. (long) OptInfo->DataSize);
  35. }
  36. if (OptInfo->BSSSize > 0)
  37. {
  38. printf (" BSS Size: %ld Bytes\n",
  39. (long) OptInfo->BSSSize);
  40. }
  41. printf (" Absolute Relocs: %ld\n"
  42. " Natively Emitted Relocs: %ld\n",
  43. (long) OptInfo->RelocCount, (long) OptInfo->NativeRelocCount);
  44. if (OptInfo->OptimizeBranchesResult > 0)
  45. printf (OptInfo->OptimizeBranches ? " Relocs Removed by Branch Optimization: %ld\n" : " Relocs Removable by Branch Optimization: %ld\n", (long) OptInfo->OptimizeBranchesResult);
  46. if (OptInfo->OptimizeMovesResult > 0)
  47. printf (OptInfo->OptimizeMoves ? " Relocs Removed by Move Optimization: %ld\n" : " Relocs Removable by Move Optimization: %ld\n", (long) OptInfo->OptimizeMovesResult);
  48. if (OptInfo->OptimizeTestsResult > 0)
  49. printf (OptInfo->OptimizeTests ? " Relocs Removed by Test Optimization: %ld\n" : " Relocs Removable by Test Optimization: %ld\n", (long) OptInfo->OptimizeTestsResult);
  50. if (OptInfo->OptimizeCalcsResult > 0)
  51. printf (OptInfo->OptimizeCalcs ? " Relocs Removed by Calc Optimization: %ld\n" : " Relocs Removable by Calc Optimization: %ld\n", (long) OptInfo->OptimizeCalcsResult);
  52. if (OptInfo->UseFLineJumpsResult > 0)
  53. printf (OptInfo->UseFLineJumps || OptInfo->Use4ByteFLineJumps ? " Relocs Removed by F-Line Jumps: %ld\n" : " Relocs Removable by F-Line Jumps: %ld\n", (long) OptInfo->UseFLineJumpsResult);
  54. if (OptInfo->CutRangesResult > 0)
  55. printf (OptInfo->CutRanges ? " Space Saved by Range-Cutting: %ld Bytes\n" : " Estimated Space Savable by Range-Cutting: %ld Bytes\n", (long) OptInfo->CutRangesResult);
  56. if (OptInfo->NearAssemblyResult > 0)
  57. printf (" Space Savable by Using GAS `-l' Switch: %ld Bytes\n", (long) OptInfo->NearAssemblyResult);
  58. }
  59. }