[PATCH 5/5] asm-mem: teach dominates() about OP_ASM

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

 



The function dominates() needs to know if an OP_ASM instruction
may modify.

Use the information now available in the instruction to return
the answer.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 flow.c                           | 6 ++++++
 validation/mem2reg/asm-reload0.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/flow.c b/flow.c
index 5751ce756518..5d63018798d6 100644
--- a/flow.c
+++ b/flow.c
@@ -495,6 +495,12 @@ int dominates(pseudo_t pseudo, struct instruction *insn, struct instruction *dom
 		return local ? 0 : -1;
 	case OP_LOAD: case OP_STORE:
 		break;
+	case OP_ASM:
+		if (dom->clobber_memory)
+			return -1;
+		if (dom->output_memory)
+			return -1;
+		return 0;
 	default:
 		return 0;
 	}
diff --git a/validation/mem2reg/asm-reload0.c b/validation/mem2reg/asm-reload0.c
index c9e297dde428..ce1829e02724 100644
--- a/validation/mem2reg/asm-reload0.c
+++ b/validation/mem2reg/asm-reload0.c
@@ -8,7 +8,6 @@ static int asm_reload(void)
 /*
  * check-name: asm-reload0
  * check-command: test-linearize $file
- * check-known-to-fail
  *
  * check-output-ignore
  * check-output-contains: load\\.
-- 
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