~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to compiler/x86_64/cpuswtch.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    $Id: cpuswtch.pas,v 1.4 2004/01/13 18:08:58 florian Exp $
3
 
    Copyright (c) 1998-2002 by Florian Klaempfl, Pierre Muller
4
 
 
5
 
    interprets the commandline options which are i386 specific
6
 
 
7
 
    This program is free software; you can redistribute it and/or modify
8
 
    it under the terms of the GNU General Public License as published by
9
 
    the Free Software Foundation; either version 2 of the License, or
10
 
    (at your option) any later version.
11
 
 
12
 
    This program is distributed in the hope that it will be useful,
13
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
    GNU General Public License for more details.
16
 
 
17
 
    You should have received a copy of the GNU General Public License
18
 
    along with this program; if not, write to the Free Software
19
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
 
 
21
 
 ****************************************************************************
22
 
}
23
 
unit cpuswtch;
24
 
 
25
 
{$i fpcdefs.inc}
26
 
 
27
 
interface
28
 
 
29
 
uses
30
 
  options;
31
 
 
32
 
type
33
 
  toptionx86_64=class(toption)
34
 
    procedure interpret_proc_specific_options(const opt:string);override;
35
 
  end;
36
 
 
37
 
implementation
38
 
 
39
 
uses
40
 
  cutils,globtype,systems,globals;
41
 
 
42
 
procedure toptionx86_64.interpret_proc_specific_options(const opt:string);
43
 
var
44
 
  j     : longint;
45
 
  More  : string;
46
 
begin
47
 
  More:=Upper(copy(opt,3,length(opt)-2));
48
 
  case opt[2] of
49
 
   'O' : Begin
50
 
           j := 3;
51
 
           While (j <= Length(Opt)) Do
52
 
             Begin
53
 
               case opt[j] of
54
 
                 '-' :
55
 
                   begin
56
 
                     initglobalswitches:=initglobalswitches-[cs_optimize,cs_fastoptimize,cs_slowoptimize,cs_littlesize,
57
 
                       cs_regvars,cs_uncertainopts];
58
 
                     FillChar(ParaAlignment,sizeof(ParaAlignment),0);
59
 
                   end;
60
 
                 'a' :
61
 
                   begin
62
 
                     UpdateAlignmentStr(Copy(Opt,j+1,255),ParaAlignment);
63
 
                     j:=length(Opt);
64
 
                   end;
65
 
                 'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];
66
 
                 'G' : initglobalswitches:=initglobalswitches-[cs_littlesize];
67
 
                 'r' :
68
 
                   begin
69
 
                     initglobalswitches:=initglobalswitches+[cs_regvars];
70
 
                     Simplify_ppu:=false;
71
 
                   end;
72
 
                 'u' : initglobalswitches:=initglobalswitches+[cs_uncertainopts];
73
 
                 '1' : initglobalswitches:=initglobalswitches-[cs_fastoptimize,cs_slowoptimize]+[cs_optimize];
74
 
                 '2' : initglobalswitches:=initglobalswitches-[cs_slowoptimize]+[cs_optimize,cs_fastoptimize];
75
 
                 '3' : initglobalswitches:=initglobalswitches+[cs_optimize,cs_fastoptimize,cs_slowoptimize];
76
 
                 else IllegalPara(opt);
77
 
               End;
78
 
               Inc(j)
79
 
             end;
80
 
         end;
81
 
   'R' : begin
82
 
           if More='ATT' then
83
 
            initasmmode:=asmmode_i386_att
84
 
           else
85
 
            if More='INTEL' then
86
 
             initasmmode:=asmmode_i386_intel
87
 
           else
88
 
            IllegalPara(opt);
89
 
         end;
90
 
  else
91
 
   IllegalPara(opt);
92
 
  end;
93
 
end;
94
 
 
95
 
 
96
 
initialization
97
 
  coption:=toptionx86_64;
98
 
end.
99
 
{
100
 
  $Log: cpuswtch.pas,v $
101
 
  Revision 1.4  2004/01/13 18:08:58  florian
102
 
    * x86-64 compilation fixed
103
 
 
104
 
  Revision 1.3  2003/09/25 13:13:32  florian
105
 
    * more x86-64 fixes
106
 
 
107
 
  Revision 1.2  2002/08/10 14:53:38  carl
108
 
    + moved target_cpu_string to cpuinfo
109
 
    * renamed asmmode enum.
110
 
    * assembler reader has now less ifdef's
111
 
    * move from nppcmem.pas -> ncgmem.pas vec. node.
112
 
 
113
 
  Revision 1.1  2002/07/24 22:38:15  florian
114
 
    + initial release of x86-64 target code
115
 
 
116
 
  Revision 1.7  2002/05/18 13:34:22  peter
117
 
    * readded missing revisions
118
 
 
119
 
  Revision 1.6  2002/05/16 19:46:50  carl
120
 
  + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
121
 
  + try to fix temp allocation (still in ifdef)
122
 
  + generic constructor calls
123
 
  + start of tassembler / tmodulebase class cleanup
124
 
}