[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 14/15] target/riscv: rvb: add/sub with postfix zero-extend
From: |
Richard Henderson |
Subject: |
Re: [RFC 14/15] target/riscv: rvb: add/sub with postfix zero-extend |
Date: |
Thu, 19 Nov 2020 14:15:24 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 11/18/20 12:29 AM, frank.chang@sifive.com wrote:
> +addwu 0000101 .......... 000 ..... 0111011 @r
> +subwu 0100101 .......... 000 ..... 0111011 @r
> +addu_w 0000100 .......... 000 ..... 0111011 @r
>
> sbsetiw 0010100 .......... 001 ..... 0011011 @sh5
> sbclriw 0100100 .......... 001 ..... 0011011 @sh5
> @@ -116,3 +119,7 @@ sroiw 0010000 .......... 101 ..... 0011011 @sh5
> roriw 0110000 .......... 101 ..... 0011011 @sh5
> greviw 0110100 .......... 101 ..... 0011011 @sh5
> gorciw 0010100 .......... 101 ..... 0011011 @sh5
> +
> +addiwu ................. 100 ..... 0011011 @i
> +
> +slliu_w 000010 ........... 001 ..... 0011011 @sh
addwu, subwu, addiwu have been removed in the current draft.
> +static bool trans_slliu_w(DisasContext *ctx, arg_slliu_w *a)
> +{
> + TCGv source1;
> + source1 = tcg_temp_new();
> + gen_get_gpr(source1, a->rs1);
> +
> + tcg_gen_ext32u_tl(source1, source1);
> + tcg_gen_shli_tl(source1, source1, a->shamt);
> + gen_set_gpr(a->rd, source1);
if (a->shamt < 32) {
tcg_gen_deposit_z_i64(source1, source1, a->shamt, 32);
} else {
tcg_gen_shli_i64(source1, source1, a->shamt);
}
r~
- Re: [RFC 09/15] target/riscv: rvb: shift ones, (continued)
- [RFC 10/15] target/riscv: rvb: rotate (left/right), frank . chang, 2020/11/18
- [RFC 11/15] target/riscv: rvb: generalized reverse, frank . chang, 2020/11/18
- [RFC 12/15] target/riscv: rvb: generalized or-combine, frank . chang, 2020/11/18
- [RFC 13/15] target/riscv: rvb: address calculation, frank . chang, 2020/11/18
- [RFC 14/15] target/riscv: rvb: add/sub with postfix zero-extend, frank . chang, 2020/11/18
- Re: [RFC 14/15] target/riscv: rvb: add/sub with postfix zero-extend,
Richard Henderson <=
- [RFC 15/15] target/riscv: rvb: support and turn on B-extension from command line, frank . chang, 2020/11/18
- Re: [RFC 00/15] support subsets of bitmanip extension, Richard Henderson, 2020/11/19