Module Name: src
Committed By: joerg
Date: Thu Feb 25 12:36:36 UTC 2016
Modified Files:
src/external/gpl3/binutils.old/dist/gas/config: tc-sparc.c
src/external/gpl3/binutils/dist/gas/config: tc-sparc.c
Log Message:
SPARC before v8 requires a nop instruction between a floating point
instruction and a floating point branch. SPARCv8 requires a nop only
immediately after FPop2 (fcmp*) instructions. Adjust the logic to
properly implement the v8 rules when targetting a less ancient
architecture.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/gpl3/binutils/dist/gas/config/tc-sparc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c
diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c:1.1.1.1 src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c:1.2
--- src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c:1.1.1.1 Tue Jan 26 17:26:18 2016
+++ src/external/gpl3/binutils.old/dist/gas/config/tc-sparc.c Thu Feb 25 12:36:36 2016
@@ -1348,13 +1348,17 @@ md_assemble (char *str)
|| (last_opcode & ANNUL) == 0))
as_warn (_("FP branch in delay slot"));
- /* SPARC before v9 requires a nop instruction between a floating
- point instruction and a floating point branch. We insert one
- automatically, with a warning. */
- if (max_architecture < SPARC_OPCODE_ARCH_V9
- && last_insn != NULL
+ /* SPARC before v8 requires a nop instruction between a floating
+ point instruction and a floating point branch. SPARCv8 requires
+ a nop only immediately after FPop2 (fcmp*) instructions.
+ We insert one automatically, with a warning.
+ */
+ if (last_insn != NULL
&& (insn->flags & F_FBR) != 0
- && (last_insn->flags & F_FLOAT) != 0)
+ && (last_insn->flags & F_FLOAT) != 0
+ && (max_architecture < SPARC_OPCODE_ARCH_V8 ||
+ (max_architecture < SPARC_OPCODE_ARCH_V9 &&
+ strncmp(last_insn->name, "fcmp", 4) == 0)))
{
struct sparc_it nop_insn;
Index: src/external/gpl3/binutils/dist/gas/config/tc-sparc.c
diff -u src/external/gpl3/binutils/dist/gas/config/tc-sparc.c:1.1.1.4 src/external/gpl3/binutils/dist/gas/config/tc-sparc.c:1.2
--- src/external/gpl3/binutils/dist/gas/config/tc-sparc.c:1.1.1.4 Fri Jan 29 12:44:35 2016
+++ src/external/gpl3/binutils/dist/gas/config/tc-sparc.c Thu Feb 25 12:36:36 2016
@@ -1402,13 +1402,17 @@ md_assemble (char *str)
|| (last_opcode & ANNUL) == 0))
as_warn (_("FP branch in delay slot"));
- /* SPARC before v9 requires a nop instruction between a floating
- point instruction and a floating point branch. We insert one
- automatically, with a warning. */
- if (max_architecture < SPARC_OPCODE_ARCH_V9
- && last_insn != NULL
+ /* SPARC before v8 requires a nop instruction between a floating
+ point instruction and a floating point branch. SPARCv8 requires
+ a nop only immediately after FPop2 (fcmp*) instructions.
+ We insert one automatically, with a warning.
+ */
+ if (last_insn != NULL
&& (insn->flags & F_FBR) != 0
- && (last_insn->flags & F_FLOAT) != 0)
+ && (last_insn->flags & F_FLOAT) != 0
+ && (max_architecture < SPARC_OPCODE_ARCH_V8 ||
+ (max_architecture < SPARC_OPCODE_ARCH_V9 &&
+ strncmp(last_insn->name, "fcmp", 4) == 0)))
{
struct sparc_it nop_insn;