Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2014 21:47:20 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r275584 - head/contrib/binutils/gas/config
Message-ID:  <201412072147.sB7LlKei044641@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sun Dec  7 21:47:19 2014
New Revision: 275584
URL: https://svnweb.freebsd.org/changeset/base/275584

Log:
  Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
  we need it to be set to 15 for it to be equivalent to r15.
  
  MFC after:	1 week
  X-MFC with:	r275415
  Sponsored by:	ABT Systems Ltd

Modified:
  head/contrib/binutils/gas/config/tc-arm.c

Modified: head/contrib/binutils/gas/config/tc-arm.c
==============================================================================
--- head/contrib/binutils/gas/config/tc-arm.c	Sun Dec  7 21:02:45 2014	(r275583)
+++ head/contrib/binutils/gas/config/tc-arm.c	Sun Dec  7 21:47:19 2014	(r275584)
@@ -6789,7 +6789,11 @@ do_co_reg (void)
 {
   inst.instruction |= inst.operands[0].reg << 8;
   inst.instruction |= inst.operands[1].imm << 21;
-  inst.instruction |= inst.operands[2].reg << 12;
+  /* If this is a vector we are using the APSR_nzcv syntax, encode as r15 */
+  if (inst.operands[2].isvec != 0)
+    inst.instruction |= 15 << 12;
+  else
+    inst.instruction |= inst.operands[2].reg << 12;
   inst.instruction |= inst.operands[3].reg << 16;
   inst.instruction |= inst.operands[4].reg;
   inst.instruction |= inst.operands[5].imm << 5;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412072147.sB7LlKei044641>