opts68k.pas 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 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.9 2000-02-09 13:22:55 peter
  63. * log truncated
  64. Revision 1.8 2000/01/07 01:14:28 peter
  65. * updated copyright to 2000
  66. }