gas: sframe: Fix non-SP/FP CFA base register if flexible FDE

.cfi_def_cfa_offset modifies the current CFA rule to use the provided
offset but keep the current CFA base register.  It therefore requires
a CFA base register to be in effect.  Relax the check to simply test
for whether a CFA base register is in effect instead of restricting
it to SP/FP.  The latter is checked when the CFA base register is
modified.

This enables .cfi_def_cfa_offset with non-SP/FP CFA base register for
targets that support SFrame flexible FDE.

While at it simplify the logic to test for error cases first.

gas/
	* gen-sframe.c (sframe_xlate_do_def_cfa_offset): Allow non-SP/FP
	CFA base register if flexible FDE.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
1 file changed