Explorar o código

Merged revisions 1559-1561,1563-1564 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

r1559 (florian)
+ check validity of -Oa parameter


r1560 (florian)
* update errord.msg from Karl-Michael Schindler


r1561 (florian)
+ alignment setting


r1563 (florian)
+ fixed some alignment settings


r1564 (florian)
+ proper alignment directives added

git-svn-id: branches/fixes_2_0@1565 -

florian %!s(int64=20) %!d(string=hai) anos
pai
achega
bd04d53c7e

+ 2 - 1
compiler/i386/cpuswtch.pas

@@ -58,7 +58,8 @@ begin
                    end;
                  'a' :
                    begin
-                     UpdateAlignmentStr(Copy(Opt,j+1,255),ParaAlignment);
+                     if not(UpdateAlignmentStr(Copy(Opt,j+1,255),ParaAlignment)) then
+                       IllegalPara(opt);
                      j:=length(Opt);
                    end;
                  'g' : initglobalswitches:=initglobalswitches+[cs_littlesize];

+ 9 - 1
compiler/msg/errord.msg

@@ -1015,6 +1015,12 @@ parser_e_arithmetic_operation_overflow=03213_E_Overflow in arithmetischer Operat
 % An operation on two integers values produced an overflow
 parser_e_protected_or_private_expected=03214_E_Protected oder private erwartet
 % \var{strict} can be only used together with \var{protected} or \var{private}.
+parser_e_illegal_slice=03215_E_SLICE kann nicht ausserhalb der Parameterliste benutzt werden
+% \var{slice} can be used only for arguments accepting an open array parameter
+parser_e_dispinterface_cant_have_parent=03216_E_Ein DISPINTERFACE kann keine Elternklasse haben.
+% A DISPINMTERFACE is a special type of interface which can't have a parent class
+parser_e_dispinterface_needs_a_guid=03217_E_Ein DISPINTERFACE ben”tigt einen GUID
+% A DISPINMTERFACE needs always an interface identification
 % \end{description}
 #
 # Type Checking
@@ -2307,6 +2313,7 @@ S*2Aas_assembliere mit Hilfe von GNU AS
 **2Sg_erlaube LABEL und GOTO
 **2Sh_benutze ANSI-Strings
 **2Si_benutze C++ artige INLINE
+**2Sk_lade fpcylix Unit
 **2SI<x>_setze den Stil des Interface zu <x>
 **3SIcom_COM kompatibles Interface (Voreinstellung)
 **3SIcorba_CORBA kompatibles Interface
@@ -2360,9 +2367,10 @@ S*2Tlinux_Linux
 **2*_i : allgemeine Info               d : Debug Info
 **2*_l : Zeilennummern                 r : Rhide/GCC kompatibler Modus
 **2*_a : alles                         x : Exe-Datei Info (nur Win32)
+**2*_b : schreibe bei Meldungen mit Dateinamen den vollst„ndigem Pfad
 **2*_v : schreibe fpcdebug.txt mit     p : schreibe tree.log mit Analysenbaum (parse tree)
 **2*_   ganz viel Informationen
-3*1W<x>_Win32-„hnliche Ziel-Optionen 
+3*1W<x>_Win32-„hnliche Ziel-Optionen
 3*2WB_erzeuge ein relozierbares Image
 3*2WB<x>_Setze Image base auf den Hexadecimal Wert <x>
 3*2WC_spezifiziere "console type application"

+ 1 - 0
compiler/msg/errore.msg

@@ -2272,6 +2272,7 @@ S*2Aas_assemble using GNU AS
 **1n_don't read the default config file
 **1o<x>_change the name of the executable produced to <x>
 **1O<x>_optimizations:
+3*2Oa_<type>=<values> set alignment
 3*2Og_generate smaller code
 3*2OG_generate faster code (default)
 **2Or_keep certain variables in registers

+ 1 - 1
compiler/msgidx.inc

