[committed] Reject double floating point stores and loads that reference the right half of a floating point register

John David Anglin dave@hiauly1.hia.nrc.ca
Sun Oct 14 23:41:00 GMT 2012


This change makes gas behave in the same manner as the HP assembler.
It's not really safe to silently clobber the left half as was done
before.

Tested on hppa2.0w-hp-hpux11.11 and committed to trunk.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2012-10-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* config/tc-hppa.c (pa_ip): Reject double floating point stores and
	loads that reference the right half of a floating point register.

Index: config/tc-hppa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
retrieving revision 1.153
diff -u -3 -p -r1.153 tc-hppa.c
--- config/tc-hppa.c	13 Oct 2012 22:15:19 -0000	1.153
+++ config/tc-hppa.c	14 Oct 2012 00:27:03 -0000
@@ -5482,7 +5482,10 @@ pa_ip (char *str)
 		case 't':
 		  if (!pa_parse_number (&s, 3))
 		    break;
-		  num = (pa_number & ~FP_REG_RSEL) - FP_REG_BASE;
+		  /* RSEL should not be set.  */
+		  if (pa_number & FP_REG_RSEL)
+		    break;
+		  num = pa_number - FP_REG_BASE;
 		  CHECK_FIELD (num, 31, 0, 0);
 		  INSERT_FIELD_AND_CONTINUE (opcode, num, 0);
 



More information about the Binutils mailing list