From ec9b30879890f70266dda7f9c853f48b22a9fd50 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Tue, 28 Feb 2023 05:38:12 -0800 Subject: gcc: xtensa: add data alignment properties to dynconfig gcc/ * config/xtensa/xtensa-dynconfig.cc (xtensa_get_config_v4): New function. include/ * xtensa-dynconfig.h (xtensa_config_v4): New struct. (XCHAL_DATA_WIDTH, XCHAL_UNALIGNED_LOAD_EXCEPTION) (XCHAL_UNALIGNED_STORE_EXCEPTION, XCHAL_UNALIGNED_LOAD_HW) (XCHAL_UNALIGNED_STORE_HW, XTENSA_CONFIG_V4_ENTRY_LIST): New definitions. (XTENSA_CONFIG_INSTANCE_LIST): Add xtensa_config_v4 instance. (XTENSA_CONFIG_ENTRY_LIST): Add XTENSA_CONFIG_V4_ENTRY_LIST. --- gcc/config/xtensa/xtensa-dynconfig.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc') diff --git a/gcc/config/xtensa/xtensa-dynconfig.cc b/gcc/config/xtensa/xtensa-dynconfig.cc index 9aea9f2..12dce4d 100644 --- a/gcc/config/xtensa/xtensa-dynconfig.cc +++ b/gcc/config/xtensa/xtensa-dynconfig.cc @@ -182,6 +182,24 @@ const struct xtensa_config_v3 *xtensa_get_config_v3 (void) return config; } +const struct xtensa_config_v4 *xtensa_get_config_v4 (void) +{ + static const struct xtensa_config_v4 *config; + static const struct xtensa_config_v4 def = { + 16, /* xchal_data_width */ + 1, /* xchal_unaligned_load_exception */ + 1, /* xchal_unaligned_store_exception */ + 0, /* xchal_unaligned_load_hw */ + 0, /* xchal_unaligned_store_hw */ + }; + + if (!config) + config = (const struct xtensa_config_v4 *) xtensa_load_config ("xtensa_config_v4", + &xtensa_config_v4, + &def); + return config; +} + const char * const *xtensa_get_config_strings (void) { static const char * const *config_strings; -- cgit v1.1