mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 06:32:03 +02:00
+ introduce tai_align_abstract.create_max which limits the maximal number of bytes being inserted for alignment
git-svn-id: trunk@40158 -
This commit is contained in:
parent
cdce68451a
commit
64e8557180
@ -852,11 +852,13 @@ interface
|
||||
{ alignment for operator }
|
||||
tai_align_abstract = class(tai)
|
||||
aligntype : byte; { 1 = no align, 2 = word align, 4 = dword align }
|
||||
maxbytes : byte; { if needed bytes would be larger than maxbyes, alignment is ignored }
|
||||
fillsize : byte; { real size to fill }
|
||||
fillop : byte; { value to fill with - optional }
|
||||
use_op : boolean;
|
||||
constructor Create(b:byte);virtual;
|
||||
constructor Create_op(b: byte; _op: byte);virtual;
|
||||
constructor create_max(b: byte; max: byte);virtual;
|
||||
constructor Create_zeros(b:byte);
|
||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
@ -3110,6 +3112,21 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_align_abstract.create_max(b : byte; max : byte);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_align;
|
||||
if b in [1,2,4,8,16,32] then
|
||||
aligntype := b
|
||||
else
|
||||
aligntype := 1;
|
||||
maxbytes:=max;
|
||||
fillsize:=0;
|
||||
fillop:=0;
|
||||
use_op:=false;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_align_abstract.Create_zeros(b: byte);
|
||||
begin
|
||||
inherited Create;
|
||||
|
Loading…
Reference in New Issue
Block a user