diff options
author | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:14:27 +0000 |
---|---|---|
committer | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:14:27 +0000 |
commit | b17ec5f5891689aea80ca036d221d277bec8c65a (patch) | |
tree | 278bd273e66fab149cf8405c666cfd9f08326ccf | |
parent | 6781a5fdaea823e589802ca3e8960e62a3765b23 (diff) | |
download | fpc-b17ec5f5891689aea80ca036d221d277bec8c65a.tar.gz |
Add .force_thumb pseudo-directive support forarm reader
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49271 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/aasmtai.pas | 3 | ||||
-rw-r--r-- | compiler/arm/raarmgas.pas | 6 | ||||
-rw-r--r-- | compiler/assemble.pas | 8 |
3 files changed, 16 insertions, 1 deletions
diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index 84049cae9a..fec178a2cf 100644 --- a/compiler/aasmtai.pas +++ b/compiler/aasmtai.pas @@ -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', diff --git a/compiler/arm/raarmgas.pas b/compiler/arm/raarmgas.pas index ef7a26a2fd..56ba931571 100644 --- a/compiler/arm/raarmgas.pas +++ b/compiler/arm/raarmgas.pas @@ -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; diff --git a/compiler/assemble.pas b/compiler/assemble.pas index aab41ccc2b..56b8426401 100644 --- a/compiler/assemble.pas +++ b/compiler/assemble.pas @@ -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} ; |