This is the mail archive of the binutils@sourceware.org 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]

[PATCH, binutils/ARM] Remove ARM_FEATURE_COPY macro


Hi,

Among the macros to manipulate an arm_feature_set structure is the
ARM_FEATURE_COPY which copy the value of a feature set into another.
This can be achieved with a simple assignement which most of the
existing code does. This patch removes the last 2 uses of that macro and
remove the macro altogether.

ChangeLog entries are as follows:

*** include/ChangeLog ***

2018-02-19  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* opcode/arm.h (ARM_FEATURE_COPY): Remove macro definition.

*** opcodes/ChangeLog ***

2018-02-19  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* arm-dis.c (print_insn_coprocessor): Replace uses of ARM_FEATURE_COPY
	macro by assignements.

Testing: Built binutils for arm-none-eabi target and testsuite shows no
regression.

Ok for master branch?

Best regards,

Thomas
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 9c5e79bfc870128f7ce160bae76d59ccbeb014a2..83b3f22c68fff11edda12a9a0312bfd45e3d0dda 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -389,15 +389,6 @@ typedef struct
     }							\
   while (0)
 
-#define ARM_FEATURE_COPY(F1, F2)		\
-  do						\
-    {						\
-      (F1).core[0] = (F2).core[0];		\
-      (F1).core[1] = (F2).core[1];		\
-      (F1).coproc = (F2).coproc;		\
-    }						\
-  while (0)
-
 #define ARM_FEATURE_EQUAL(T1,T2)		\
   (   (T1).core[0] == (T2).core[0]		\
    && (T1).core[1] == (T2).core[1]		\
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index afa9410b4f4b4bbcaba5d4a61bdf72c75487b969..f0fc93cf7b0429767b9153053d04d14d0a44991d 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -3393,7 +3393,7 @@ print_insn_coprocessor (bfd_vma pc,
   struct arm_private_data *private_data = info->private_data;
   arm_feature_set allowed_arches = ARM_ARCH_NONE;
 
-  ARM_FEATURE_COPY (allowed_arches, private_data->features);
+  allowed_arches = private_data->features;
 
   for (insn = coprocessor_opcodes; insn->assembler; insn++)
     {
@@ -3419,7 +3419,7 @@ print_insn_coprocessor (bfd_vma pc,
 	    continue;
 
 	  case SENTINEL_GENERIC_START:
-	    ARM_FEATURE_COPY (allowed_arches, private_data->features);
+	    allowed_arches = private_data->features;
 	    continue;
 
 	  default:

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