From 4e14c80f0c59afa111c7393d73ac47d44f3d8869 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 8 Sep 2018 20:07:14 +0200 Subject: [PATCH] Actually implement prefixes in the parser --- src/parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 75593e5..6286e1a 100644 --- a/src/parser.c +++ b/src/parser.c @@ -749,10 +749,15 @@ static int _operand(State * state) static int _prefix(State * state) /* WORD */ { + AsmArchPrefix const * prefix; + #ifdef DEBUG fprintf(stderr, "DEBUG: %s()\n", __func__); #endif - /* FIXME really implement */ + /* this is not supposed to fail */ + prefix = asmcode_get_arch_prefix_by_name(state->code, + token_get_string(state->token)); + state->call.prefix = prefix->name; return _parser_scan(state); }