Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 1 | From cd4e233a38df5eee833c77f4393e710ad5383ac0 Mon Sep 17 00:00:00 2001 |
| 2 | From: nagaraju <nmekala@xilix.com> |
| 3 | Date: Tue, 19 Mar 2013 17:18:23 +0530 |
| 4 | Subject: [PATCH] Add mlittle-endian and mbig-endian flags |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 5 | |
| 6 | Added support in gas for mlittle-endian and mbig-endian flags |
| 7 | as options. |
| 8 | |
| 9 | Updated show usage for MicroBlaze specific assembler options |
| 10 | to include new entries. |
| 11 | |
| 12 | Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 14 | |
| 15 | --- |
| 16 | gas/config/tc-microblaze.c | 9 +++++++++ |
| 17 | 1 file changed, 9 insertions(+) |
| 18 | |
| 19 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 20 | index ab90c6b..c92e9ce 100644 |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 21 | --- a/gas/config/tc-microblaze.c |
| 22 | +++ b/gas/config/tc-microblaze.c |
| 23 | @@ -37,6 +37,8 @@ |
| 24 | |
| 25 | #define OPTION_EB (OPTION_MD_BASE + 0) |
| 26 | #define OPTION_EL (OPTION_MD_BASE + 1) |
| 27 | +#define OPTION_LITTLE (OPTION_MD_BASE + 2) |
| 28 | +#define OPTION_BIG (OPTION_MD_BASE + 3) |
| 29 | |
| 30 | void microblaze_generate_symbol (char *sym); |
| 31 | static bfd_boolean check_spl_reg (unsigned *); |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 32 | @@ -1845,6 +1847,8 @@ struct option md_longopts[] = |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 33 | { |
| 34 | {"EB", no_argument, NULL, OPTION_EB}, |
| 35 | {"EL", no_argument, NULL, OPTION_EL}, |
| 36 | + {"mlittle-endian", no_argument, NULL, OPTION_LITTLE}, |
| 37 | + {"mbig-endian", no_argument, NULL, OPTION_BIG}, |
| 38 | { NULL, no_argument, NULL, 0} |
| 39 | }; |
| 40 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 41 | @@ -2498,9 +2502,11 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 42 | switch (c) |
| 43 | { |
| 44 | case OPTION_EB: |
| 45 | + case OPTION_BIG: |
| 46 | target_big_endian = 1; |
| 47 | break; |
| 48 | case OPTION_EL: |
| 49 | + case OPTION_LITTLE: |
| 50 | target_big_endian = 0; |
| 51 | break; |
| 52 | default: |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 53 | @@ -2515,6 +2521,9 @@ md_show_usage (FILE * stream ATTRIBUTE_UNUSED) |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 54 | /* fprintf(stream, _("\ |
| 55 | MicroBlaze options:\n\ |
| 56 | -noSmall Data in the comm and data sections do not go into the small data section\n")); */ |
| 57 | + fprintf (stream, _(" MicroBlaze specific assembler options:\n")); |
| 58 | + fprintf (stream, " -%-23s%s\n", "mbig-endian", N_("assemble for a big endian cpu")); |
| 59 | + fprintf (stream, " -%-23s%s\n", "mlittle-endian", N_("assemble for a little endian cpu")); |
| 60 | } |
| 61 | |
| 62 | |