Revision 92cdfaeb

b/target-arm/translate.c
4804 4804

  
4805 4805
                shift = shift - (1 << (size + 3));
4806 4806
                size++;
4807
                switch (size) {
4808
                case 1:
4809
                    imm = (uint16_t)shift;
4810
                    imm |= imm << 16;
4811
                    tmp2 = tcg_const_i32(imm);
4812
                    TCGV_UNUSED_I64(tmp64);
4813
                    break;
4814
                case 2:
4815
                    imm = (uint32_t)shift;
4816
                    tmp2 = tcg_const_i32(imm);
4817
                    TCGV_UNUSED_I64(tmp64);
4818
                    break;
4819
                case 3:
4807
                if (size == 3) {
4820 4808
                    tmp64 = tcg_const_i64(shift);
4821
                    TCGV_UNUSED(tmp2);
4822
                    break;
4823
                default:
4824
                    abort();
4825
                }
4826

  
4827
                for (pass = 0; pass < 2; pass++) {
4828
                    if (size == 3) {
4829
                        neon_load_reg64(cpu_V0, rm + pass);
4809
                    neon_load_reg64(cpu_V0, rm);
4810
                    neon_load_reg64(cpu_V1, rm + 1);
4811
                    for (pass = 0; pass < 2; pass++) {
4812
                        TCGv_i64 in;
4813
                        if (pass == 0) {
4814
                            in = cpu_V0;
4815
                        } else {
4816
                            in = cpu_V1;
4817
                        }
4830 4818
                        if (q) {
4831 4819
                            if (input_unsigned) {
4832
                                gen_helper_neon_rshl_u64(cpu_V0, cpu_V0,
4833
                                                         tmp64);
4820
                                gen_helper_neon_rshl_u64(cpu_V0, in, tmp64);
4834 4821
                            } else {
4835
                                gen_helper_neon_rshl_s64(cpu_V0, cpu_V0,
4836
                                                         tmp64);
4822
                                gen_helper_neon_rshl_s64(cpu_V0, in, tmp64);
4837 4823
                            }
4838 4824
                        } else {
4839 4825
                            if (input_unsigned) {
4840
                                gen_helper_neon_shl_u64(cpu_V0, cpu_V0,
4841
                                                        tmp64);
4826
                                gen_helper_neon_shl_u64(cpu_V0, in, tmp64);
4842 4827
                            } else {
4843
                                gen_helper_neon_shl_s64(cpu_V0, cpu_V0,
4844
                                                        tmp64);
4828
                                gen_helper_neon_shl_s64(cpu_V0, in, tmp64);
4845 4829
                            }
4846 4830
                        }
4831
                        tmp = new_tmp();
4832
                        gen_neon_narrow_op(op == 8, u, size - 1, tmp, cpu_V0);
4833
                        neon_store_reg(rd, pass, tmp);
4834
                    } /* for pass */
4835
                    tcg_temp_free_i64(tmp64);
4836
                } else {
4837
                    if (size == 1) {
4838
                        imm = (uint16_t)shift;
4839
                        imm |= imm << 16;
4847 4840
                    } else {
4848
                        tmp = neon_load_reg(rm + pass, 0);
4841
                        /* size == 2 */
4842
                        imm = (uint32_t)shift;
4843
                    }
4844
                    tmp2 = tcg_const_i32(imm);
4845
                    tmp4 = neon_load_reg(rm + 1, 0);
4846
                    tmp5 = neon_load_reg(rm + 1, 1);
4847
                    for (pass = 0; pass < 2; pass++) {
4848
                        if (pass == 0) {
4849
                            tmp = neon_load_reg(rm, 0);
4850
                        } else {
4851
                            tmp = tmp4;
4852
                        }
4849 4853
                        gen_neon_shift_narrow(size, tmp, tmp2, q,
4850 4854
                                              input_unsigned);
4851
                        tmp3 = neon_load_reg(rm + pass, 1);
4855
                        if (pass == 0) {
4856
                            tmp3 = neon_load_reg(rm, 1);
4857
                        } else {
4858
                            tmp3 = tmp5;
4859
                        }
4852 4860
                        gen_neon_shift_narrow(size, tmp3, tmp2, q,
4853 4861
                                              input_unsigned);
4854 4862
                        tcg_gen_concat_i32_i64(cpu_V0, tmp, tmp3);
4855 4863
                        dead_tmp(tmp);
4856 4864
                        dead_tmp(tmp3);
4857
                    }
4858
                    tmp = new_tmp();
4859
                    gen_neon_narrow_op(op == 8, u, size - 1, tmp, cpu_V0);
4860
                    neon_store_reg(rd, pass, tmp);
4861
                } /* for pass */
4862
                if (size == 3) {
4863
                    tcg_temp_free_i64(tmp64);
4864
                } else {
4865
                        tmp = new_tmp();
4866
                        gen_neon_narrow_op(op == 8, u, size - 1, tmp, cpu_V0);
4867
                        neon_store_reg(rd, pass, tmp);
4868
                    } /* for pass */
4865 4869
                    tcg_temp_free_i32(tmp2);
4866 4870
                }
4867 4871
            } else if (op == 10) {

Also available in: Unified diff