[PATCH 4/5] asm-mem: does it output to memory?

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

 



If an asm statement have a memory output operand, it modifies memory.

Since this information is needed during memops simplification,
add this info directly in the corresponding instruction,
avoiding the need to scan the output operands list each time.

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

diff --git a/linearize.c b/linearize.c
index 4140b60caebd..0c9b0e59cc4b 100644
--- a/linearize.c
+++ b/linearize.c
@@ -2153,6 +2153,7 @@ static void add_asm_output_address(struct entrypoint *ep, struct instruction *in
 
 	pseudo = linearize_expression(ep, op->expr);
 	add_asm_rule(insn, &insn->asm_rules->outputs, op, pseudo);
+	insn->output_memory = 1;
 }
 
 static void add_asm_output(struct entrypoint *ep, struct instruction *insn, struct asm_operand *op)
diff --git a/linearize.h b/linearize.h
index fb51327684bb..cf0cf066a8e5 100644
--- a/linearize.h
+++ b/linearize.h
@@ -151,6 +151,7 @@ struct instruction {
 			const char *string;
 			struct asm_rules *asm_rules;
 			int clobber_memory:1;
+			int output_memory:1;
 		};
 	};
 };
-- 
2.30.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