public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gas: blackfin: reject FP/SP with TESTSET
@ 2011-02-11  4:46 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-02-11  4:46 UTC (permalink / raw)
  To: binutils; +Cc: toolchain-devel

The TESTSET insn does not work with the FP/SP Pregs, so reject them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2011-02-06  Mike Frysinger  <vapier@gentoo.org>

	* config/bfin-parse.y (TESTSET): Reject REG_SP and REG_FP.
---
 gas/config/bfin-parse.y |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y
index 4892017..eda67c9 100644
--- a/gas/config/bfin-parse.y
+++ b/gas/config/bfin-parse.y
@@ -2692,6 +2692,9 @@ asm_1:
 	{
 	  if (IS_PREG ($3))
 	    {
+	      if ($3.regno == REG_SP || $3.regno == REG_FP)
+		return yyerror ("Bad register for TESTSET");
+
 	      notethat ("ProgCtrl: TESTSET (pregs )\n");
 	      $$ = PROGCTRL (11, $3.regno & CODE_MASK);
 	    }
-- 
1.7.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-11  4:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11  4:46 [PATCH] gas: blackfin: reject FP/SP with TESTSET Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).