blob: 2d4d65e446d481827fe5a9709e2c3398f1f0eb37 [file] [log] [blame]
Andrew Geisslera9ff2b32020-10-16 10:11:54 -05001From d2a03159f8643b1c6a2db5d95c478540cc6ca6c4 Mon Sep 17 00:00:00 2001
Brad Bishop26bdd442019-08-16 17:08:17 -04002From: nagaraju <nmekala@xilix.com>
3Date: Tue, 19 Mar 2013 17:18:23 +0530
Andrew Geisslera9ff2b32020-10-16 10:11:54 -05004Subject: [PATCH 03/40] Add mlittle-endian and mbig-endian flags
Brad Bishop286d45c2018-10-02 15:21:57 -04005
6Added support in gas for mlittle-endian and mbig-endian flags
7as options.
8
9Updated show usage for MicroBlaze specific assembler options
10to include new entries.
11
Andrew Geissler84ad7c52020-06-27 00:00:16 -050012Signed-off-by:nagaraju <nmekala@xilix.com>
Brad Bishop286d45c2018-10-02 15:21:57 -040013Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Brad Bishop286d45c2018-10-02 15:21:57 -040014---
15 gas/config/tc-microblaze.c | 9 +++++++++
16 1 file changed, 9 insertions(+)
17
18diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
Andrew Geisslera9ff2b32020-10-16 10:11:54 -050019index ae5d36dc9c3..34eeb972357 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040020--- 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 Geisslera9ff2b32020-10-16 10:11:54 -050031@@ -1842,6 +1844,8 @@ struct option md_longopts[] =
Brad Bishop286d45c2018-10-02 15:21:57 -040032 {
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 Geisslera9ff2b32020-10-16 10:11:54 -050040@@ -2494,9 +2498,11 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
Brad Bishop286d45c2018-10-02 15:21:57 -040041 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 Geisslera9ff2b32020-10-16 10:11:54 -050052@@ -2511,6 +2517,9 @@ md_show_usage (FILE * stream ATTRIBUTE_UNUSED)
Brad Bishop286d45c2018-10-02 15:21:57 -040053 /* 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 Geissler84ad7c52020-06-27 00:00:16 -050062--
632.17.1
64