blob: 98e40c0eae29144bef09b04bae10289b680e83e2 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From 7163824e07ade3ad2dc24e888265d27e0bc87869 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 Geissler84ad7c52020-06-27 00:00:16 -05004Subject: [PATCH 02/43] 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 Geissler84ad7c52020-06-27 00:00:16 -050019index ab90c6b20f..c92e9ce563 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 *);
Brad Bishop26bdd442019-08-16 17:08:17 -040031@@ -1845,6 +1847,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
Brad Bishop26bdd442019-08-16 17:08:17 -040040@@ -2498,9 +2502,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:
Brad Bishop26bdd442019-08-16 17:08:17 -040052@@ -2515,6 +2521,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