gas, sparc: Allow non-fpop2 instructions before floating point branches
Sparc V8 does not allow fpop2 instructions (floating point
comparisons) immediately before floating point branches. From the
SPARC Architecture Manual Version 8, section B.22 "Branch on
Floating-point Condition Codes Instructions":
"If the instruction executed immediately before an FBfcc is an FPop2
instruction, the result of the FBfcc is undefined. Therefore, at
least one non FPop2 instruction should be executed between the FPop2
instruction and the FBfcc instruction."
The existing check in GAS, however, does not allow any kind of
floating point instruction before the branch. This patch adds an
extra condition to only disallow fpop2 instructions.
gas/ChangeLog:
2018-09-04 Daniel Cederman <cederman@gaisler.com>
* config/tc-sparc.c (md_assemble): Allow non-fpop2 instructions
before floating point branches for Sparc V8 and earlier.
* testsuite/gas/sparc/sparc.exp: Execute the new test.
* testsuite/gas/sparc/v8branch.d: New test.
* testsuite/gas/sparc/v8branch.s: New test.