dissect: fix processing of ASM statements
diff mbox series

Message ID 20190126155543.53573-1-luc.vanoostenryck@gmail.com
State New
Headers show
Series
  • dissect: fix processing of ASM statements
Related show

Commit Message

Luc Van Oostenryck Jan. 26, 2019, 3:55 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(-)

Patch
diff mbox series

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)