|
@@ -14,6 +14,8 @@
|
|
|
|
|
|
**********************************************************************}
|
|
|
|
|
|
+{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
|
+
|
|
|
{$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;
|
|
|
{
|
|
@@ -53,7 +55,6 @@ asm
|
|
|
stw r0,24(r3)
|
|
|
stw r0,28(r3)
|
|
|
|
|
|
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
|
// r0 := 1 shl r4[27-31] -> bit index in dword (rotate instructions
|
|
|
// with count in register only consider lower 5 bits of this register)
|
|
|
li r0,1
|
|
@@ -65,15 +66,6 @@ asm
|
|
|
rlwinm r4,r4,31-3+1,3,31-2
|
|
|
// store the result
|
|
|
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;
|
|
|
|
|
|
|
|
@@ -95,7 +87,6 @@ asm
|
|
|
stfd f2,16(r3)
|
|
|
stfd f3,24(r3)
|
|
|
|
|
|
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
|
// get the index of the correct *dword* in the set
|
|
|
// r0 := (r5 rotl(32-3)) and (0x0fffffff8)
|
|
|
rlwinm r0,r5,31-3+1,3,31-2
|
|
@@ -109,17 +100,6 @@ asm
|
|
|
or r5,r4,r5
|
|
|
// store result
|
|
|
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;
|
|
|
|
|
|
|
|
@@ -141,7 +121,6 @@ asm
|
|
|
stfd f1,8(r3)
|
|
|
stfd f2,16(r3)
|
|
|
stfd f3,24(r3)
|
|
|
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
|
// get the index of the correct *dword* in the set
|
|
|
// r0 := (r4 rotl(32-3)) and (0x0fffffff8)
|
|
|
rlwinm r0,r5,31-3+1,3,31-2
|
|
@@ -154,22 +133,9 @@ asm
|
|
|
andc r5,r4,r5
|
|
|
// store result
|
|
|
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;
|
|
|
|
|
|
|
|
|
-{$ifndef FPC_NEW_BIGENDIAN_SETS}
|
|
|
-
|
|
|
{$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;
|
|
|
{
|
|
@@ -231,7 +197,6 @@ asm
|
|
|
stw r5,0(r3) // store to set
|
|
|
.Lset_range_exit:
|
|
|
end;
|
|
|
-{$endif}
|
|
|
|
|
|
|
|
|
{$define FPC_SYSTEM_HAS_FPC_SET_ADD_SETS}
|
|
@@ -367,3 +332,5 @@ asm
|
|
|
cntlzw r3,r0
|
|
|
srwi. r3,r3,5
|
|
|
end;
|
|
|
+
|
|
|
+{$endif ndef FPC_NEW_BIGENDIAN_SETS}
|