@@ -661,7 +661,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 39066;
+  MsgTxtSize = 39102;
 
   MsgIdxMax : array[1..20] of longint=(
     19,73,216,59,59,47,100,20,135,60,

+ 37 - 37
compiler/msgtxt.inc

@@ -827,62 +827,63 @@ const msgtxt : array[0..000162,1..240] of char=(
   '**1n_don'#039't read the default config file'#010+
   '**1o<x>_change the name of the executable produced to <x>'#010+
   '**1O<x>_opti','mizations:'#010+
+  '3*2Oa_<type>=<values> set alignment'#010+
   '3*2Og_generate smaller code'#010+
   '3*2OG_generate faster code (default)'#010+
   '**2Or_keep certain variables in registers'#010+
   '3*2Ou_enable uncertain optimizations (see docs)'#010+
-  '3*2O1_level 1 optimizations (quick optimizations)'#010+
-  '3*2O2_level 2 optimizati','ons (-O1 + slower optimizations)'#010+
+  '3*2O1_level 1 optimizations (quick opt','imizations)'#010+
+  '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#010+
   '3*2O3_level 3 optimizations (-O2 repeatedly, max 5 times)'#010+
   '3*2Op<x>_target processor:'#010+
   '3*3Op1_set target processor to 386/486'#010+
-  '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#010+
-  '3*3Op3_set target processor ','to PPro/PII/c6x86/K6 (tm)'#010+
+  '3*3Op2_set target processor to Pentium/PentiumM','MX (tm)'#010+
+  '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#010+
   '6*2Og_generate smaller code'#010+
   '6*2OG_generate faster code (default)'#010+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#010+
   '6*2O0_set target processor to a MC68000'#010+
-  '6*2O2_set target processor to a MC68020+ (default)'#010+
-  '**1pg_generate pro','file code for gprof (defines FPC_PROFILE)'#010+
+  '6*2O2_set target processor to a M','C68020+ (default)'#010+
+  '**1pg_generate profile code for gprof (defines FPC_PROFILE)'#010+
   '**1R<x>_assembler reading style:'#010+
   '**2Rdefault_use default assembler'#010+
   '3*2Ratt_read AT&T style assembler'#010+
   '3*2Rintel_read Intel style assembler'#010+
-  '6*2RMOT_read motorola style assembler'#010+
-  '**1S<x>_syntax options',':'#010+
+  '6*2RMOT_read motorola st','yle assembler'#010+
+  '**1S<x>_syntax options:'#010+
   '**2S2_same as -Mobjfpc'#010+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#010+
   '**2Sa_include assertion code.'#010+
   '**2Sd_same as -Mdelphi'#010+
   '**2Se<x>_error options. <x> is a combination of the following:'#010+
-  '**3*_<n> : compiler stops after the <n> errors (d','efault is 1)'#010+
+  '**3*_<n> : co','mpiler stops after the <n> errors (default is 1)'#010+
   '**3*_w : compiler stops also after warnings'#010+
   '**3*_n : compiler stops also after notes'#010+
   '**3*_h : compiler stops also after hints'#010+
   '**2Sg_allow LABEL and GOTO'#010+
   '**2Sh_Use ansistrings'#010+
-  '**2Si_support C++ styled INLINE'#010+
-  '**2Sk_load fpcylix u','nit'#010+
+  '**2Si_support C+','+ styled INLINE'#010+
+  '**2Sk_load fpcylix unit'#010+
   '**2SI<x>_set interface style to <x>'#010+
   '**3SIcom_COM compatible interface (default)'#010+
   '**3SIcorba_CORBA compatible interface'#010+
   '**2Sm_support macros like C (global)'#010+
   '**2So_same as -Mtp'#010+
   '**2Sp_same as -Mgpc'#010+
-  '**2Ss_constructor name must be init (destr','uctor must be done)'#010+
+  '**2Ss_','constructor name must be init (destructor must be done)'#010+
   '**2St_allow static keyword in objects'#010+
   '**1s_don'#039't call assembler and linker'#010+
   '**2sh_Generate script to link on host'#010+
   '**2st_Generate script to link on target'#010+
-  '**2sr_Skip register allocation phase (use with -alr)'#010+
-  '**1T<x>_Target',' operating system:'#010+
+  '**2sr_Skip register allocation ','phase (use with -alr)'#010+
+  '**1T<x>_Target operating system:'#010+
   '3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+
   '3*2Tfreebsd_FreeBSD'#010+
   '3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+
   '3*2Tlinux_Linux'#010+
   '3*2Tnetbsd_NetBSD'#010+
-  '3*2Tnetware_Novell Netware Module (clib)'#010+
-  '3*2Tnetwlibc_Novell Netware ','Module (libc)'#010+
+  '3*2Tnetware_Novell Netware Module',' (clib)'#010+
+  '3*2Tnetwlibc_Novell Netware Module (libc)'#010+
   '3*2Topenbsd_OpenBSD'#010+
   '3*2Tos2_OS/2 / eComStation'#010+
   '3*2Tsunos_SunOS/Solaris'#010+
@@ -890,60 +891,59 @@ const msgtxt : array[0..000162,1..240] of char=(
   '3*2Twdosx_WDOSX DOS extender'#010+
   '3*2Twin32_Windows 32 Bit'#010+
   '4*2Tlinux_Linux'#010+
-  '6*2Tamiga_Commodore Amiga'#010+
-  '6*2Tatari_Atari S','T/STe/TT'#010+
+  '6*2Tami','ga_Commodore Amiga'#010+
+  '6*2Tatari_Atari ST/STe/TT'#010+
   '6*2Tlinux_Linux-68k'#010+
   '6*2Tmacos_Macintosh m68k (not supported)'#010+
   '6*2Tpalmos_PalmOS'#010+
   'A*2Tlinux_Linux'#010+
   'P*2Tdarwin_Darwin and MacOS X on PowerPC'#010+
   'P*2Tlinux_Linux on PowerPC'#010+
-  'P*2Tmacos_MacOS (classic) on PowerPC'#010+
+  'P*2Tmacos_MacOS (classic) on Pow','erPC'#010+
   'P*2Tmorphos_MorphOS'#010+
-  'S*2Tlinux_L','inux'#010+
+  'S*2Tlinux_Linux'#010+
   '**1u<x>_undefines the symbol <x>'#010+
   '**1U_unit options:'#010+
   '**2Un_don'#039't check the unit name'#010+
   '**2Ur_generate release unit files'#010+
   '**2Us_compile a system unit'#010+
-  '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
-  '**2*_e : Show errors (','default)       0 : Show nothing (except errors'+
-  ')'#010+
+  '**1v<x>_Be verbose. <x> is a combination of the follo','wing letters:'#010+
+  '**2*_e : Show errors (default)       0 : Show nothing (except errors)'#010+
   '**2*_w : Show warnings               u : Show unit info'#010+
   '**2*_n : Show notes                  t : Show tried/used files'#010+
-  '**2*_h : Show hints                  c : Show conditionals'#010+
-  '**2*_i : Show ','general info           d : Show debug info'#010+
+  '**2*_h : Show hints                  ','c : Show conditionals'#010+
+  '**2*_i : Show general info           d : Show debug info'#010+
   '**2*_l : Show linenumbers            r : Rhide/GCC compatibility mode'#010+
   '**2*_a : Show everything             x : Executable info (Win32 only)'#010+
-  '**2*_b : Write file names messages with full path'#010+
-  '**2*_v ',': write fpcdebug.txt with     p : Write tree.log with parse t'+
-  'ree'#010+
+  '**2*_b : Write file n','ames messages with full path'#010+
+  '**2*_v : write fpcdebug.txt with     p : Write tree.log with parse tre'+
+  'e'#010+
   '**2*_    lots of debugging info'#010+
   '3*1W<x>_Win32-like target options'#010+
   '3*2WB_Create a relocatable image'#010+
-  '3*2WB<x>_Set Image base to Hexadecimal <x> value'#010+
-  '3*2WC_Specify console type ','application'#010+
+  '3*2WB<x>_Set Image base to Hexadecimal <','x> value'#010+
+  '3*2WC_Specify console type application'#010+
   '3*2WD_Use DEFFILE to export functions of DLL or EXE'#010+
   '3*2WF_Specify full-screen type application (OS/2 only)'#010+
   '3*2WG_Specify graphic type application'#010+
-  '3*2WN_Do not generate relocation code (necessary for debugging)'#010+
-  '3*2WR_Generate rel','ocation code'#010+
+  '3*2WN_Do not generate relocation code (necessa','ry for debugging)'#010+
+  '3*2WR_Generate relocation code'#010+
   'P*2WC_Specify console type application (MacOS only)'#010+
   'P*2WG_Specify graphic type application (MacOS only)'#010+
   'P*2WT_Specify tool type application (MPW tool, MacOS only)'#010+
   '**1X_executable options:'#010+
-  '**2Xc_pass --shared to the linker (Unix',' only)'#010+
+  '**2','Xc_pass --shared to the linker (Unix only)'#010+
   '**2Xd_don'#039't use standard library search path (needed for cross com'+
   'pile)'#010+
   '**2XD_try to link units dynamic          (defines FPC_LINK_DYNAMIC)'#010+
   '**2Xm_generate link map'#010+
-  '**2XM<x>_set the name of the '#039'main'#039' program routine (default i'+
-  's '#039'main',#039')'#010+
+  '**2XM<x>_set the name of the '#039'mai','n'#039' program routine (default'+
+  ' is '#039'main'#039')'#010+
   '**2XP<x>_prepend the binutils names with the prefix <x>'#010+
   '**2Xr<x>_set library search path to <x> (needed for cross compile)'#010+
   '**2Xs_strip all symbols from executable'#010+
-  '**2XS_try to link units static (default) (defines FPC_LINK_STATIC)'#010+
-  '**2Xt_l','ink with static libraries (-static is passed to linker)'#010+
+  '**2XS_try to link units static (defaul','t) (defines FPC_LINK_STATIC)'#010+
+  '**2Xt_link with static libraries (-static is passed to linker)'#010+
   '**2XX_try to link units smart            (defines FPC_LINK_SMART)'#010+
   '**1*_'#010+
   '**1?_shows this help'#010+

+ 10 - 10
compiler/systems/i_linux.pas

@@ -89,11 +89,11 @@ unit i_linux;
                 constalignmin   : 0;
                 constalignmax   : 8;
                 varalignmin     : 0;
-                varalignmax     : 8;
+                varalignmax     : 16;
                 localalignmin   : 4;
-                localalignmax   : 4;
+                localalignmax   : 8;
                 recordalignmin  : 0;
-                recordalignmax  : 4;
+                recordalignmax  : 16;
                 maxCrecordalign : 4
               );
             first_parm_offset : 8;
@@ -149,13 +149,13 @@ unit i_linux;
                 loopalign       : 4;
                 jumpalign       : 0;
                 constalignmin   : 0;
-                constalignmax   : 8;
+                constalignmax   : 16;
                 varalignmin     : 0;
-                varalignmax     : 8;
+                varalignmax     : 16;
                 localalignmin   : 4;
-                localalignmax   : 4;
+                localalignmax   : 8;
                 recordalignmin  : 0;
-                recordalignmax  : 4;
+                recordalignmax  : 16;
                 maxCrecordalign : 4
               );
             first_parm_offset : 8;
@@ -400,11 +400,11 @@ unit i_linux;
                 constalignmin   : 0;
                 constalignmax   : 8;
                 varalignmin     : 0;
-                varalignmax     : 8;
+                varalignmax     : 16;
                 localalignmin   : 4;
-                localalignmax   : 8;
+                localalignmax   : 16;
                 recordalignmin  : 0;
-                recordalignmax  : 8;
+                recordalignmax  : 16;
                 maxCrecordalign : 8
               );
             first_parm_offset : 16;

+ 4 - 4
compiler/systems/i_win32.pas

@@ -81,13 +81,13 @@ unit i_win32;
                 loopalign       : 4;
                 jumpalign       : 0;
                 constalignmin   : 0;
-                constalignmax   : 4;
+                constalignmax   : 16;
                 varalignmin     : 0;
-                varalignmax     : 4;
+                varalignmax     : 16;
                 localalignmin   : 4;
-                localalignmax   : 4;
+                localalignmax   : 8;
                 recordalignmin  : 0;
-                recordalignmax  : 4;
+                recordalignmax  : 16;
                 maxCrecordalign : 16
               );
             first_parm_offset : 8;

+ 3 - 2
tests/test/testsse2.pp

@@ -1,12 +1,13 @@
+{ %OPT=-OaVARMAX=16 -OaVARMIN=16 }
 { %CPU=i386 }
-{ %version=1.1}
 uses
    mmx;
 
 { only a small test to see if it works in principal }
 
 var
-   q : array[0..15] of byte;
+  b : byte;
+  q : array[0..15] of byte;
 
 begin
   if is_sse2_cpu then