mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-14 16:06:14 +02:00
- removed/disabled all normalset code (except for bootstrapping), since
it's no longer needed git-svn-id: trunk@7403 -
This commit is contained in:
parent
7d44ca0113
commit
5cf2511283
@ -230,9 +230,6 @@ interface
|
|||||||
{# returns true, if the type passed is a varset }
|
{# returns true, if the type passed is a varset }
|
||||||
function is_varset(p : tdef) : boolean;
|
function is_varset(p : tdef) : boolean;
|
||||||
|
|
||||||
{# returns true if the type passed is a normalset }
|
|
||||||
function is_normalset(p : tdef) : boolean;
|
|
||||||
|
|
||||||
{ # returns true if the procdef has no parameters and no specified return type }
|
{ # returns true if the procdef has no parameters and no specified return type }
|
||||||
function is_bareprocdef(pd : tprocdef): boolean;
|
function is_bareprocdef(pd : tprocdef): boolean;
|
||||||
|
|
||||||
@ -1028,12 +1025,6 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function is_normalset(p : tdef) : boolean;
|
|
||||||
begin
|
|
||||||
result:=false;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function is_bareprocdef(pd : tprocdef): boolean;
|
function is_bareprocdef(pd : tprocdef): boolean;
|
||||||
begin
|
begin
|
||||||
result:=(pd.maxparacount=0) and
|
result:=(pd.maxparacount=0) and
|
||||||
|
@ -1159,7 +1159,7 @@ implementation
|
|||||||
is to convert right to a set }
|
is to convert right to a set }
|
||||||
if not(equal_defs(ld,rd)) then
|
if not(equal_defs(ld,rd)) then
|
||||||
begin
|
begin
|
||||||
if is_varset(rd) or is_normalset(rd) then
|
if is_varset(rd) then
|
||||||
inserttypeconv(left,right.resultdef)
|
inserttypeconv(left,right.resultdef)
|
||||||
else
|
else
|
||||||
inserttypeconv(right,left.resultdef);
|
inserttypeconv(right,left.resultdef);
|
||||||
@ -1821,9 +1821,7 @@ implementation
|
|||||||
newstatement : tstatementnode;
|
newstatement : tstatementnode;
|
||||||
temp : ttempcreatenode;
|
temp : ttempcreatenode;
|
||||||
begin
|
begin
|
||||||
if (is_varset(left.resultdef) or is_varset(right.resultdef)) and
|
if (is_varset(left.resultdef) or is_varset(right.resultdef)) then
|
||||||
not(is_normalset(left.resultdef)) and
|
|
||||||
not(is_normalset(right.resultdef)) then
|
|
||||||
begin
|
begin
|
||||||
case nodetype of
|
case nodetype of
|
||||||
equaln,unequaln,lten,gten:
|
equaln,unequaln,lten,gten:
|
||||||
@ -2473,7 +2471,7 @@ implementation
|
|||||||
else array constructor can be seen as array of char (PFV) }
|
else array constructor can be seen as array of char (PFV) }
|
||||||
else if (ld.typ=setdef) then
|
else if (ld.typ=setdef) then
|
||||||
begin
|
begin
|
||||||
if not(is_varset(ld)) and not(is_normalset(ld)) then
|
if not(is_varset(ld)) then
|
||||||
begin
|
begin
|
||||||
if nodetype in [ltn,lten,gtn,gten,equaln,unequaln] then
|
if nodetype in [ltn,lten,gtn,gten,equaln,unequaln] then
|
||||||
expectloc:=LOC_FLAGS
|
expectloc:=LOC_FLAGS
|
||||||
|
@ -233,9 +233,7 @@ interface
|
|||||||
begin
|
begin
|
||||||
{ when a setdef is passed, it has to be a smallset }
|
{ when a setdef is passed, it has to be a smallset }
|
||||||
if is_varset(left.resultdef) or
|
if is_varset(left.resultdef) or
|
||||||
is_normalset(left.resultdef) or
|
is_varset(right.resultdef) then
|
||||||
is_varset(right.resultdef) or
|
|
||||||
is_normalset(right.resultdef) then
|
|
||||||
internalerror(200203302);
|
internalerror(200203302);
|
||||||
|
|
||||||
if nodetype in [equaln,unequaln,gtn,gten,lten,ltn] then
|
if nodetype in [equaln,unequaln,gtn,gten,lten,ltn] then
|
||||||
@ -786,8 +784,7 @@ interface
|
|||||||
begin
|
begin
|
||||||
{Normalsets are already handled in pass1 if mmx
|
{Normalsets are already handled in pass1 if mmx
|
||||||
should not be used.}
|
should not be used.}
|
||||||
if is_varset(tsetdef(left.resultdef)) or
|
if is_varset(tsetdef(left.resultdef)) then
|
||||||
is_normalset(tsetdef(left.resultdef)) then
|
|
||||||
begin
|
begin
|
||||||
{$ifdef SUPPORT_MMX}
|
{$ifdef SUPPORT_MMX}
|
||||||
{$ifdef i386}
|
{$ifdef i386}
|
||||||
|
@ -516,7 +516,7 @@ implementation
|
|||||||
Psetbytes=^setbytes;
|
Psetbytes=^setbytes;
|
||||||
begin
|
begin
|
||||||
{ small sets are loaded as constants }
|
{ small sets are loaded as constants }
|
||||||
if not(is_varset(resultdef)) and not(is_normalset(resultdef)) then
|
if not(is_varset(resultdef)) then
|
||||||
begin
|
begin
|
||||||
location_reset(location,LOC_CONSTANT,int_cgsize(resultdef.size));
|
location_reset(location,LOC_CONSTANT,int_cgsize(resultdef.size));
|
||||||
if (source_info.endian=target_info.endian) then
|
if (source_info.endian=target_info.endian) then
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
|
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
||||||
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
||||||
@ -542,3 +543,4 @@ end;
|
|||||||
|
|
||||||
{$endif LARGESET}
|
{$endif LARGESET}
|
||||||
|
|
||||||
|
{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
@ -412,6 +412,8 @@ Procedure fpc_DecRef (Data,TypeInfo : Pointer); compilerproc;
|
|||||||
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
|
procedure fpc_finalize_array(data,typeinfo : pointer;count,size : longint); compilerproc;
|
||||||
{$endif FPC_HAS_FEATURE_RTTI}
|
{$endif FPC_HAS_FEATURE_RTTI}
|
||||||
|
|
||||||
|
|
||||||
|
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set; compilerproc;
|
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set; compilerproc;
|
||||||
function fpc_set_create_element(b : byte): fpc_normal_set; compilerproc;
|
function fpc_set_create_element(b : byte): fpc_normal_set; compilerproc;
|
||||||
function fpc_set_set_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
|
function fpc_set_set_byte(const source: fpc_normal_set; b : byte): fpc_normal_set; compilerproc;
|
||||||
@ -423,6 +425,7 @@ function fpc_set_sub_sets(const set1,set2: fpc_normal_set): fpc_normal_set; comp
|
|||||||
function fpc_set_symdif_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
|
function fpc_set_symdif_sets(const set1,set2: fpc_normal_set): fpc_normal_set; compilerproc;
|
||||||
function fpc_set_comp_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
|
function fpc_set_comp_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
|
||||||
function fpc_set_contains_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
|
function fpc_set_contains_sets(const set1,set2: fpc_normal_set): boolean; compilerproc;
|
||||||
|
{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
procedure fpc_varset_load(const l;sourcesize : longint;var dest;size : ptrint); compilerproc;
|
procedure fpc_varset_load(const l;sourcesize : longint;var dest;size : ptrint); compilerproc;
|
||||||
procedure fpc_varset_create_element(b,size : ptrint; var data); compilerproc;
|
procedure fpc_varset_create_element(b,size : ptrint; var data); compilerproc;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
|
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
{$ifndef FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
{$ifndef FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
||||||
{ Error No pascal version of FPC_SET_LOAD_SMALL}
|
{ Error No pascal version of FPC_SET_LOAD_SMALL}
|
||||||
{ THIS DEPENDS ON THE ENDIAN OF THE ARCHITECTURE!
|
{ THIS DEPENDS ON THE ENDIAN OF THE ARCHITECTURE!
|
||||||
@ -220,6 +222,7 @@ function fpc_set_unset_byte(const source: fpc_normal_set; b : byte): fpc_normal_
|
|||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Var sets
|
Var sets
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
|
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
||||||
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
||||||
{
|
{
|
||||||
@ -53,7 +55,6 @@ asm
|
|||||||
stw r0,24(r3)
|
stw r0,24(r3)
|
||||||
stw r0,28(r3)
|
stw r0,28(r3)
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
|
// r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
|
||||||
// with count in register only consider lower 5 bits of this register)
|
// with count in register only consider lower 5 bits of this register)
|
||||||
li r0,1
|
li r0,1
|
||||||
@ -65,15 +66,6 @@ asm
|
|||||||
rlwinm r4,r4,31-3+1,3,31-2
|
rlwinm r4,r4,31-3+1,3,31-2
|
||||||
// store the result
|
// store the result
|
||||||
stwx r0,r3,r4
|
stwx r0,r3,r4
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
rlwinm r5,r4,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
srwi r4,r4,3
|
|
||||||
// store the result
|
|
||||||
stbx r0,r3,r4
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -95,7 +87,6 @@ asm
|
|||||||
stfd f2,16(r3)
|
stfd f2,16(r3)
|
||||||
stfd f3,24(r3)
|
stfd f3,24(r3)
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// get the index of the correct *dword* in the set
|
// get the index of the correct *dword* in the set
|
||||||
// r0 := (r5 rotl(32-3)) and (0x0fffffff8)
|
// r0 := (r5 rotl(32-3)) and (0x0fffffff8)
|
||||||
rlwinm r0,r5,31-3+1,3,31-2
|
rlwinm r0,r5,31-3+1,3,31-2
|
||||||
@ -109,17 +100,6 @@ asm
|
|||||||
or r5,r4,r5
|
or r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r5,0(r3)
|
stw r5,0(r3)
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
srwi r6,r5,3
|
|
||||||
lbzx r7,r6,r3
|
|
||||||
rlwinm r5,r5,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
or r7,r7,r0
|
|
||||||
// store the result
|
|
||||||
stbx r7,r6,r3
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +121,6 @@ asm
|
|||||||
stfd f1,8(r3)
|
stfd f1,8(r3)
|
||||||
stfd f2,16(r3)
|
stfd f2,16(r3)
|
||||||
stfd f3,24(r3)
|
stfd f3,24(r3)
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// get the index of the correct *dword* in the set
|
// get the index of the correct *dword* in the set
|
||||||
// r0 := (r4 rotl(32-3)) and (0x0fffffff8)
|
// r0 := (r4 rotl(32-3)) and (0x0fffffff8)
|
||||||
rlwinm r0,r5,31-3+1,3,31-2
|
rlwinm r0,r5,31-3+1,3,31-2
|
||||||
@ -154,22 +133,9 @@ asm
|
|||||||
andc r5,r4,r5
|
andc r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r4,0(r3)
|
stw r4,0(r3)
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
srwi r6,r5,3
|
|
||||||
lbzx r7,r6,r3
|
|
||||||
rlwinm r5,r5,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
andc r7,r7,r0
|
|
||||||
// store the result
|
|
||||||
stbx r7,r6,r3
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
||||||
function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
|
function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
|
||||||
{
|
{
|
||||||
@ -231,7 +197,6 @@ asm
|
|||||||
stw r5,0(r3) // store to set
|
stw r5,0(r3) // store to set
|
||||||
.Lset_range_exit:
|
.Lset_range_exit:
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
|
||||||
@ -367,3 +332,5 @@ asm
|
|||||||
cntlzw r3,r0
|
cntlzw r3,r0
|
||||||
srwi. r3,r3,5
|
srwi. r3,r3,5
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
|
|
||||||
|
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
{$define FPC_SYSTEM_HAS_FPC_SET_LOAD_SMALL}
|
||||||
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
function fpc_set_load_small(l: fpc_small_set): fpc_normal_set;assembler;[public,alias:'FPC_SET_LOAD_SMALL']; compilerproc;
|
||||||
{
|
{
|
||||||
@ -50,7 +52,6 @@ asm
|
|||||||
stw r0,24(r3)
|
stw r0,24(r3)
|
||||||
stw r0,28(r3)
|
stw r0,28(r3)
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
|
// r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
|
||||||
// with count in register only consider lower 5 bits of this register)
|
// with count in register only consider lower 5 bits of this register)
|
||||||
li r0,1
|
li r0,1
|
||||||
@ -62,15 +63,6 @@ asm
|
|||||||
rlwinm r4,r4,31-3+1,3,31-2
|
rlwinm r4,r4,31-3+1,3,31-2
|
||||||
// store the result
|
// store the result
|
||||||
stwx r0,r3,r4
|
stwx r0,r3,r4
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
rlwinm r5,r4,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
srwi r4,r4,3
|
|
||||||
// store the result
|
|
||||||
stbx r0,r3,r4
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -92,7 +84,6 @@ asm
|
|||||||
stfd f2,16(r3)
|
stfd f2,16(r3)
|
||||||
stfd f3,24(r3)
|
stfd f3,24(r3)
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// get the index of the correct *dword* in the set
|
// get the index of the correct *dword* in the set
|
||||||
// r0 := (r5 rotl(32-3)) and (0x0fffffff8)
|
// r0 := (r5 rotl(32-3)) and (0x0fffffff8)
|
||||||
rlwinm r0,r5,31-3+1,3,31-2
|
rlwinm r0,r5,31-3+1,3,31-2
|
||||||
@ -106,17 +97,6 @@ asm
|
|||||||
or r5,r4,r5
|
or r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r5,0(r3)
|
stw r5,0(r3)
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
srwi r6,r5,3
|
|
||||||
lbzx r7,r6,r3
|
|
||||||
rlwinm r5,r5,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
or r7,r7,r0
|
|
||||||
// store the result
|
|
||||||
stbx r7,r6,r3
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -138,7 +118,6 @@ asm
|
|||||||
stfd f1,8(r3)
|
stfd f1,8(r3)
|
||||||
stfd f2,16(r3)
|
stfd f2,16(r3)
|
||||||
stfd f3,24(r3)
|
stfd f3,24(r3)
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
// get the index of the correct *dword* in the set
|
// get the index of the correct *dword* in the set
|
||||||
// r0 := (r4 rotl(32-3)) and (0x0fffffff8)
|
// r0 := (r4 rotl(32-3)) and (0x0fffffff8)
|
||||||
rlwinm r0,r5,31-3+1,3,31-2
|
rlwinm r0,r5,31-3+1,3,31-2
|
||||||
@ -151,20 +130,8 @@ asm
|
|||||||
andc r5,r4,r5
|
andc r5,r4,r5
|
||||||
// store result
|
// store result
|
||||||
stw r4,0(r3)
|
stw r4,0(r3)
|
||||||
{$else}
|
|
||||||
{ must be done byte- instead of dword-based }
|
|
||||||
srwi r6,r5,3
|
|
||||||
lbzx r7,r6,r3
|
|
||||||
rlwinm r5,r5,0,31-3+1,31
|
|
||||||
li r0,0x80
|
|
||||||
srw r0,r0,r5
|
|
||||||
andc r7,r7,r0
|
|
||||||
// store the result
|
|
||||||
stbx r7,r6,r3
|
|
||||||
{$endif}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
{$define FPC_SYSTEM_HAS_FPC_SET_SET_RANGE}
|
||||||
function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
|
function fpc_set_set_range(const orgset: fpc_normal_set; l,h : byte): fpc_normal_set;assembler; compilerproc;
|
||||||
@ -227,7 +194,6 @@ asm
|
|||||||
stw r5,0(r3) // store to set
|
stw r5,0(r3) // store to set
|
||||||
.Lset_range_exit:
|
.Lset_range_exit:
|
||||||
end;
|
end;
|
||||||
{$endif}
|
|
||||||
|
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
|
{$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
|
||||||
@ -364,6 +330,6 @@ asm
|
|||||||
srwi. r3,r3,5
|
srwi. r3,r3,5
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user