diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-09-22 20:59:00 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-09-22 20:59:00 +0000 |
commit | 73a63ccf2f0f856eebf7fee67309fe2a276c39d6 (patch) | |
tree | 0ef34ab3fbb1c9e11d03994bf9ff5de520987243 /gas/config/bfin-parse.y | |
parent | 59a82d2333aec12b174ad37f2f385afbfe06cf45 (diff) | |
download | gdb-73a63ccf2f0f856eebf7fee67309fe2a276c39d6.zip gdb-73a63ccf2f0f856eebf7fee67309fe2a276c39d6.tar.gz gdb-73a63ccf2f0f856eebf7fee67309fe2a276c39d6.tar.bz2 |
opcodes/gas: blackfin: support OUTC debug insn
The disassembler has partial (but incomplete/broken) support already for
the pseudo debug insn OUTC, so let's fix it up and finish it. And now
that the disassembler can handle it, make sure our assembler can output
it too.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gas/config/bfin-parse.y')
-rw-r--r-- | gas/config/bfin-parse.y | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y index 747442c..f8bb744 100644 --- a/gas/config/bfin-parse.y +++ b/gas/config/bfin-parse.y @@ -212,6 +212,7 @@ extern int yylex (void); #define uimm5(x) EXPR_VALUE (x) #define imm6(x) EXPR_VALUE (x) #define imm7(x) EXPR_VALUE (x) +#define uimm8(x) EXPR_VALUE (x) #define imm16(x) EXPR_VALUE (x) #define uimm16s4(x) ((EXPR_VALUE (x)) >> 2) #define uimm16(x) EXPR_VALUE (x) @@ -3618,6 +3619,21 @@ asm_1: $$ = bfin_gen_pseudodbg_assert (2, &$3, uimm16 ($5)); } + | OUTC expr + { + if (!IS_UIMM ($2, 8)) + return yyerror ("Constant out of range"); + notethat ("psedodbg_assert: OUTC uimm8\n"); + $$ = bfin_gen_pseudochr (uimm8 ($2)); + } + + | OUTC REG + { + if (!IS_DREG ($2)) + return yyerror ("Dregs expected"); + notethat ("psedodbg_assert: OUTC dreg\n"); + $$ = bfin_gen_pseudodbg (2, $2.regno & CODE_MASK, 0); + } ; |