mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 14:08:09 +02:00
m68k: needs_unaligned helper. returns true when the given reference with the given size needs to be loaded with unaligned support on the given cpu
git-svn-id: trunk@33806 -
This commit is contained in:
parent
391a79aebf
commit
b6d845e732
@ -364,6 +364,7 @@ unit cpubase;
|
||||
function isintregister(reg : tregister) : boolean;
|
||||
function fpuregopsize: TOpSize; {$ifdef USEINLINE}inline;{$endif USEINLINE}
|
||||
function fpuregsize: aint; {$ifdef USEINLINE}inline;{$endif USEINLINE}
|
||||
function needs_unaligned(const refalignment: aint; const size: tcgsize): boolean;
|
||||
function isregoverlap(reg1: tregister; reg2: tregister): boolean;
|
||||
|
||||
function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
|
||||
@ -553,6 +554,13 @@ implementation
|
||||
result:=fpu_regsize[current_settings.fputype = fpu_coldfire];
|
||||
end;
|
||||
|
||||
function needs_unaligned(const refalignment: aint; const size: tcgsize): boolean;
|
||||
begin
|
||||
result:=not(CPUM68K_HAS_UNALIGNED in cpu_capabilities[current_settings.cputype]) and
|
||||
(refalignment = 1) and
|
||||
(tcgsize2size[size] > 1);
|
||||
end;
|
||||
|
||||
// the function returns true, if the registers overlap (subreg of the same superregister and same type)
|
||||
function isregoverlap(reg1: tregister; reg2: tregister): boolean;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user