cpuswtch.pas 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 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 cpuswtch;
  18. {$i defines.inc}
  19. interface
  20. uses
  21. options;
  22. type
  23. poption68k=^toption68k;
  24. toption68k=object(toption)
  25. procedure interpret_proc_specific_options(const opt:string);virtual;
  26. end;
  27. implementation
  28. uses
  29. cutils,globtype,systems,globals;
  30. procedure toption68k.interpret_proc_specific_options(const opt:string);
  31. var
  32. j : longint;
  33. More : string;
  34. begin
  35. More:=Upper(copy(opt,3,length(opt)-2));
  36. case opt[2] of
  37. 'O' : begin
  38. for j:=3 to length(opt) do
  39. case opt[j] of
  40. '-' : initglobalswitches:=initglobalswitches-[cs_optimize,cs_regalloc,cs_littlesize];
  41. 'a' : initglobalswitches:=initglobalswitches+[cs_optimize];
  42. 'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];
  43. 'G' : initglobalswitches:=initglobalswitches-[cs_littlesize];
  44. 'x' : initglobalswitches:=initglobalswitches+[cs_optimize,cs_regalloc];
  45. '2' : initoptprocessor:=MC68020;
  46. else
  47. IllegalPara(opt);
  48. end;
  49. end;
  50. 'R' : begin
  51. if More='MOT' then
  52. initasmmode:=asmmode_m68k_mot
  53. else
  54. IllegalPara(opt);
  55. end;
  56. else
  57. IllegalPara(opt);
  58. end;
  59. end;
  60. end.
  61. {
  62. $Log$
  63. Revision 1.1 2000-11-30 22:41:55 florian
  64. * renamed
  65. Revision 1.1 2000/11/30 22:22:50 florian
  66. * moved to m68k
  67. Revision 1.4 2000/09/24 15:06:20 peter
  68. * use defines.inc
  69. Revision 1.3 2000/08/27 16:11:51 peter
  70. * moved some util functions from globals,cobjects to cutils
  71. * splitted files into finput,fmodule
  72. Revision 1.2 2000/07/13 11:32:44 michael
  73. + removed logs
  74. }