diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-23 10:28:06 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-23 10:28:06 +0000 |
commit | 46f8e3b0dc1cbb88c7dde984d0f0c2ce8935011d (patch) | |
tree | efd8e61a3d2ff9dcff5eb5bf03e25922191f7df5 /gcc/opt-functions.awk | |
parent | e22d2ad745ca3d2ac08936833a802ffc161fc89b (diff) | |
download | gcc-46f8e3b0dc1cbb88c7dde984d0f0c2ce8935011d.tar.gz |
Add ability to set target options (ix86 only) and optimization options on a function specific basis
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opt-functions.awk')
-rw-r--r-- | gcc/opt-functions.awk | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/opt-functions.awk b/gcc/opt-functions.awk index 213e9497dcf..a14b8c203d5 100644 --- a/gcc/opt-functions.awk +++ b/gcc/opt-functions.awk @@ -128,6 +128,23 @@ function var_type(flags) return "const char *" } +# Return the type of variable that should be associated with the given flags +# for use within a structure. Simple variables are changed to unsigned char +# type instead of int to save space. +function var_type_struct(flags) +{ + if (flag_set_p("UInteger", flags)) + return "int " + else if (!flag_set_p("Joined.*", flags)) { + if (flag_set_p(".*Mask.*", flags)) + return "int " + else + return "unsigned char " + } + else + return "const char *" +} + # Given that an option has flags FLAGS, return an initializer for the # "var_cond" and "var_value" fields of its cl_options[] entry. function var_set(flags) |