mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 18:08:15 +02:00
+ support for .dc.a directive
* read multiple section flags git-svn-id: trunk@48903 -
This commit is contained in:
parent
5149e58525
commit
4be5f07f27
@ -53,7 +53,7 @@ unit raatt;
|
||||
AS_DB,AS_DW,AS_DD,AS_DQ,AS_GLOBAL,
|
||||
AS_ALIGN,AS_BALIGN,AS_P2ALIGN,AS_ASCII,
|
||||
AS_ASCIIZ,AS_LCOMM,AS_COMM,AS_SINGLE,AS_DOUBLE,AS_EXTENDED,AS_CEXTENDED,
|
||||
AS_DATA,AS_TEXT,AS_INIT,AS_FINI,AS_RVA,
|
||||
AS_DATA,AS_TEXT,AS_INIT,AS_FINI,AS_RVA,AS_DC_A,
|
||||
AS_SET,AS_WEAK,AS_SECTION,AS_END,
|
||||
{------------------ Assembler Operators --------------------}
|
||||
AS_TYPE,AS_SIZEOF,AS_VMTOFFSET,AS_MOD,AS_SHL,AS_SHR,AS_NOT,AS_AND,AS_OR,AS_XOR,AS_NOR,AS_AT,
|
||||
@ -80,7 +80,7 @@ unit raatt;
|
||||
'.byte','.word','.long','.quad','.globl',
|
||||
'.align','.balign','.p2align','.ascii',
|
||||
'.asciz','.lcomm','.comm','.single','.double','.tfloat','.tcfloat',
|
||||
'.data','.text','.init','.fini','.rva',
|
||||
'.data','.text','.init','.fini','.rva','.dc.a',
|
||||
'.set','.weak','.section','END',
|
||||
'TYPE','SIZEOF','VMTOFFSET','%','<<','>>','!','&','|','^','~','@','reltype',
|
||||
'directive');
|
||||
@ -227,7 +227,7 @@ unit raatt;
|
||||
actasmpattern[len]:=c;
|
||||
{ Let us point to the next character }
|
||||
c:=current_scanner.asmgetchar;
|
||||
while c in ['A'..'Z','a'..'z','0'..'9','_','$'] do
|
||||
while c in ['A'..'Z','a'..'z','0'..'9','_','$','.'] do
|
||||
begin
|
||||
inc(len);
|
||||
actasmpattern[len]:=c;
|
||||
@ -1076,6 +1076,7 @@ unit raatt;
|
||||
section : tai_section;
|
||||
secflags : TSectionFlags;
|
||||
secprogbits : TSectionProgbits;
|
||||
i: Integer;
|
||||
Begin
|
||||
Message1(asmr_d_start_reading,'GNU AS');
|
||||
firsttoken:=TRUE;
|
||||
@ -1163,6 +1164,12 @@ unit raatt;
|
||||
BuildConstant(4);
|
||||
end;
|
||||
|
||||
AS_DC_A:
|
||||
Begin
|
||||
Consume(AS_DC_A);
|
||||
BuildConstant(sizeof(aint));
|
||||
end;
|
||||
|
||||
AS_DQ:
|
||||
Begin
|
||||
Consume(AS_DQ);
|
||||
@ -1342,18 +1349,17 @@ unit raatt;
|
||||
Consume(AS_COMMA);
|
||||
if actasmtoken=AS_STRING then
|
||||
begin
|
||||
case actasmpattern of
|
||||
'a':
|
||||
Include(secflags,SF_A);
|
||||
'w':
|
||||
Include(secflags,SF_W);
|
||||
'x':
|
||||
Include(secflags,SF_X);
|
||||
'':
|
||||
;
|
||||
else
|
||||
Message(asmr_e_syntax_error);
|
||||
end;
|
||||
for i:=1 to length(actasmpattern) do
|
||||
case actasmpattern[i] of
|
||||
'a':
|
||||
Include(secflags,SF_A);
|
||||
'w':
|
||||
Include(secflags,SF_W);
|
||||
'x':
|
||||
Include(secflags,SF_X);
|
||||
else
|
||||
Message(asmr_e_syntax_error);
|
||||
end;
|
||||
Consume(AS_STRING);
|
||||
if actasmtoken=AS_COMMA then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user