Add .force_thumb pseudo-directive support forarm reader

git-svn-id: trunk@49271 -
This commit is contained in:
pierre 2021-04-26 21:14:27 +00:00
parent 570af33fa9
commit f1d30a5bc6
3 changed files with 16 additions and 1 deletions

View File

@ -402,7 +402,7 @@ interface
{ supported by recent clang-based assemblers for data-in-code }
asd_data_region, asd_end_data_region,
{ ARM }
asd_thumb_func,asd_code,
asd_thumb_func,asd_code,asd_force_thumb,
{ restricts the assembler only to those instructions, which are
available on the specified CPU; this represents directives such as
NASM's 'CPU 686' or MASM/TASM's '.686p'. Might not be supported by
@ -452,6 +452,7 @@ interface
{ ARM }
'thumb_func',
'code',
'force_thumb',
'cpu',
{ for the OMF object format }
'omf_line',

View File

@ -151,6 +151,7 @@ Unit raarmgas;
function tarmattreader.is_targetdirective(const s: string): boolean;
begin
case s of
'.force_thumb',
'.thumb_func',
'.code',
'.thumb_set':
@ -1464,6 +1465,11 @@ Unit raarmgas;
begin
consume(AS_TARGET_DIRECTIVE);
curList.concat(tai_directive.create(asd_thumb_func,''));
end;
'.force_thumb':
begin
consume(AS_TARGET_DIRECTIVE);
curList.concat(tai_directive.create(asd_force_thumb,''));
end
else
inherited HandleTargetDirective;

View File

@ -1719,6 +1719,11 @@ Implementation
{$ifdef ARM}
asd_thumb_func:
ObjData.ThumbFunc:=true;
asd_force_thumb:
begin
ObjData.ThumbFunc:=true;
Code16:=true;
end;
asd_code:
begin
{ ai_directive(hp).name can be only 16 or 32, this is checked by the reader }
@ -1924,6 +1929,9 @@ Implementation
asd_thumb_func:
{ ignore for now, but should be added}
;
asd_force_thumb:
{ ignore for now, but should be added}
;
asd_code:
{ ignore for now, but should be added}
;