diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2001-11-29 09:24:24 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2001-11-29 09:24:24 +0000 |
| commit | 6da382e0f089559a8fa0898a4e7abd809d7b400f (patch) | |
| tree | aead4ce71435f5f718d37dbe1e991285c48a7c98 /gnu | |
| parent | dfb9621f52fd9689a16ac5c2ea0862f664eb357c (diff) | |
add "-big" options for little endian
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/gas/config/tc-sh.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/gnu/dist/gas/config/tc-sh.c b/gnu/dist/gas/config/tc-sh.c index 535925fb539..5ee3911a7ea 100644 --- a/gnu/dist/gas/config/tc-sh.c +++ b/gnu/dist/gas/config/tc-sh.c @@ -39,6 +39,9 @@ static void s_uses PARAMS ((int)); static void sh_count_relocs PARAMS ((bfd *, segT, PTR)); static void sh_frob_section PARAMS ((bfd *, segT, PTR)); +static void little PARAMS ((int)); +static void big PARAMS ((int)); + /* This table describes all the machine specific pseudo-ops the assembler has to support. The fields are: pseudo-op name without dot @@ -51,9 +54,24 @@ void s_align_bytes (); static void s_uacons PARAMS ((int)); static void +big (ignore) + int ignore; +{ + if (! target_big_endian) + as_bad ("directive .big encountered when option -big required"); + + /* Stop further messages. */ + target_big_endian = 1; +} + +static void little (ignore) int ignore; { + if (target_big_endian) + as_bad ("directive .little encountered when option -little required"); + + /* Stop further messages. */ target_big_endian = 0; } @@ -61,6 +79,7 @@ const pseudo_typeS md_pseudo_table[] = { {"int", cons, 4}, {"word", cons, 2}, + {"big", big, 0}, {"form", listing_psize, 0}, {"little", little, 0}, {"heading", listing_title, 0}, @@ -1205,10 +1224,12 @@ CONST char *md_shortopts = ""; struct option md_longopts[] = { #define OPTION_RELAX (OPTION_MD_BASE) -#define OPTION_LITTLE (OPTION_MD_BASE + 1) +#define OPTION_BIG (OPTION_MD_BASE + 1) +#define OPTION_LITTLE (OPTION_BIG + 1) #define OPTION_SMALL (OPTION_LITTLE + 1) {"relax", no_argument, NULL, OPTION_RELAX}, + {"big", no_argument, NULL, OPTION_BIG}, {"little", no_argument, NULL, OPTION_LITTLE}, {"small", no_argument, NULL, OPTION_SMALL}, {NULL, no_argument, NULL, 0} @@ -1226,6 +1247,10 @@ md_parse_option (c, arg) sh_relax = 1; break; + case OPTION_BIG: + target_big_endian = 1; + break; + case OPTION_LITTLE: target_big_endian = 0; break; @@ -1248,6 +1273,7 @@ md_show_usage (stream) fprintf(stream, "\ SH options:\n\ -little generate little endian code\n\ +-big generate big endian code\n\ -relax alter jump instructions for long displacements\n\ -small align sections to 4 byte boundaries, not 16\n"); } |
