This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, Joseph, Sorry for the late revised patch. We have completed all of it based on your review comments. On 7/10/13 7:27 AM, Joseph S. Myers wrote:
On Mon, 8 Jul 2013, Chung-Ju Wu wrote:+/* This is used to identify used ISA when doing code generation. + Initialize it with macro TARGET_DEFAULT_ISA, + which is defined in nds32-isa-xxx.h file. + User can specify it by using '-misa=X' option. */ +enum nds32_isa nds32_selected_isa = TARGET_DEFAULT_ISA;Rather than using global state, put this in the gcc_options structure using a Variable entry in your .opt file.
Thanks for the suggestion. We removed global state and added handling in nds32.opt to achieve the same purpose of setting instruction set architecture. Also, after discussing with other toolchain engineers, we replaced -misa option with -march option.
+ warning (0, "For the option -misr-vector-size=X, the valid X " + "must be: 4 or 16");The diagnostics in this function should all not start with a capital letter. Invalid arguments to an option should be errors, not warnings. Since you have a location passed to this function, use error_at rather than the legacy functions that implicitly use input_location.
Fixed it accordingly.
+ case OPT_misa_: + /* Check valid ISA: v2 v3 v3m. */ + if (strcmp (arg, "v2") == 0)Use Enum in the .opt file and get all the conversion from strings to integer values, and errors for unknown values, done automatically.
Thanks for the suggestion. You guided us a better approach to deal with it automatically. We modified it accordingly. Thanks for the review comments. A revised patch is provided and here is a summary: 1. Use error_at () for diagnostics statement and start with lowercase. 2. Some process can be done in nds32.opt. Remove unnecessary parts from nds32-common.c file. gcc/ 2013-07-24 Chung-Ju Wu <jasonwucj@gmail.com> Shiva Chen <shiva0217@gmail.com> * config/nds32/nds32.md: New file. * common/config/nds32: New directory and files. Best regards, jasonwucj
Attachment:
2-nds32-backend-md-part2.v2.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |