mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:09:23 +02:00
+ common assembler optimizer base class for arm and aarch64
git-svn-id: trunk@44720 -
This commit is contained in:
parent
3022927a6f
commit
2276caae24
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -106,6 +106,7 @@ compiler/arm/rarmstd.inc svneol=native#text/plain
|
||||
compiler/arm/rarmsup.inc svneol=native#text/plain
|
||||
compiler/arm/rgcpu.pas svneol=native#text/plain
|
||||
compiler/arm/symcpu.pas svneol=native#text/plain
|
||||
compiler/armgen/aoptarm.pas svneol=native#text/pascal
|
||||
compiler/armgen/armpara.pas svneol=native#text/plain
|
||||
compiler/assemble.pas svneol=native#text/plain
|
||||
compiler/avr/aasmcpu.pas svneol=native#text/plain
|
||||
|
@ -32,10 +32,11 @@ Interface
|
||||
uses
|
||||
globtype, globals,
|
||||
cutils,
|
||||
cgbase, cpubase, aasmtai, aasmcpu, aopt, aoptcpub;
|
||||
cgbase, cpubase, aasmtai, aasmcpu,
|
||||
aopt, aoptcpub, aoptarm;
|
||||
|
||||
Type
|
||||
TCpuAsmOptimizer = class(TAsmOptimizer)
|
||||
TCpuAsmOptimizer = class(TARMAsmOptimizer)
|
||||
{ uses the same constructor as TAopObj }
|
||||
function PeepHoleOptPass1Cpu(var p: tai): boolean; override;
|
||||
function PostPeepHoleOptsCpu(var p: tai): boolean; override;
|
||||
|
@ -30,10 +30,13 @@ Unit aoptcpu;
|
||||
|
||||
Interface
|
||||
|
||||
uses cgbase, cgutils, cpubase, aasmtai, aasmcpu,aopt, aoptobj;
|
||||
uses
|
||||
cgbase, cgutils, cpubase, aasmtai,
|
||||
aasmcpu,
|
||||
aopt, aoptobj, aoptarm;
|
||||
|
||||
Type
|
||||
TCpuAsmOptimizer = class(TAsmOptimizer)
|
||||
TCpuAsmOptimizer = class(TARMAsmOptimizer)
|
||||
{ Can't be done in some cases due to the limited range of jumps }
|
||||
function CanDoJumpOpts: Boolean; override;
|
||||
|
||||
|
52
compiler/armgen/aoptarm.pas
Normal file
52
compiler/armgen/aoptarm.pas
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
Copyright (c) 1998-2020 by Jonas Maebe and Florian Klaempfl, members of the Free Pascal
|
||||
Development Team
|
||||
|
||||
This unit implements an ARM optimizer object used commonly for ARM and AAarch64
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
****************************************************************************
|
||||
}
|
||||
|
||||
Unit aoptarm;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
{ $define DEBUG_PREREGSCHEDULER}
|
||||
{ $define DEBUG_AOPTCPU}
|
||||
|
||||
Interface
|
||||
|
||||
uses
|
||||
cgbase, cgutils, cpubase, aasmtai, aasmcpu,aopt, aoptobj;
|
||||
|
||||
Type
|
||||
{ while ARM and AAarch64 look not very similar at a first glance,
|
||||
several optimizations can be shared between both }
|
||||
TARMAsmOptimizer = class(TAsmOptimizer)
|
||||
End;
|
||||
|
||||
Implementation
|
||||
|
||||
uses
|
||||
cutils,verbose,globtype,globals,
|
||||
systems,
|
||||
cpuinfo,
|
||||
cgobj,procinfo,
|
||||
aasmbase,aasmdata;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user