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

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

Issue 682643002: Add vrint{a,n,p,m,z} instructions to arm assembler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing more comments. Created 6 years, 1 month 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 | Annotate | Revision Log
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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 // Vd(15-12) | 101(11-9) | sz=1(8) | 11(7-6) | M(5) | 0(4) | Vm(3-0) 3087 // Vd(15-12) | 101(11-9) | sz=1(8) | 11(7-6) | M(5) | 0(4) | Vm(3-0)
3088 int vd, d; 3088 int vd, d;
3089 dst.split_code(&vd, &d); 3089 dst.split_code(&vd, &d);
3090 int vm, m; 3090 int vm, m;
3091 src.split_code(&vm, &m); 3091 src.split_code(&vm, &m);
3092 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | 0x3*B6 | 3092 emit(cond | 0x1D*B23 | d*B22 | 0x3*B20 | B16 | vd*B12 | 0x5*B9 | B8 | 0x3*B6 |
3093 m*B5 | vm); 3093 m*B5 | vm);
3094 } 3094 }
3095 3095
3096 3096
3097 void Assembler::vrinta(const DwVfpRegister dst, const DwVfpRegister src) {
3098 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) |
3099 // 10(19-18) | RM=00(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) |
3100 // M(5) | 0(4) | Vm(3-0)
3101 DCHECK(CpuFeatures::IsSupported(ARMv8));
3102 int vd, d;
3103 dst.split_code(&vd, &d);
3104 int vm, m;
3105 src.split_code(&vm, &m);
3106 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | vd * B12 |
3107 0x5 * B9 | B8 | B6 | m * B5 | vm);
3108 }
3109
3110
3111 void Assembler::vrintn(const DwVfpRegister dst, const DwVfpRegister src) {
3112 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) |
3113 // 10(19-18) | RM=01(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) |
3114 // M(5) | 0(4) | Vm(3-0)
3115 DCHECK(CpuFeatures::IsSupported(ARMv8));
3116 int vd, d;
3117 dst.split_code(&vd, &d);
3118 int vm, m;
3119 src.split_code(&vm, &m);
3120 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | 0x1 * B16 |
3121 vd * B12 | 0x5 * B9 | B8 | B6 | m * B5 | vm);
3122 }
3123
3124
3125 void Assembler::vrintp(const DwVfpRegister dst, const DwVfpRegister src) {
3126 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) |
3127 // 10(19-18) | RM=10(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) |
3128 // M(5) | 0(4) | Vm(3-0)
3129 DCHECK(CpuFeatures::IsSupported(ARMv8));
3130 int vd, d;
3131 dst.split_code(&vd, &d);
3132 int vm, m;
3133 src.split_code(&vm, &m);
3134 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | 0x2 * B16 |
3135 vd * B12 | 0x5 * B9 | B8 | B6 | m * B5 | vm);
3136 }
3137
3138
3139 void Assembler::vrintm(const DwVfpRegister dst, const DwVfpRegister src) {
3140 // cond=kSpecialCondition(31-28) | 11101(27-23)| D(22) | 11(21-20) |
3141 // 10(19-18) | RM=11(17-16) | Vd(15-12) | 101(11-9) | sz=1(8) | 01(7-6) |
3142 // M(5) | 0(4) | Vm(3-0)
3143 DCHECK(CpuFeatures::IsSupported(ARMv8));
3144 int vd, d;
3145 dst.split_code(&vd, &d);
3146 int vm, m;
3147 src.split_code(&vm, &m);
3148 emit(kSpecialCondition | 0x1D * B23 | d * B22 | 0x3 * B20 | B19 | 0x3 * B16 |
3149 vd * B12 | 0x5 * B9 | B8 | B6 | m * B5 | vm);
3150 }
3151
3152
3153 void Assembler::vrintz(const DwVfpRegister dst, const DwVfpRegister src,
3154 const Condition cond) {
3155 // cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 011(19-17) | 0(16) |
3156 // Vd(15-12) | 101(11-9) | sz=1(8) | op=1(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
3157 DCHECK(CpuFeatures::IsSupported(ARMv8));
3158 int vd, d;
3159 dst.split_code(&vd, &d);
3160 int vm, m;
3161 src.split_code(&vm, &m);
3162 emit(cond | 0x1D * B23 | d * B22 | 0x3 * B20 | 0x3 * B17 | vd * B12 |
3163 0x5 * B9 | B8 | B7 | B6 | m * B5 | vm);
3164 }
3165
3166
3097 // Support for NEON. 3167 // Support for NEON.
3098 3168
3099 void Assembler::vld1(NeonSize size, 3169 void Assembler::vld1(NeonSize size,
3100 const NeonListOperand& dst, 3170 const NeonListOperand& dst,
3101 const NeonMemOperand& src) { 3171 const NeonMemOperand& src) {
3102 // Instruction details available in ARM DDI 0406C.b, A8.8.320. 3172 // Instruction details available in ARM DDI 0406C.b, A8.8.320.
3103 // 1111(31-28) | 01000(27-23) | D(22) | 10(21-20) | Rn(19-16) | 3173 // 1111(31-28) | 01000(27-23) | D(22) | 10(21-20) | Rn(19-16) |
3104 // Vd(15-12) | type(11-8) | size(7-6) | align(5-4) | Rm(3-0) 3174 // Vd(15-12) | type(11-8) | size(7-6) | align(5-4) | Rm(3-0)
3105 DCHECK(CpuFeatures::IsSupported(NEON)); 3175 DCHECK(CpuFeatures::IsSupported(NEON));
3106 int vd, d; 3176 int vd, d;
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
3854 assm->instr_at_put( 3924 assm->instr_at_put(
3855 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); 3925 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset));
3856 } 3926 }
3857 } 3927 }
3858 } 3928 }
3859 3929
3860 3930
3861 } } // namespace v8::internal 3931 } } // namespace v8::internal
3862 3932
3863 #endif // V8_TARGET_ARCH_ARM 3933 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/constants-arm.h » ('j') | src/arm/simulator-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698