opts68k.pas 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. globtype,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. 'O' : begin
  37. for j:=3 to length(opt) do
  38. case opt[j] of
  39. '-' : initglobalswitches:=initglobalswitches-[cs_optimize,cs_regalloc,cs_littlesize];
  40. 'a' : initglobalswitches:=initglobalswitches+[cs_optimize];
  41. 'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];
  42. 'G' : initglobalswitches:=initglobalswitches-[cs_littlesize];
  43. 'x' : initglobalswitches:=initglobalswitches+[cs_optimize,cs_regalloc];
  44. '2' : initoptprocessor:=MC68020;
  45. else
  46. IllegalPara(opt);
  47. end;
  48. end;
  49. 'R' : begin
  50. if More='MOT' then
  51. initasmmode:=asmmode_m68k_mot
  52. else
  53. IllegalPara(opt);
  54. end;
  55. else
  56. IllegalPara(opt);
  57. end;
  58. end;
  59. end.
  60. {
  61. $Log$
  62. Revision 1.7 1998-12-11 00:03:23 peter
  63. + globtype,tokens,version unit splitted from globals
  64. Revision 1.6 1998/10/13 13:10:21 peter
  65. * new style for m68k/i386 infos and enums
  66. Revision 1.5 1998/09/25 09:57:09 peter
  67. * moved -A to options.pas, becuase the code is the same
  68. Revision 1.4 1998/08/19 16:07:50 jonas
  69. * changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
  70. Revision 1.3 1998/08/10 14:50:06 peter
  71. + localswitches, moduleswitches, globalswitches splitting
  72. Revision 1.2 1998/06/04 23:51:47 peter
  73. * m68k compiles
  74. + .def file creation moved to gendef.pas so it could also be used
  75. for win32
  76. }