[PATCH 1/8] move DEF_OPCODE() to header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



as it will be needed before it was defined in simplify.c and
can be useful in other files too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 linearize.h | 8 ++++++++
 simplify.c  | 7 -------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/linearize.h b/linearize.h
index 413bf0132..66ca37667 100644
--- a/linearize.h
+++ b/linearize.h
@@ -264,6 +264,14 @@ enum opcode {
 	OP_LAST,			/* keep this one last! */
 };
 
+//
+// return the opcode of the instruction defining ``SRC`` if existing
+// and OP_BADOP if not. It also assigns the defining instruction
+// to ``DEF``.
+#define DEF_OPCODE(DEF, SRC)	\
+	(((SRC)->type == PSEUDO_REG && (DEF = (SRC)->def)) ? DEF->opcode : OP_BADOP)
+
+
 struct basic_block_list;
 struct instruction_list;
 
diff --git a/simplify.c b/simplify.c
index 52910876c..e9995a546 100644
--- a/simplify.c
+++ b/simplify.c
@@ -417,13 +417,6 @@ static inline int def_opcode(pseudo_t p)
 	return p->def->opcode;
 }
 
-//
-// return the opcode of the instruction defining ``SRC`` if existing
-// and OP_BADOP if not. It also assigns the defining instruction
-// to ``DEF``.
-#define DEF_OPCODE(DEF, SRC)	\
-	(((SRC)->type == PSEUDO_REG && (DEF = (SRC)->def)) ? DEF->opcode : OP_BADOP)
-
 static unsigned int value_size(long long value)
 {
 	value >>= 8;
-- 
2.18.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux