ソースを参照

- removed SUPPORT_UNALIGNED, FPC_SUPPORTS_UNALIGNED and FPC_UNALIGNED_FIXED
defines and ifdefs (already all defined by 2.2.4)

git-svn-id: trunk@13581 -

Jonas Maebe 16 年 前
コミット
0eec337a00

+ 0 - 2
compiler/cgutils.pas

@@ -61,9 +61,7 @@ unit cgutils;
          { (An)+ and -(An)                      }
          direction : tdirection;
 {$endif m68k}
-{$ifdef SUPPORT_UNALIGNED}
          alignment : byte;
-{$endif SUPPORT_UNALIGNED}
       end;
 
       tsubsetregister = record

+ 0 - 2
compiler/fpcdefs.inc

@@ -124,8 +124,6 @@
 {$DEFINE USE_FAKE_SYSUTILS}
 {$ENDIF MACOS}
 
-{$define SUPPORT_UNALIGNED}
-
 {$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)}
 {$error Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time }
 {$endif}

+ 2 - 5
compiler/htypechk.pas

@@ -1332,11 +1332,8 @@ implementation
              inlinen :
                begin
                  if ((valid_const in opts) and
-                    (tinlinenode(hp).inlinenumber in [in_typeof_x]))
-{$ifdef SUPPORT_UNALIGNED}
-                    or (tinlinenode(hp).inlinenumber in [in_unaligned_x])
-{$endif SUPPORT_UNALIGNED}
-                    then
+                     (tinlinenode(hp).inlinenumber in [in_typeof_x])) or
+                    (tinlinenode(hp).inlinenumber in [in_unaligned_x]) then
                    result:=true
                  else
                    if report_errors then

+ 0 - 2
compiler/ncginl.pas

@@ -135,7 +135,6 @@ implementation
               second_get_caller_frame;
             in_get_caller_addr:
               second_get_caller_addr;
-{$ifdef SUPPORT_UNALIGNED}
             in_unaligned_x:
               begin
                 secondpass(tcallparanode(left).left);
@@ -143,7 +142,6 @@ implementation
                 if location.loc in [LOC_CREFERENCE,LOC_REFERENCE] then
                   location.reference.alignment:=1;
               end;
-{$endif SUPPORT_UNALIGNED}
 {$ifdef SUPPORT_MMX}
             in_mmx_pcmpeqb..in_mmx_pcmpgtw:
               begin

+ 0 - 4
compiler/ninl.pas

@@ -2401,12 +2401,10 @@ implementation
                 begin
                 end;
 {$endif SUPPORT_MMX}
-{$ifdef SUPPORT_UNALIGNED}
               in_unaligned_x:
                 begin
                   resultdef:=left.resultdef;
                 end;
-{$endif SUPPORT_UNALIGNED}
               in_assert_x_y :
                 begin
                   resultdef:=voidtype;
@@ -2797,12 +2795,10 @@ implementation
            begin
              expectloc:=LOC_VOID;
            end;
-{$ifdef SUPPORT_UNALIGNED}
          in_unaligned_x:
            begin
              expectloc:=tcallparanode(left).left.expectloc;
            end;
-{$endif SUPPORT_UNALIGNED}
          in_rol_x,
          in_rol_x_x,
          in_ror_x,

+ 0 - 2
compiler/nutils.pas

@@ -747,9 +747,7 @@ implementation
                     in_sqr_real,
                     in_sqrt_real,
                     in_ln_real,
-          {$ifdef SUPPORT_UNALIGNED}
                     in_unaligned_x,
-          {$endif SUPPORT_UNALIGNED}
                     in_prefetch_var:
                       begin
                         inc(result);

+ 0 - 4
compiler/options.pas

@@ -2379,10 +2379,6 @@ begin
   def_system_macro('FPC_HAS_INTERNAL_ROX');
 {$endif}
 
-{$ifdef SUPPORT_UNALIGNED}
-  def_system_macro('FPC_SUPPORTS_UNALIGNED');
-  def_system_macro('FPC_UNALIGNED_FIXED');
-{$endif SUPPORT_UNALIGNED}
 {$ifdef powerpc64}
   def_system_macro('FPC_HAS_LWSYNC');
 {$endif}

+ 0 - 2
compiler/pexpr.pas

@@ -454,7 +454,6 @@ implementation
               statement_syssym:=p2;
             end;
 
-{$ifdef SUPPORT_UNALIGNED}
           in_unaligned_x :
             begin
               err:=false;
@@ -466,7 +465,6 @@ implementation
               consume(_RKLAMMER);
               statement_syssym:=p2;
             end;
