diff mbox series

[05/18] dissect: fix processing of ASM statements

Message ID 20190927234322.5157-8-luc.vanoostenryck@gmail.com (mailing list archive)
State Mainlined, archived
Headers show
Series add missing expansion of ASM operands | expand

Commit Message

Luc Van Oostenryck Sept. 27, 2019, 11:43 p.m. UTC
Before commit 756731e9 ("use a specific struct for asm operands"),
ASM operands ('name', 'constraint, 'expression') were stored as a
sequence of 3 expressions. After, they had their own expression
type: EXPR_ASM_OPERAND.

However, dissect.c:do_asm_xputs() was not adapated for this change.

Fix this in do_asm_xputs() by processing the 'expression' of
every entries (instead of only processing every third entries).

CC: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 dissect.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/dissect.c b/dissect.c
index 5f067eb4c..b50c268b9 100644
--- a/dissect.c
+++ b/dissect.c
@@ -452,11 +452,7 @@  again:
 
 static void do_asm_xputs(usage_t mode, struct expression_list *xputs)
 {
-	int nr = 0;
-
-	DO_LIST(xputs, expr,
-		if (++nr % 3 == 0)
-			do_expression(U_W_AOF | mode, expr));
+	DO_LIST(xputs, op, do_expression(U_W_AOF | mode, op->expr));
 }
 
 static struct symbol *do_statement(usage_t mode, struct statement *stmt)