mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 23:20:49 +01:00
* use smaller alignment when generating thumb code
git-svn-id: trunk@49505 -
This commit is contained in:
parent
c193551980
commit
2c418b988c
@ -4954,9 +4954,21 @@ begin
|
|||||||
|
|
||||||
{ Default alignment settings,
|
{ Default alignment settings,
|
||||||
1. load the defaults for the target
|
1. load the defaults for the target
|
||||||
2. override with generic optimizer setting (little size)
|
2. adapt defaults specifically for the target
|
||||||
3. override with the user specified -Oa }
|
3. override with generic optimizer setting (little size)
|
||||||
|
4. override with the user specified -Oa }
|
||||||
UpdateAlignment(init_settings.alignment,target_info.alignment);
|
UpdateAlignment(init_settings.alignment,target_info.alignment);
|
||||||
|
|
||||||
|
{$ifdef arm}
|
||||||
|
if (init_settings.instructionset=is_thumb) and not(CPUARM_HAS_THUMB2 in cpu_capabilities[init_settings.cputype]) then
|
||||||
|
begin
|
||||||
|
init_settings.alignment.procalign:=2;
|
||||||
|
init_settings.alignment.jumpalign:=2;
|
||||||
|
init_settings.alignment.coalescealign:=2;
|
||||||
|
init_settings.alignment.loopalign:=2;
|
||||||
|
end;
|
||||||
|
{$endif arm}
|
||||||
|
|
||||||
if (cs_opt_size in init_settings.optimizerswitches) then
|
if (cs_opt_size in init_settings.optimizerswitches) then
|
||||||
begin
|
begin
|
||||||
init_settings.alignment.procalign:=1;
|
init_settings.alignment.procalign:=1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user