mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
Fri Oct 24 11:19:22 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
* config/tc-sparc.c (sparc_memory_model): New variable. (md_longopts): Add -TSO/-PSO/-RMO options. (md_parse_options): Handle them. (sparc_elf_final_processing): For 64 ELF, set required memory ordering in e_flags. Default to RMO and let the user override it through command line. * config/tc-sparc.h (elf_tc_final_processing): Add.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
Fri Oct 24 11:19:22 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
|
||||||
|
|
||||||
|
* config/tc-sparc.c (sparc_memory_model): New variable.
|
||||||
|
(md_longopts): Add -TSO/-PSO/-RMO options.
|
||||||
|
(md_parse_options): Handle them.
|
||||||
|
(sparc_elf_final_processing): For 64 ELF, set required
|
||||||
|
memory ordering in e_flags. Default to RMO and let the user
|
||||||
|
override it through command line.
|
||||||
|
|
||||||
|
* config/tc-sparc.h (elf_tc_final_processing): Add.
|
||||||
|
|
||||||
Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
|
Wed Oct 22 17:42:12 1997 Richard Henderson <rth@cygnus.com>
|
||||||
|
|
||||||
* config/tc-sparc.c (v9a_asr_table): New variable.
|
* config/tc-sparc.c (v9a_asr_table): New variable.
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#include "opcode/sparc.h"
|
#include "opcode/sparc.h"
|
||||||
|
|
||||||
|
#include "elf/sparc.h"
|
||||||
|
|
||||||
static struct sparc_arch *lookup_arch PARAMS ((char *));
|
static struct sparc_arch *lookup_arch PARAMS ((char *));
|
||||||
static void init_default_arch PARAMS ((void));
|
static void init_default_arch PARAMS ((void));
|
||||||
static void sparc_ip PARAMS ((char *, const struct sparc_opcode **));
|
static void sparc_ip PARAMS ((char *, const struct sparc_opcode **));
|
||||||
@ -64,6 +66,7 @@ static enum sparc_opcode_arch_val max_architecture;
|
|||||||
|
|
||||||
/* Either 32 or 64, selects file format. */
|
/* Either 32 or 64, selects file format. */
|
||||||
static int sparc_arch_size;
|
static int sparc_arch_size;
|
||||||
|
static enum { MM_TSO, MM_PSO, MM_RMO } sparc_memory_model = MM_RMO;
|
||||||
/* Initial (default) value, recorded separately in case a user option
|
/* Initial (default) value, recorded separately in case a user option
|
||||||
changes the value before md_show_usage is called. */
|
changes the value before md_show_usage is called. */
|
||||||
static int default_arch_size;
|
static int default_arch_size;
|
||||||
@ -353,14 +356,20 @@ struct option md_longopts[] = {
|
|||||||
{"32", no_argument, NULL, OPTION_32},
|
{"32", no_argument, NULL, OPTION_32},
|
||||||
#define OPTION_64 (OPTION_MD_BASE + 4)
|
#define OPTION_64 (OPTION_MD_BASE + 4)
|
||||||
{"64", no_argument, NULL, OPTION_64},
|
{"64", no_argument, NULL, OPTION_64},
|
||||||
|
#define OPTION_TSO (OPTION_MD_BASE + 5)
|
||||||
|
{"TSO", no_argument, NULL, OPTION_TSO},
|
||||||
|
#define OPTION_PSO (OPTION_MD_BASE + 6)
|
||||||
|
{"PSO", no_argument, NULL, OPTION_PSO},
|
||||||
|
#define OPTION_RMO (OPTION_MD_BASE + 7)
|
||||||
|
{"RMO", no_argument, NULL, OPTION_RMO},
|
||||||
#endif
|
#endif
|
||||||
#ifdef SPARC_BIENDIAN
|
#ifdef SPARC_BIENDIAN
|
||||||
#define OPTION_LITTLE_ENDIAN (OPTION_MD_BASE + 5)
|
#define OPTION_LITTLE_ENDIAN (OPTION_MD_BASE + 8)
|
||||||
{"EL", no_argument, NULL, OPTION_LITTLE_ENDIAN},
|
{"EL", no_argument, NULL, OPTION_LITTLE_ENDIAN},
|
||||||
#define OPTION_BIG_ENDIAN (OPTION_MD_BASE + 6)
|
#define OPTION_BIG_ENDIAN (OPTION_MD_BASE + 9)
|
||||||
{"EB", no_argument, NULL, OPTION_BIG_ENDIAN},
|
{"EB", no_argument, NULL, OPTION_BIG_ENDIAN},
|
||||||
#endif
|
#endif
|
||||||
#define OPTION_ENFORCE_ALIGNED_DATA (OPTION_MD_BASE + 7)
|
#define OPTION_ENFORCE_ALIGNED_DATA (OPTION_MD_BASE + 10)
|
||||||
{"enforce-aligned-data", no_argument, NULL, OPTION_ENFORCE_ALIGNED_DATA},
|
{"enforce-aligned-data", no_argument, NULL, OPTION_ENFORCE_ALIGNED_DATA},
|
||||||
{NULL, no_argument, NULL, 0}
|
{NULL, no_argument, NULL, 0}
|
||||||
};
|
};
|
||||||
@ -467,6 +476,18 @@ md_parse_option (c, arg)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_TSO:
|
||||||
|
sparc_memory_model = MM_TSO;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPTION_PSO:
|
||||||
|
sparc_memory_model = MM_PSO;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPTION_RMO:
|
||||||
|
sparc_memory_model = MM_RMO;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
print_version_id ();
|
print_version_id ();
|
||||||
break;
|
break;
|
||||||
@ -535,6 +556,12 @@ md_show_usage (stream)
|
|||||||
fprintf (stream, "\
|
fprintf (stream, "\
|
||||||
[default is %d]\n", default_arch_size);
|
[default is %d]\n", default_arch_size);
|
||||||
fprintf (stream, "\
|
fprintf (stream, "\
|
||||||
|
-TSO use Total Store Ordering\n\
|
||||||
|
-PSO use Partial Store Ordering\n\
|
||||||
|
-RMO use Relaxed Memory Ordering\n");
|
||||||
|
fprintf (stream, "\
|
||||||
|
[default is %s]\n", (default_arch_size == 64) ? "RMO" : "TSO");
|
||||||
|
fprintf (stream, "\
|
||||||
-KPIC generate PIC\n\
|
-KPIC generate PIC\n\
|
||||||
-V print assembler version number\n\
|
-V print assembler version number\n\
|
||||||
-q ignored\n\
|
-q ignored\n\
|
||||||
@ -3301,3 +3328,28 @@ sparc_handle_align (fragp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef OBJ_ELF
|
||||||
|
/* Some special processing for a Sparc ELF file. */
|
||||||
|
|
||||||
|
void
|
||||||
|
sparc_elf_final_processing ()
|
||||||
|
{
|
||||||
|
/* Set the Sparc ELF flag bits. FIXME: There should probably be some
|
||||||
|
sort of BFD interface for this. */
|
||||||
|
if (sparc_arch_size == 64)
|
||||||
|
switch (sparc_memory_model)
|
||||||
|
{
|
||||||
|
case MM_RMO:
|
||||||
|
elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_RMO;
|
||||||
|
break;
|
||||||
|
case MM_PSO:
|
||||||
|
elf_elfheader (stdoutput)->e_flags |= EF_SPARCV9_PSO;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (current_architecture >= SPARC_OPCODE_ARCH_V9)
|
||||||
|
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS;
|
||||||
|
if (current_architecture == SPARC_OPCODE_ARCH_V9A)
|
||||||
|
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user