mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 20:19:25 +02:00
- 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:
parent
a64c5a7b23
commit
0eec337a00
@ -61,9 +61,7 @@ unit cgutils;
|
||||
{ (An)+ and -(An) }
|
||||
direction : tdirection;
|
||||
{$endif m68k}
|
||||
{$ifdef SUPPORT_UNALIGNED}
|
||||
alignment : byte;
|
||||
{$endif SUPPORT_UNALIGNED}
|
||||
end;
|
||||
|
||||
tsubsetregister = record
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 }
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user