Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/arm/assembler-arm.cc

Issue 1044793002: [turbofan] Add backend support for float32 operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MachineOperator unit tests. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 int vd, d; 2938 int vd, d;
2939 dst.split_code(&vd, &d); 2939 dst.split_code(&vd, &d);
2940 int vm, m; 2940 int vm, m;
2941 src.split_code(&vm, &m); 2941 src.split_code(&vm, &m);
2942 2942
2943 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | B6 | 2943 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | B6 |
2944 m*B5 | vm); 2944 m*B5 | vm);
2945 } 2945 }
2946 2946
2947 2947
2948 void Assembler::vneg(const SwVfpRegister dst, const SwVfpRegister src,
2949 const Condition cond) {
2950 // Instruction details available in ARM DDI 0406C.b, A8-968.
2951 // cond(31-28) | 11101(27-23) | D(22) | 11(21-20) | 0001(19-16) | Vd(15-12) |
2952 // 101(11-9) | sz=0(8) | 0(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
2953 int vd, d;
2954 dst.split_code(&vd, &d);
2955 int vm, m;
2956 src.split_code(&vm, &m);
2957
2958 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | B16 | vd * B12 | 0x5 * B9 |
2959 B6 | m * B5 | vm);
2960 }
2961
2962
2948 void Assembler::vabs(const DwVfpRegister dst, 2963 void Assembler::vabs(const DwVfpRegister dst,
2949 const DwVfpRegister src, 2964 const DwVfpRegister src,
2950 const Condition cond) { 2965 const Condition cond) {
2951 // Instruction details available in ARM DDI 0406C.b, A8-524. 2966 // Instruction details available in ARM DDI 0406C.b, A8-524.
2952 // cond(31-28) | 11101(27-23) | D(22) | 11(21-20) | 0000(19-16) | Vd(15-12) | 2967 // cond(31-28) | 11101(27-23) | D(22) | 11(21-20) | 0000(19-16) | Vd(15-12) |
2953 // 101(11-9) | sz=1(8) | 1(7) | 1(6) | M(5) | 0(4) | Vm(3-0) 2968 // 101(11-9) | sz=1(8) | 1(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
2954 int vd, d; 2969 int vd, d;
2955 dst.split_code(&vd, &d); 2970 dst.split_code(&vd, &d);
2956 int vm, m; 2971 int vm, m;
2957 src.split_code(&vm, &m); 2972 src.split_code(&vm, &m);
2958 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | vd*B12 | 0x5*B9 | B8 | B7 | B6 | 2973 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | vd*B12 | 0x5*B9 | B8 | B7 | B6 |
2959 m*B5 | vm); 2974 m*B5 | vm);
2960 } 2975 }
2961 2976
2962 2977
2978 void Assembler::vabs(const SwVfpRegister dst, const SwVfpRegister src,
2979 const Condition cond) {
2980 // Instruction details available in ARM DDI 0406C.b, A8-524.
2981 // cond(31-28) | 11101(27-23) | D(22) | 11(21-20) | 0000(19-16) | Vd(15-12) |
2982 // 101(11-9) | sz=0(8) | 1(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
2983 int vd, d;
2984 dst.split_code(&vd, &d);
2985 int vm, m;
2986 src.split_code(&vm, &m);
2987 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | vd * B12 | 0x5 * B9 | B7 | B6 |
2988 m * B5 | vm);
2989 }
2990
2991
2963 void Assembler::vadd(const DwVfpRegister dst, 2992 void Assembler::vadd(const DwVfpRegister dst,
2964 const DwVfpRegister src1, 2993 const DwVfpRegister src1,
2965 const DwVfpRegister src2, 2994 const DwVfpRegister src2,
2966 const Condition cond) { 2995 const Condition cond) {
2967 // Dd = vadd(Dn, Dm) double precision floating point addition. 2996 // Dd = vadd(Dn, Dm) double precision floating point addition.
2968 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 2997 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
2969 // Instruction details available in ARM DDI 0406C.b, A8-830. 2998 // Instruction details available in ARM DDI 0406C.b, A8-830.
2970 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) | 2999 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) |
2971 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0) 3000 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
2972 int vd, d; 3001 int vd, d;
2973 dst.split_code(&vd, &d); 3002 dst.split_code(&vd, &d);
2974 int vn, n; 3003 int vn, n;
2975 src1.split_code(&vn, &n); 3004 src1.split_code(&vn, &n);
2976 int vm, m; 3005 int vm, m;
2977 src2.split_code(&vm, &m); 3006 src2.split_code(&vm, &m);
2978 emit(cond | 0x1C*B23 | d*B22 | 0x3*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 | 3007 emit(cond | 0x1C*B23 | d*B22 | 0x3*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 |
2979 n*B7 | m*B5 | vm); 3008 n*B7 | m*B5 | vm);
2980 } 3009 }
2981 3010
2982 3011
3012 void Assembler::vadd(const SwVfpRegister dst, const SwVfpRegister src1,
3013 const SwVfpRegister src2, const Condition cond) {
3014 // Sd = vadd(Sn, Sm) single precision floating point addition.
3015 // Sd = D:Vd; Sm=M:Vm; Sn=N:Vm.
3016 // Instruction details available in ARM DDI 0406C.b, A8-830.
3017 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) |
3018 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
3019 int vd, d;
3020 dst.split_code(&vd, &d);
3021 int vn, n;
3022 src1.split_code(&vn, &n);
3023 int vm, m;
3024 src2.split_code(&vm, &m);
3025 emit(cond | 0x1C * B23 | d * B22 | 0x3 * B20 | vn * B16 | vd * B12 |
3026 0x5 * B9 | n * B7 | m * B5 | vm);
3027 }
3028
3029
2983 void Assembler::vsub(const DwVfpRegister dst, 3030 void Assembler::vsub(const DwVfpRegister dst,
2984 const DwVfpRegister src1, 3031 const DwVfpRegister src1,
2985 const DwVfpRegister src2, 3032 const DwVfpRegister src2,
2986 const Condition cond) { 3033 const Condition cond) {
2987 // Dd = vsub(Dn, Dm) double precision floating point subtraction. 3034 // Dd = vsub(Dn, Dm) double precision floating point subtraction.
2988 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 3035 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
2989 // Instruction details available in ARM DDI 0406C.b, A8-1086. 3036 // Instruction details available in ARM DDI 0406C.b, A8-1086.
2990 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) | 3037 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) |
2991 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 1(6) | M(5) | 0(4) | Vm(3-0) 3038 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
2992 int vd, d; 3039 int vd, d;
2993 dst.split_code(&vd, &d); 3040 dst.split_code(&vd, &d);
2994 int vn, n; 3041 int vn, n;
2995 src1.split_code(&vn, &n); 3042 src1.split_code(&vn, &n);
2996 int vm, m; 3043 int vm, m;
2997 src2.split_code(&vm, &m); 3044 src2.split_code(&vm, &m);
2998 emit(cond | 0x1C*B23 | d*B22 | 0x3*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 | 3045 emit(cond | 0x1C*B23 | d*B22 | 0x3*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 |
2999 n*B7 | B6 | m*B5 | vm); 3046 n*B7 | B6 | m*B5 | vm);
3000 } 3047 }
3001 3048
3002 3049
3050 void Assembler::vsub(const SwVfpRegister dst, const SwVfpRegister src1,
3051 const SwVfpRegister src2, const Condition cond) {
3052 // Sd = vsub(Sn, Sm) single precision floating point subtraction.
3053 // Sd = D:Vd; Sm=M:Vm; Sn=N:Vm.
3054 // Instruction details available in ARM DDI 0406C.b, A8-1086.
3055 // cond(31-28) | 11100(27-23)| D(22) | 11(21-20) | Vn(19-16) |
3056 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
3057 int vd, d;
3058 dst.split_code(&vd, &d);
3059 int vn, n;
3060 src1.split_code(&vn, &n);
3061 int vm, m;
3062 src2.split_code(&vm, &m);
3063 emit(cond | 0x1C * B23 | d * B22 | 0x3 * B20 | vn * B16 | vd * B12 |
3064 0x5 * B9 | n * B7 | B6 | m * B5 | vm);
3065 }
3066
3067
3003 void Assembler::vmul(const DwVfpRegister dst, 3068 void Assembler::vmul(const DwVfpRegister dst,
3004 const DwVfpRegister src1, 3069 const DwVfpRegister src1,
3005 const DwVfpRegister src2, 3070 const DwVfpRegister src2,
3006 const Condition cond) { 3071 const Condition cond) {
3007 // Dd = vmul(Dn, Dm) double precision floating point multiplication. 3072 // Dd = vmul(Dn, Dm) double precision floating point multiplication.
3008 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 3073 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
3009 // Instruction details available in ARM DDI 0406C.b, A8-960. 3074 // Instruction details available in ARM DDI 0406C.b, A8-960.
3010 // cond(31-28) | 11100(27-23)| D(22) | 10(21-20) | Vn(19-16) | 3075 // cond(31-28) | 11100(27-23)| D(22) | 10(21-20) | Vn(19-16) |
3011 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0) 3076 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
3012 int vd, d; 3077 int vd, d;
3013 dst.split_code(&vd, &d); 3078 dst.split_code(&vd, &d);
3014 int vn, n; 3079 int vn, n;
3015 src1.split_code(&vn, &n); 3080 src1.split_code(&vn, &n);
3016 int vm, m; 3081 int vm, m;
3017 src2.split_code(&vm, &m); 3082 src2.split_code(&vm, &m);
3018 emit(cond | 0x1C*B23 | d*B22 | 0x2*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 | 3083 emit(cond | 0x1C*B23 | d*B22 | 0x2*B20 | vn*B16 | vd*B12 | 0x5*B9 | B8 |
3019 n*B7 | m*B5 | vm); 3084 n*B7 | m*B5 | vm);
3020 } 3085 }
3021 3086
3022 3087
3088 void Assembler::vmul(const SwVfpRegister dst, const SwVfpRegister src1,
3089 const SwVfpRegister src2, const Condition cond) {
3090 // Sd = vmul(Sn, Sm) single precision floating point multiplication.
3091 // Sd = D:Vd; Sm=M:Vm; Sn=N:Vm.
3092 // Instruction details available in ARM DDI 0406C.b, A8-960.
3093 // cond(31-28) | 11100(27-23)| D(22) | 10(21-20) | Vn(19-16) |
3094 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
3095 int vd, d;
3096 dst.split_code(&vd, &d);
3097 int vn, n;
3098 src1.split_code(&vn, &n);
3099 int vm, m;
3100 src2.split_code(&vm, &m);
3101 emit(cond | 0x1C * B23 | d * B22 | 0x2 * B20 | vn * B16 | vd * B12 |
3102 0x5 * B9 | n * B7 | m * B5 | vm);
3103 }
3104
3105
3023 void Assembler::vmla(const DwVfpRegister dst, 3106 void Assembler::vmla(const DwVfpRegister dst,
3024 const DwVfpRegister src1, 3107 const DwVfpRegister src1,
3025 const DwVfpRegister src2, 3108 const DwVfpRegister src2,
3026 const Condition cond) { 3109 const Condition cond) {
3027 // Instruction details available in ARM DDI 0406C.b, A8-932. 3110 // Instruction details available in ARM DDI 0406C.b, A8-932.
3028 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) | 3111 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) |
3029 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | op=0(6) | M(5) | 0(4) | Vm(3-0) 3112 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | op=0(6) | M(5) | 0(4) | Vm(3-0)
3030 int vd, d; 3113 int vd, d;
3031 dst.split_code(&vd, &d); 3114 dst.split_code(&vd, &d);
3032 int vn, n; 3115 int vn, n;
3033 src1.split_code(&vn, &n); 3116 src1.split_code(&vn, &n);
3034 int vm, m; 3117 int vm, m;
3035 src2.split_code(&vm, &m); 3118 src2.split_code(&vm, &m);
3036 emit(cond | 0x1C*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | m*B5 | 3119 emit(cond | 0x1C*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | m*B5 |
3037 vm); 3120 vm);
3038 } 3121 }
3039 3122
3040 3123
3124 void Assembler::vmla(const SwVfpRegister dst, const SwVfpRegister src1,
3125 const SwVfpRegister src2, const Condition cond) {
3126 // Instruction details available in ARM DDI 0406C.b, A8-932.
3127 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) |
3128 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | op=0(6) | M(5) | 0(4) | Vm(3-0)
3129 int vd, d;
3130 dst.split_code(&vd, &d);
3131 int vn, n;
3132 src1.split_code(&vn, &n);
3133 int vm, m;
3134 src2.split_code(&vm, &m);
3135 emit(cond | 0x1C * B23 | d * B22 | vn * B16 | vd * B12 | 0x5 * B9 | n * B7 |
3136 m * B5 | vm);
3137 }
3138
3139
3041 void Assembler::vmls(const DwVfpRegister dst, 3140 void Assembler::vmls(const DwVfpRegister dst,
3042 const DwVfpRegister src1, 3141 const DwVfpRegister src1,
3043 const DwVfpRegister src2, 3142 const DwVfpRegister src2,
3044 const Condition cond) { 3143 const Condition cond) {
3045 // Instruction details available in ARM DDI 0406C.b, A8-932. 3144 // Instruction details available in ARM DDI 0406C.b, A8-932.
3046 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) | 3145 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) |
3047 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | op=1(6) | M(5) | 0(4) | Vm(3-0) 3146 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | op=1(6) | M(5) | 0(4) | Vm(3-0)
3048 int vd, d; 3147 int vd, d;
3049 dst.split_code(&vd, &d); 3148 dst.split_code(&vd, &d);
3050 int vn, n; 3149 int vn, n;
3051 src1.split_code(&vn, &n); 3150 src1.split_code(&vn, &n);
3052 int vm, m; 3151 int vm, m;
3053 src2.split_code(&vm, &m); 3152 src2.split_code(&vm, &m);
3054 emit(cond | 0x1C*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | B6 | 3153 emit(cond | 0x1C*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | B6 |
3055 m*B5 | vm); 3154 m*B5 | vm);
3056 } 3155 }
3057 3156
3058 3157
3158 void Assembler::vmls(const SwVfpRegister dst, const SwVfpRegister src1,
3159 const SwVfpRegister src2, const Condition cond) {
3160 // Instruction details available in ARM DDI 0406C.b, A8-932.
3161 // cond(31-28) | 11100(27-23) | D(22) | 00(21-20) | Vn(19-16) |
3162 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | op=1(6) | M(5) | 0(4) | Vm(3-0)
3163 int vd, d;
3164 dst.split_code(&vd, &d);
3165 int vn, n;
3166 src1.split_code(&vn, &n);
3167 int vm, m;
3168 src2.split_code(&vm, &m);
3169 emit(cond | 0x1C * B23 | d * B22 | vn * B16 | vd * B12 | 0x5 * B9 | n * B7 |
3170 B6 | m * B5 | vm);
3171 }
3172
3173
3059 void Assembler::vdiv(const DwVfpRegister dst, 3174 void Assembler::vdiv(const DwVfpRegister dst,
3060 const DwVfpRegister src1, 3175 const DwVfpRegister src1,
3061 const DwVfpRegister src2, 3176 const DwVfpRegister src2,
3062 const Condition cond) { 3177 const Condition cond) {
3063 // Dd = vdiv(Dn, Dm) double precision floating point division. 3178 // Dd = vdiv(Dn, Dm) double precision floating point division.
3064 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 3179 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
3065 // Instruction details available in ARM DDI 0406C.b, A8-882. 3180 // Instruction details available in ARM DDI 0406C.b, A8-882.
3066 // cond(31-28) | 11101(27-23)| D(22) | 00(21-20) | Vn(19-16) | 3181 // cond(31-28) | 11101(27-23)| D(22) | 00(21-20) | Vn(19-16) |
3067 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0) 3182 // Vd(15-12) | 101(11-9) | sz=1(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
3068 int vd, d; 3183 int vd, d;
3069 dst.split_code(&vd, &d); 3184 dst.split_code(&vd, &d);
3070 int vn, n; 3185 int vn, n;
3071 src1.split_code(&vn, &n); 3186 src1.split_code(&vn, &n);
3072 int vm, m; 3187 int vm, m;
3073 src2.split_code(&vm, &m); 3188 src2.split_code(&vm, &m);
3074 emit(cond | 0x1D*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | m*B5 | 3189 emit(cond | 0x1D*B23 | d*B22 | vn*B16 | vd*B12 | 0x5*B9 | B8 | n*B7 | m*B5 |
3075 vm); 3190 vm);
3076 } 3191 }
3077 3192
3078 3193
3194 void Assembler::vdiv(const SwVfpRegister dst, const SwVfpRegister src1,
3195 const SwVfpRegister src2, const Condition cond) {
3196 // Sd = vdiv(Sn, Sm) single precision floating point division.
3197 // Sd = D:Vd; Sm=M:Vm; Sn=N:Vm.
3198 // Instruction details available in ARM DDI 0406C.b, A8-882.
3199 // cond(31-28) | 11101(27-23)| D(22) | 00(21-20) | Vn(19-16) |
3200 // Vd(15-12) | 101(11-9) | sz=0(8) | N(7) | 0(6) | M(5) | 0(4) | Vm(3-0)
3201 int vd, d;
3202 dst.split_code(&vd, &d);
3203 int vn, n;
3204 src1.split_code(&vn, &n);
3205 int vm, m;
3206 src2.split_code(&vm, &m);
3207 emit(cond | 0x1D * B23 | d * B22 | vn * B16 | vd * B12 | 0x5 * B9 | n * B7 |
3208 m * B5 | vm);
3209 }
3210
3211
3079 void Assembler::vcmp(const DwVfpRegister src1, 3212 void Assembler::vcmp(const DwVfpRegister src1,
3080 const DwVfpRegister src2, 3213 const DwVfpRegister src2,
3081 const Condition cond) { 3214 const Condition cond) {
3082 // vcmp(Dd, Dm) double precision floating point comparison. 3215 // vcmp(Dd, Dm) double precision floating point comparison.
3083 // Instruction details available in ARM DDI 0406C.b, A8-864. 3216 // Instruction details available in ARM DDI 0406C.b, A8-864.
3084 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0100(19-16) | 3217 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0100(19-16) |
3085 // Vd(15-12) | 101(11-9) | sz=1(8) | E=0(7) | 1(6) | M(5) | 0(4) | Vm(3-0) 3218 // Vd(15-12) | 101(11-9) | sz=1(8) | E=0(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
3086 int vd, d; 3219 int vd, d;
3087 src1.split_code(&vd, &d); 3220 src1.split_code(&vd, &d);
3088 int vm, m; 3221 int vm, m;
3089 src2.split_code(&vm, &m); 3222 src2.split_code(&vm, &m);
3090 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | 0x4*B16 | vd*B12 | 0x5*B9 | B8 | B6 | 3223 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | 0x4*B16 | vd*B12 | 0x5*B9 | B8 | B6 |
3091 m*B5 | vm); 3224 m*B5 | vm);
3092 } 3225 }
3093 3226
3094 3227
3228 void Assembler::vcmp(const SwVfpRegister src1, const SwVfpRegister src2,
3229 const Condition cond) {
3230 // vcmp(Sd, Sm) single precision floating point comparison.
3231 // Instruction details available in ARM DDI 0406C.b, A8-864.
3232 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0100(19-16) |
3233 // Vd(15-12) | 101(11-9) | sz=0(8) | E=0(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
3234 int vd, d;
3235 src1.split_code(&vd, &d);
3236 int vm, m;
3237 src2.split_code(&vm, &m);
3238 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | 0x4 * B16 | vd * B12 |
3239 0x5 * B9 | B6 | m * B5 | vm);
3240 }
3241
3242
3095 void Assembler::vcmp(const DwVfpRegister src1, 3243 void Assembler::vcmp(const DwVfpRegister src1,
3096 const double src2, 3244 const double src2,
3097 const Condition cond) { 3245 const Condition cond) {
3098 // vcmp(Dd, #0.0) double precision floating point comparison. 3246 // vcmp(Dd, #0.0) double precision floating point comparison.
3099 // Instruction details available in ARM DDI 0406C.b, A8-864. 3247 // Instruction details available in ARM DDI 0406C.b, A8-864.
3100 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0101(19-16) | 3248 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0101(19-16) |
3101 // Vd(15-12) | 101(11-9) | sz=1(8) | E=0(7) | 1(6) | 0(5) | 0(4) | 0000(3-0) 3249 // Vd(15-12) | 101(11-9) | sz=1(8) | E=0(7) | 1(6) | 0(5) | 0(4) | 0000(3-0)
3102 DCHECK(src2 == 0.0); 3250 DCHECK(src2 == 0.0);
3103 int vd, d; 3251 int vd, d;
3104 src1.split_code(&vd, &d); 3252 src1.split_code(&vd, &d);
3105 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | 0x5*B16 | vd*B12 | 0x5*B9 | B8 | B6); 3253 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | 0x5*B16 | vd*B12 | 0x5*B9 | B8 | B6);
3106 } 3254 }
3107 3255
3108 3256
3109 void Assembler::vmsr(Register dst, Condition cond) { 3257 void Assembler::vcmp(const SwVfpRegister src1, const float src2,
3110 // Instruction details available in ARM DDI 0406A, A8-652. 3258 const Condition cond) {
3111 // cond(31-28) | 1110 (27-24) | 1110(23-20)| 0001 (19-16) | 3259 // vcmp(Sd, #0.0) single precision floating point comparison.
3112 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0) 3260 // Instruction details available in ARM DDI 0406C.b, A8-864.
3113 emit(cond | 0xE*B24 | 0xE*B20 | B16 | 3261 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0101(19-16) |
3114 dst.code()*B12 | 0xA*B8 | B4); 3262 // Vd(15-12) | 101(11-9) | sz=0(8) | E=0(7) | 1(6) | 0(5) | 0(4) | 0000(3-0)
3263 DCHECK(src2 == 0.0);
3264 int vd, d;
3265 src1.split_code(&vd, &d);
3266 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | 0x5 * B16 | vd * B12 |
3267 0x5 * B9 | B6);
3115 } 3268 }
3116 3269
3117 3270
3118 void Assembler::vmrs(Register dst, Condition cond) {
3119 // Instruction details available in ARM DDI 0406A, A8-652.
3120 // cond(31-28) | 1110 (27-24) | 1111(23-20)| 0001 (19-16) |
3121 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0)
3122 emit(cond | 0xE*B24 | 0xF*B20 | B16 |
3123 dst.code()*B12 | 0xA*B8 | B4);
3124 }
3125
3126
3127 void Assembler::vsqrt(const DwVfpRegister dst, 3271 void Assembler::vsqrt(const DwVfpRegister dst,
3128 const DwVfpRegister src, 3272 const DwVfpRegister src,
3129 const Condition cond) { 3273 const Condition cond) {
3130 // Instruction details available in ARM DDI 0406C.b, A8-1058. 3274 // Instruction details available in ARM DDI 0406C.b, A8-1058.
3131 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0001(19-16) | 3275 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0001(19-16) |
3132 // Vd(15-12) | 101(11-9) | sz=1(8) | 11(7-6) | M(5) | 0(4) | Vm(3-0) 3276 // Vd(15-12) | 101(11-9) | sz=1(8) | 11(7-6) | M(5) | 0(4) | Vm(3-0)
3133 int vd, d; 3277 int vd, d;
3134 dst.split_code(&vd, &d); 3278 dst.split_code(&vd, &d);
3135 int vm, m; 3279 int vm, m;
3136 src.split_code(&vm, &m); 3280 src.split_code(&vm, &m);
3137 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | 0x3*B6 | 3281 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | 0x3*B6 |
3138 m*B5 | vm); 3282 m*B5 | vm);
3139 } 3283 }
3140 3284
3141 3285
3286 void Assembler::vsqrt(const SwVfpRegister dst, const SwVfpRegister src,
3287 const Condition cond) {
3288 // Instruction details available in ARM DDI 0406C.b, A8-1058.
3289 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0001(19-16) |
3290 // Vd(15-12) | 101(11-9) | sz=0(8) | 11(7-6) | M(5) | 0(4) | Vm(3-0)
3291 int vd, d;
3292 dst.split_code(&vd, &d);
3293 int vm, m;
3294 src.split_code(&vm, &m);
3295 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | B16 | vd * B12 | 0x5 * B9 |
3296 0x3 * B6 | m * B5 | vm);
3297 }
3298
3299
3300 void Assembler::vmsr(Register dst, Condition cond) {
3301 // Instruction details available in ARM DDI 0406A, A8-652.
3302 // cond(31-28) | 1110 (27-24) | 1110(23-20)| 0001 (19-16) |
3303 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0)
3304 emit(cond | 0xE * B24 | 0xE * B20 | B16 | dst.code() * B12 | 0xA * B8 | B4);
3305 }
3306
3307
3308 void Assembler::vmrs(Register dst, Condition cond) {
3309 // Instruction details available in ARM DDI 0406A, A8-652.
3310 // cond(31-28) | 1110 (27-24) | 1111(23-20)| 0001 (19-16) |
3311 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0)
3312 emit(cond | 0xE * B24 | 0xF * B20 | B16 | dst.code() * B12 | 0xA * B8 | B4);
3313 }
3314
3315
3142 void Assembler::vrinta(const DwVfpRegister dst, const DwVfpRegister src) { 3316 void Assembler::vrinta(const DwVfpRegister dst, const DwVfpRegister src) {
3143 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) | 3317 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) |
3144 // 10(19-18) | RM=00(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) | 3318 // 10(19-18) | RM=00(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) |
3145 // M(5) | 0(4) | Vm(3-0) 3319 // M(5) | 0(4) | Vm(3-0)
3146 DCHECK(CpuFeatures::IsSupported(ARMv8)); 3320 DCHECK(CpuFeatures::IsSupported(ARMv8));
3147 int vd, d; 3321 int vd, d;
3148 dst.split_code(&vd, &d); 3322 dst.split_code(&vd, &d);
3149 int vm, m; 3323 int vm, m;
3150 src.split_code(&vm, &m); 3324 src.split_code(&vm, &m);
3151 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | vd * B12 | 3325 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | vd * B12 |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3985 assm->instr_at_put( 4159 assm->instr_at_put(
3986 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); 4160 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset));
3987 } 4161 }
3988 } 4162 }
3989 } 4163 }
3990 4164
3991 4165
3992 } } // namespace v8::internal 4166 } } // namespace v8::internal
3993 4167
3994 #endif // V8_TARGET_ARCH_ARM 4168 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | test/cctest/test-disasm-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698