mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:06:18 +02:00
m68k: some ideas for a future second_abs_long implementation. no functional changes.
git-svn-id: trunk@29806 -
This commit is contained in:
parent
c72f58bcc5
commit
d85b49755c
@ -184,6 +184,29 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ ideas for second_abs_long (KB) }
|
||||||
|
|
||||||
|
{ This is probably faster on 68000 than the generic implementation,
|
||||||
|
because shifting is slow on the original 68000, maybe also on the 68020?
|
||||||
|
Also needs to be tested on 040/060. This can also work on a CF.
|
||||||
|
input - d0, output - d2
|
||||||
|
move.l d0,d2
|
||||||
|
btst #31,d2
|
||||||
|
sne d1
|
||||||
|
extb.l d1 (or ext.w + ext.l on 68000)
|
||||||
|
eor.l d1,d2
|
||||||
|
sub.l d1,d2
|
||||||
|
}
|
||||||
|
|
||||||
|
{ Solution using bitfield extraction, we don't support the necessary asm
|
||||||
|
construct for this yet, probably this is the fastest on 020, slower on
|
||||||
|
040/060 than the one above, doesn't work on '000 or CF.
|
||||||
|
input - d0, output - d2
|
||||||
|
move.l d0,d2
|
||||||
|
bfexts d0[0:1],d1
|
||||||
|
eor.l d1,d2
|
||||||
|
sub.l d1,d2
|
||||||
|
}
|
||||||
begin
|
begin
|
||||||
cinlinenode:=t68kinlinenode;
|
cinlinenode:=t68kinlinenode;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user