- 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 -
This commit is contained in:
Jonas Maebe 2009-08-23 07:51:26 +00:00
parent a64c5a7b23
commit 0eec337a00
12 changed files with 3 additions and 44 deletions

View File

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

View File

@ -124,8 +124,6 @@
{$DEFINE USE_FAKE_SYSUTILS} {$DEFINE USE_FAKE_SYSUTILS}
{$ENDIF MACOS} {$ENDIF MACOS}
{$define SUPPORT_UNALIGNED}
{$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)} {$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 } {$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} {$endif}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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