binutils-gdb/sim/sh
Oleg Endo 57df9adf2d Correct fabs and fneg insns in simulator
It seems that the implementation of the SH fabs and fneg insns in the
simulator is not correct.  They use the FP_UNARY macro which checks the
FPSCR.PR setting and raises an exception if PR = 1 (double precision)
and the register number is not even (i.e. a valid DF reg number).
For normal unary FP insns this is fine.  However, fneg and fabs perform
the same (integer) operations regardless of the FPSCR.PR setting.

This issue initially popped up here
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63260

I've checked some of the failing tests mentioned in GCC PR 63260 above
with the patch applied and the failures go away.

sim/sh/ChangeLog (tiny patch):

	* gencode.c (fabs, fneg): Implement as integer operation
	instead of using the FP_UNARY macro.
2014-11-28 19:44:03 +04:00
..
ChangeLog Correct fabs and fneg insns in simulator 2014-11-28 19:44:03 +04:00
Makefile.in Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
aclocal.m4 sim: use AM_MAINTAINER_MODE 2013-06-05 01:42:13 +00:00
config.in Regenerate sim configury. 2014-08-15 15:51:50 -07:00
configure Fix --diable-shared --enable-plugins build breakage 2014-08-19 21:59:56 +09:30
configure.ac sim: rename common/aclocal.m4 to common/acinclude.m4 2011-10-18 00:31:00 +00:00
gencode.c Correct fabs and fneg insns in simulator 2014-11-28 19:44:03 +04:00
interp.c sim: constify arg to sim_do_command 2014-03-10 22:57:29 -04:00
syscall.h include/gdb: 2003-10-15 12:30:47 +00:00
tconfig.in Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00