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