From 4a2f5c39a29bdb4f626bfdb109753ca106a71a33 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sun, 14 Jun 2015 10:35:16 +0000 Subject: Handled properly the sign extension when extending values. git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@539 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a --- ChangeLog | 20 ++++++++ src/arch/arm/v7/opdefs/add_A884.d | 2 +- src/arch/arm/v7/opdefs/add_A889.d | 2 +- src/arch/arm/v7/opdefs/b_A8818.d | 12 ++--- src/arch/arm/v7/opdefs/bl_A8825.d | 4 +- src/arch/arm/v7/opdefs/sub_A88221.d | 2 +- src/arch/arm/v7/opdefs/sub_A88225.d | 2 +- tools/d2c/args.c | 92 +++++++++++++++++++++++++++++++------ tools/d2c/args.h | 6 +++ tools/d2c/d2c_gram.y | 4 +- tools/d2c/d2c_tok.l | 40 ++++------------ 11 files changed, 127 insertions(+), 59 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42e21d3..641a542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +15-06-14 Cyrille Bagard + + * src/arch/arm/v7/opdefs/add_A884.d: + * src/arch/arm/v7/opdefs/add_A889.d: + Fix a syntax mistake. + + * src/arch/arm/v7/opdefs/b_A8818.d: + * src/arch/arm/v7/opdefs/bl_A8825.d: + Handle properly the sign extension when extending values. + + * src/arch/arm/v7/opdefs/sub_A88221.d: + * src/arch/arm/v7/opdefs/sub_A88225.d: + Fix a syntax mistake. + + * tools/d2c/args.c: + * tools/d2c/args.h: + * tools/d2c/d2c_gram.y: + * tools/d2c/d2c_tok.l: + Allow to use binary or hex values as arguments. Clean the code. + 15-06-13 Cyrille Bagard * Makefile.am: diff --git a/src/arch/arm/v7/opdefs/add_A884.d b/src/arch/arm/v7/opdefs/add_A884.d index 90e1235..fb79567 100644 --- a/src/arch/arm/v7/opdefs/add_A884.d +++ b/src/arch/arm/v7/opdefs/add_A884.d @@ -101,7 +101,7 @@ Rd = Register(Rd) Rn = Register(Rn) - const = ZeroExtend((i:imm3:imm8, 12, 32) + const = ZeroExtend(i:imm3:imm8, 12, 32) } diff --git a/src/arch/arm/v7/opdefs/add_A889.d b/src/arch/arm/v7/opdefs/add_A889.d index 1f81776..3c9d432 100644 --- a/src/arch/arm/v7/opdefs/add_A889.d +++ b/src/arch/arm/v7/opdefs/add_A889.d @@ -101,7 +101,7 @@ Rd = Register(Rd) SP = Register(13) - const = ZeroExtend((i:imm3:imm8, 12, 32) + const = ZeroExtend(i:imm3:imm8, 12, 32) } diff --git a/src/arch/arm/v7/opdefs/b_A8818.d b/src/arch/arm/v7/opdefs/b_A8818.d index f06367b..ab5971f 100644 --- a/src/arch/arm/v7/opdefs/b_A8818.d +++ b/src/arch/arm/v7/opdefs/b_A8818.d @@ -25,14 +25,14 @@ @encoding(t1) { - @half 1 1 0 1 cond(4) top(1) imm8(7) + @half 1 1 0 1 cond(4) imm8(8) @syntax {c}