This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SH64 Patch] Add diagnostic messages to gas


SHmedia PT instructions are not permitted to have expressions as
arguments. This is currently tested, but instead of giving an error
message the bad code is just ignored.

The attached patch adds a simple error message. This should be enough to
bring the problem to the user's attention.

-- 
Andrew Stubbs
andrew.stubbs@st.com
(aka. andrew.stubbs@superh.com)
2004-12-14  Andrew Stubbs  <andrew.stubbs@st.com>

	* config/tc-sh64.c (shmedia_build_Mytes): Emit an error message rather
	than just ignoring bad code.

--- src/gas/config/tc-sh64.c	2004-01-14 21:07:45.000000000 +0000
+++ src/gas/config/tc-sh64.c	2004-12-15 14:17:43.000000000 +0000
@@ -2672,7 +2711,10 @@ shmedia_build_Mytes (shmedia_opcode_info
 
 	    /* Don't allow complex expressions here.  */
 	    if (opjp->immediate.X_op_symbol != NULL)
-	      return 0;
+	      {
+		as_bad(_("invalid operand: expression in PT target"));
+		return 0;
+	      }
 
 	    if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL)
 	      init = max = min = SH64PCRELPLT;
@@ -2709,7 +2751,10 @@ shmedia_build_Mytes (shmedia_opcode_info
 
 	    /* Don't allow complex expressions here.  */
 	    if (opjp->immediate.X_op_symbol != NULL)
-	      return 0;
+	      {
+		as_bad(_("invalid operand: expression in PT target"));
+		return 0;
+	      }
 
 	    if (opjp->reloctype == BFD_RELOC_32_PLT_PCREL)
 	      init = max = min = SH64PCRELPLT;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]