-{$endif SUPPORT_UNALIGNED}
 
           in_assigned_x :
             begin

+ 0 - 10
compiler/ppu.pas

@@ -601,14 +601,12 @@ begin
      result:=0;
      exit;
    end;
-{$ifdef FPC_UNALIGNED_FIXED}
   if bufsize-bufidx>=sizeof(word) then
     begin
       result:=Unaligned(pword(@buf[bufidx])^);
       inc(bufidx,sizeof(word));
     end
   else
-{$endif FPC_UNALIGNED_FIXED}
     readdata(result,sizeof(word));
   if change_endian then
    result:=swapendian(result);
@@ -624,14 +622,12 @@ begin
      result:=0;
      exit;
    end;
-{$ifdef FPC_UNALIGNED_FIXED}
   if bufsize-bufidx>=sizeof(longint) then
     begin
       result:=Unaligned(plongint(@buf[bufidx])^);
       inc(bufidx,sizeof(longint));
     end
   else
-{$endif FPC_UNALIGNED_FIXED}
     readdata(result,sizeof(longint));
   if change_endian then
    result:=swapendian(result);
@@ -647,14 +643,12 @@ begin
      result:=0;
      exit;
    end;
-{$ifdef FPC_UNALIGNED_FIXED}
   if bufsize-bufidx>=sizeof(dword) then
     begin
       result:=Unaligned(plongint(@buf[bufidx])^);
       inc(bufidx,sizeof(longint));
     end
   else
-{$endif FPC_UNALIGNED_FIXED}
     readdata(result,sizeof(dword));
   if change_endian then
    result:=swapendian(result);
@@ -670,14 +664,12 @@ begin
      result:=0;
      exit;
    end;
-{$ifdef FPC_UNALIGNED_FIXED}
   if bufsize-bufidx>=sizeof(int64) then
     begin
       result:=Unaligned(pint64(@buf[bufidx])^);
       inc(bufidx,sizeof(int64));
     end
   else
-{$endif FPC_UNALIGNED_FIXED}
     readdata(result,sizeof(int64));
   if change_endian then
    result:=swapendian(result);
@@ -693,14 +685,12 @@ begin
      result:=0;
      exit;
    end;
-{$ifdef FPC_UNALIGNED_FIXED}
   if bufsize-bufidx>=sizeof(qword) then
     begin
       result:=Unaligned(pqword(@buf[bufidx])^);
       inc(bufidx,sizeof(qword));
     end
   else
-{$endif FPC_UNALIGNED_FIXED}
     readdata(result,sizeof(qword));
   if change_endian then
    result:=swapendian(result);

+ 0 - 2
compiler/psystem.pas

@@ -99,9 +99,7 @@ implementation
 {$if defined(x86) or defined(arm)}
         systemunit.insert(tsyssym.create('Get_Frame',in_get_frame));
 {$endif defined(x86) or defined(arm)}
-{$ifdef SUPPORT_UNALIGNED}
         systemunit.insert(tsyssym.create('Unaligned',in_unaligned_x));
-{$endif SUPPORT_UNALIGNED}
         systemunit.insert(tsyssym.create('ObjCSelector',in_objc_selector_x)); { objc only }
       end;
 

+ 0 - 8
rtl/inc/heaptrc.pp

@@ -459,11 +459,7 @@ begin
   if add_tail then
     begin
       pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptruint);
-{$ifdef FPC_SUPPORTS_UNALIGNED}
       unaligned(pl^):=$DEADBEEF;
-{$else FPC_SUPPORTS_UNALIGNED}
-      pl^:=$DEADBEEF;
-{$endif FPC_SUPPORTS_UNALIGNED}
     end;
   { clear the memory }
   fillchar(p^,size,#255);
@@ -840,11 +836,7 @@ begin
   if add_tail then
     begin
       pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptruint);
-{$ifdef FPC_SUPPORTS_UNALIGNED}
       unaligned(pl^):=$DEADBEEF;
-{$else FPC_SUPPORTS_UNALIGNED}
-      pl^:=$DEADBEEF;
-{$endif FPC_SUPPORTS_UNALIGNED}
     end;
   { adjust like a freemem and then a getmem, so you get correct
     results in the summary display }

+ 1 - 1
rtl/objpas/classes/reader.inc

@@ -150,7 +150,7 @@ var
 begin
   { Read filer signature }
   Read(Signature, 4);
-  if Signature <> LongInt({$ifdef FPC_SUPPORTS_UNALIGNED}unaligned{$endif}(FilerSignature)) then
+  if Signature <> LongInt(unaligned(FilerSignature)) then
     raise EReadError.Create(SInvalidImage);
 end;