diff -rup binutils-2.23.52.0.1.orig/bfd/bfd.c binutils-2.23.52.0.1/bfd/bfd.c
--- binutils-2.23.52.0.1.orig/bfd/bfd.c	2015-06-09 09:19:37.362301149 +0100
+++ binutils-2.23.52.0.1/bfd/bfd.c	2015-06-09 09:23:20.725373142 +0100
@@ -324,6 +324,14 @@ CODE_FRAGMENT
 .  unsigned int lto_type : 2;
 .};
 .
+.{* See note beside bfd_set_section_userdata.  *}
+.static inline bfd_boolean
+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+.{
+.  abfd->cacheable = val;
+.  return TRUE;
+.}
+.
 */
 
 #include "sysdep.h"
diff -rup binutils-2.23.52.0.1.orig/bfd/bfd-in2.h binutils-2.23.52.0.1/bfd/bfd-in2.h
--- binutils-2.23.52.0.1.orig/bfd/bfd-in2.h	2015-06-09 09:19:37.424301457 +0100
+++ binutils-2.23.52.0.1/bfd/bfd-in2.h	2015-06-09 09:25:47.810081941 +0100
@@ -296,9 +296,6 @@ typedef struct bfd_section *sec_ptr;
 
 #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
 
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
 /* Find the address one past the end of SEC.  */
 #define bfd_get_section_limit(bfd, sec) \
   (((bfd)->direction != write_direction && (sec)->rawsize != 0	\
@@ -521,8 +518,6 @@ extern void warn_deprecated (const char
 
 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
 
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
 extern bfd_boolean bfd_cache_close
   (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
@@ -1574,6 +1569,32 @@ struct relax_table {
   int size;
 };
 
+/* Note: the following are provided as inline functions rather than macros
+   because not all callers use the return value.  A macro implementation
+   would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+   compilers will complain about comma expressions that have no effect.  */
+static inline bfd_boolean
+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+{
+  ptr->userdata = val;
+  return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+{
+  ptr->vma = ptr->lma = val;
+  ptr->user_set_vma = TRUE;
+  return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+{
+  ptr->alignment_power = val;
+  return TRUE;
+}
+
 /* These sections are global, and are managed by BFD.  The application
    and target back end are not permitted to change the values in
    these sections.  */
@@ -6136,6 +6157,14 @@ struct bfd
   unsigned int lto_type : 2;
 };
 
+/* See note beside bfd_set_section_userdata.  */
+static inline bfd_boolean
+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+{
+  abfd->cacheable = val;
+  return TRUE;
+}
+
 typedef enum bfd_error
 {
   bfd_error_no_error = 0,
diff -rup binutils-2.23.52.0.1.orig/bfd/bfd-in.h binutils-2.23.52.0.1/bfd/bfd-in.h
--- binutils-2.23.52.0.1.orig/bfd/bfd-in.h	2015-06-09 09:19:37.420301437 +0100
+++ binutils-2.23.52.0.1/bfd/bfd-in.h	2015-06-09 09:25:00.357853270 +0100
@@ -289,9 +289,6 @@ typedef struct bfd_section *sec_ptr;
 
 #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
 
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
 /* Find the address one past the end of SEC.  */
 #define bfd_get_section_limit(bfd, sec) \
   (((bfd)->direction != write_direction && (sec)->rawsize != 0	\
@@ -514,8 +511,6 @@ extern void warn_deprecated (const char
 
 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
 
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
 extern bfd_boolean bfd_cache_close
   (bfd *abfd);
 /* NB: This declaration should match the autogenerated one in libbfd.h.  */
diff -rup binutils-2.23.52.0.1.orig/bfd/section.c binutils-2.23.52.0.1/bfd/section.c
--- binutils-2.23.52.0.1.orig/bfd/section.c	2015-06-09 09:19:37.402301347 +0100
+++ binutils-2.23.52.0.1/bfd/section.c	2015-06-09 09:24:04.245582865 +0100
@@ -542,6 +542,32 @@ CODE_FRAGMENT
 .  int size;
 .};
 .
+.{* Note: the following are provided as inline functions rather than macros
+.   because not all callers use the return value.  A macro implementation
+.   would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+.   compilers will complain about comma expressions that have no effect.  *}
+.static inline bfd_boolean
+.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+.{
+.  ptr->userdata = val;
+.  return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+.{
+.  ptr->vma = ptr->lma = val;
+.  ptr->user_set_vma = TRUE;
+.  return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+.{
+.  ptr->alignment_power = val;
+.  return TRUE;
+.}
+.
 .{* These sections are global, and are managed by BFD.  The application
 .   and target back end are not permitted to change the values in
 .   these sections.  *}
diff -rup binutils-2.23.52.0.1.orig/gas/config/tc-i386.c binutils-2.23.52.0.1/gas/config/tc-i386.c
--- binutils-2.23.52.0.1.orig/gas/config/tc-i386.c	2015-06-09 09:19:37.490301785 +0100
+++ binutils-2.23.52.0.1/gas/config/tc-i386.c	2015-06-09 09:34:14.608932920 +0100
@@ -6188,7 +6188,7 @@ build_modrm_byte (void)
 	      op.bitfield.regmem = 0;
 	      if ((dest + 1) >= i.operands
 		  || (op.bitfield.reg32 != 1
-		      && !op.bitfield.reg64 != 1
+		      && op.bitfield.reg64
 		      && !operand_type_equal (&op, &regxmm)
 		      && !operand_type_equal (&op, &regymm)
 		      && !operand_type_equal (&op, &regzmm)

