diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-10-16 09:16:30 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-10-16 09:16:30 (GMT) |
commit | 570ae6b84ad1a17835da538ec3be9cf200cd1ebc (patch) | |
tree | 2f54ff9c5fb81efe97459e5c24cb8ff6449802e9 /tools | |
parent | 1aac673d39180b661f6a2dc5ff6335a1cfa0b0a7 (diff) |
Marked ARMv7 instructions which pop the PC register as return points.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/d2c/args/grammar.y | 7 | ||||
-rw-r--r-- | tools/d2c/args/manager.c | 3 | ||||
-rw-r--r-- | tools/d2c/args/manager.h | 1 | ||||
-rw-r--r-- | tools/d2c/args/tokens.l | 1 |
4 files changed, 9 insertions, 3 deletions
diff --git a/tools/d2c/args/grammar.y b/tools/d2c/args/grammar.y index f44a94b..41512a9 100644 --- a/tools/d2c/args/grammar.y +++ b/tools/d2c/args/grammar.y @@ -52,7 +52,7 @@ YY_DECL; %token NAME %token NUMBER BINVAL HEXVAL STRING %token COMMA COLON OP CP -%token NOT AND_LOG EOR EQ NE +%token NOT AND_LOG EOR LSHIFT EQ NE %token AND_BOOL OR_BOOL @@ -96,8 +96,9 @@ arg_expr : NAME { $$ = build_arg_expr_from_n arg_expr_un_op : NOT { $$ = CUO_NOT; } -arg_expr_bin_op : AND_LOG { $$ = CBO_AND; } - | EOR { $$ = CBO_EOR; } +arg_expr_bin_op : AND_LOG { $$ = CBO_AND; } + | EOR { $$ = CBO_EOR; } + | LSHIFT { $$ = CBO_LSHIFT; } arg_logical_expr : arg_expr AND_BOOL arg_expr { $$ = build_logical_arg_expr($1, $3, true); } | arg_logical_expr AND_BOOL arg_expr { $$ = build_logical_arg_expr($1, $3, true); } diff --git a/tools/d2c/args/manager.c b/tools/d2c/args/manager.c index 498dd5c..99c82ea 100644 --- a/tools/d2c/args/manager.c +++ b/tools/d2c/args/manager.c @@ -1171,6 +1171,9 @@ bool define_arg_expr(const arg_expr_t *expr, int fd, const coding_bits *bits, co case CBO_EOR: dprintf(fd, " ^ "); break; + case CBO_LSHIFT: + dprintf(fd, " << "); + break; default: result = false; break; diff --git a/tools/d2c/args/manager.h b/tools/d2c/args/manager.h index 111b6db..e57a08d 100644 --- a/tools/d2c/args/manager.h +++ b/tools/d2c/args/manager.h @@ -51,6 +51,7 @@ typedef enum _ConvBinaryOperation { CBO_AND, /* Et logique */ CBO_EOR, /* Ou exclusif (booléen) */ + CBO_LSHIFT, /* Décallage à gauche */ CBO_COUNT diff --git a/tools/d2c/args/tokens.l b/tools/d2c/args/tokens.l index 2a4ffb2..9851f62 100644 --- a/tools/d2c/args/tokens.l +++ b/tools/d2c/args/tokens.l @@ -59,6 +59,7 @@ "," { return COMMA; } ":" { return COLON; } "&" { return AND_LOG; } +"<<" { return LSHIFT; } "==" { return EQ; } "!=" { return NE; } |