diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-07-14 15:59:28 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-07-14 15:59:28 +0000 |
commit | 04a92367bce0df795aebb223883df90ab86b41a2 (patch) | |
tree | 4be98c0b7ba28d6b4fa23d24c8d1af8e14847c3b /gas/config | |
parent | be228e0db6047054b1ebfe6ac440186eeaba8f16 (diff) | |
download | gdb-04a92367bce0df795aebb223883df90ab86b41a2.zip gdb-04a92367bce0df795aebb223883df90ab86b41a2.tar.gz gdb-04a92367bce0df795aebb223883df90ab86b41a2.tar.bz2 |
* config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct
initialization of waddr.
(sparc_elf_final_processing): Add default case to switch.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-sparc.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index d8541fa..37fa06f 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -603,7 +603,7 @@ md_show_usage (stream) fprintf (stream, _("\ -EL generate code for a little endian machine\n\ -EB generate code for a big endian machine\n\ ---little-endian-data generate code for a machine having big endian +--little-endian-data generate code for a machine having big endian\n\ instructions and little endian data.")); #endif } @@ -3386,7 +3386,10 @@ sparc_handle_align (fragp) { int count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; - if (count >= 4 && !(count & 3) && count <= 1024 && !((long)(fragp->fr_literal + fragp->fr_fix) & 3)) + if (count >= 4 + && !(count & 3) + && count <= 1024 + && !((long)(fragp->fr_literal + fragp->fr_fix) & 3)) { unsigned *p = (unsigned *)(fragp->fr_literal + fragp->fr_fix); int i; @@ -3399,12 +3402,12 @@ sparc_handle_align (fragp) if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) { - char *waddr = &fragp->fr_literal + fragp->fr_fix; - unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ - if (INSN_BIG_ENDIAN) - number_to_chars_bigendian (waddr, wval, 4); - else - number_to_chars_littleendian (waddr, wval, 4); + char *waddr = &fragp->fr_literal[fragp->fr_fix]; + unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian (waddr, wval, 4); + else + number_to_chars_littleendian (waddr, wval, 4); } fragp->fr_var = count; } @@ -3420,15 +3423,19 @@ 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; - } + { + 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; + default: + break; + } + } else if (current_architecture >= SPARC_OPCODE_ARCH_V9) elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS; if (current_architecture == SPARC_OPCODE_ARCH_V9A) |