diff options
author | Chung-Ju Wu <jasonwucj@gmail.com> | 2018-08-12 07:38:40 +0000 |
---|---|---|
committer | Chung-Ju Wu <jasonwucj@gcc.gnu.org> | 2018-08-12 07:38:40 +0000 |
commit | a49317452416282f4cb4da0149754c58d87b2241 (patch) | |
tree | 7acf8d7580c0a7c12800740f68ef42e0a4f3cd91 /gcc/common | |
parent | 39d2c7ed9f6dd2d716b046bc28524bd26b3a9d46 (diff) | |
download | gcc-a49317452416282f4cb4da0149754c58d87b2241.zip gcc-a49317452416282f4cb4da0149754c58d87b2241.tar.gz gcc-a49317452416282f4cb4da0149754c58d87b2241.tar.bz2 |
[NDS32] Implement more C ISR extension.
gcc/
* config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
extra_headers.
* common/config/nds32/nds32-common.c (nds32_handle_option): Handle
OPT_misr_secure_ case.
* config/nds32/nds32-isr.c: Implementation of backward compatibility.
* config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
* config/nds32/nds32.c (nds32_attribute_table): Add critical and
secure attribute.
* config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
(nds32_isr_info): New field security_level.
(TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
* config/nds32/nds32.md (return_internal): Consider critical attribute.
* config/nds32/nds32.opt (misr-secure): New option.
* config/nds32/nds32_init.inc: New file.
* config/nds32/nds32_isr.h: New file.
libgcc/
* config/nds32/t-nds32-isr: Rearrange object dependency.
* config/nds32/initfini.c: Add dwarf2 unwinding support.
* config/nds32/isr-library/adj_intr_lvl.inc: Consider new extensions
and registers usage.
* config/nds32/isr-library/excp_isr.S: Ditto.
* config/nds32/isr-library/intr_isr.S: Ditto.
* config/nds32/isr-library/reset.S: Ditto.
* config/nds32/isr-library/restore_all.inc: Ditto.
* config/nds32/isr-library/restore_mac_regs.inc: Ditto.
* config/nds32/isr-library/restore_partial.inc: Ditto.
* config/nds32/isr-library/restore_usr_regs.inc: Ditto.
* config/nds32/isr-library/save_all.inc: Ditto.
* config/nds32/isr-library/save_mac_regs.inc: Ditto.
* config/nds32/isr-library/save_partial.inc: Ditto.
* config/nds32/isr-library/save_usr_regs.inc: Ditto.
* config/nds32/isr-library/vec_vid*.S: Consider 4-byte vector size.
From-SVN: r263493
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/nds32/nds32-common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index 197f06c..efe2e9d 100644 --- a/gcc/common/config/nds32/nds32-common.c +++ b/gcc/common/config/nds32/nds32-common.c @@ -53,6 +53,16 @@ nds32_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, return true; + case OPT_misr_secure_: + /* Check the valid security level: 0 1 2 3. */ + if (value < 0 || value > 3) + { + error_at (loc, "for the option -misr-secure=X, the valid X " + "must be: 0, 1, 2, or 3"); + return false; + } + return true; + case OPT_mcache_block_size_: /* Check valid value: 4 8 16 32 64 128 256 512. */ if (exact_log2 (value) < 2 || exact_log2 (value) > 9) |