opts68k.pas 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4. interprets the commandline options which are m68k specific
  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 opts68k;
  18. interface
  19. uses
  20. options;
  21. type
  22. poption68k=^toption68k;
  23. toption68k=object(toption)
  24. procedure interpret_proc_specific_options(const opt:string);virtual;
  25. end;
  26. implementation
  27. uses
  28. systems,globals;
  29. procedure toption68k.interpret_proc_specific_options(const opt:string);
  30. var
  31. j : longint;
  32. More : string;
  33. begin
  34. More:=Upper(copy(opt,3,length(opt)-2));
  35. case opt[2] of
  36. 'A' : begin
  37. if set_string_asm(More) then
  38. initoutputformat:=target_asm.id
  39. else
  40. IllegalPara(opt);
  41. end;
  42. 'O' : begin
  43. for j:=3 to length(opt) do
  44. case opt[j] of
  45. '-' : initglobalswitches:=initglobalswitches-[cs_optimize,cs_maxoptimize,cs_littlesize];
  46. 'a' : initglobalswitches:=initglobalswitches+[cs_optimize];
  47. 'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];
  48. 'G' : initglobalswitches:=initglobalswitches-[cs_littlesize];
  49. 'x' : initglobalswitches:=initglobalswitches+[cs_optimize,cs_maxoptimize];
  50. '2' : initoptprocessor:=MC68020;
  51. else
  52. IllegalPara(opt);
  53. end;
  54. end;
  55. 'R' : begin
  56. if More='MOT' then
  57. initasmmode:=M68K_MOT;
  58. end;
  59. else
  60. IllegalPara(opt);
  61. end;
  62. end;
  63. end.
  64. {
  65. $Log$
  66. Revision 1.3 1998-08-10 14:50:06 peter
  67. + localswitches, moduleswitches, globalswitches splitting
  68. Revision 1.2 1998/06/04 23:51:47 peter
  69. * m68k compiles
  70. + .def file creation moved to gendef.pas so it could also be used
  71. for win32
  72. }