OLD | NEW |
---|---|
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 4242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4253 int vm, m; | 4253 int vm, m; |
4254 src2.split_code(&vm, &m); | 4254 src2.split_code(&vm, &m); |
4255 int sz = static_cast<int>(size); | 4255 int sz = static_cast<int>(size); |
4256 emit(0x1E4U * B23 | d * B22 | sz * B20 | vn * B16 | vd * B12 | 0x8 * B8 | | 4256 emit(0x1E4U * B23 | d * B22 | sz * B20 | vn * B16 | vd * B12 | 0x8 * B8 | |
4257 n * B7 | B6 | m * B5 | B4 | vm); | 4257 n * B7 | B6 | m * B5 | B4 | vm); |
4258 } | 4258 } |
4259 | 4259 |
4260 void Assembler::vceq(const QwNeonRegister dst, const QwNeonRegister src1, | 4260 void Assembler::vceq(const QwNeonRegister dst, const QwNeonRegister src1, |
4261 const QwNeonRegister src2) { | 4261 const QwNeonRegister src2) { |
4262 DCHECK(IsEnabled(NEON)); | 4262 DCHECK(IsEnabled(NEON)); |
4263 // Qd = vceq(Qn, Qm) SIMD integer compare equal. | 4263 // Qd = vceq(Qn, Qm) SIMD floating point compare equal. |
4264 // Instruction details available in ARM DDI 0406C.b, A8-844. | 4264 // Instruction details available in ARM DDI 0406C.b, A8-844. |
4265 int vd, d; | 4265 int vd, d; |
4266 dst.split_code(&vd, &d); | 4266 dst.split_code(&vd, &d); |
4267 int vn, n; | 4267 int vn, n; |
4268 src1.split_code(&vn, &n); | 4268 src1.split_code(&vn, &n); |
4269 int vm, m; | 4269 int vm, m; |
4270 src2.split_code(&vm, &m); | 4270 src2.split_code(&vm, &m); |
4271 emit(0x1E4U * B23 | d * B22 | vn * B16 | vd * B12 | 0xe * B8 | n * B7 | B6 | | 4271 emit(0x1E4U * B23 | d * B22 | vn * B16 | vd * B12 | 0xe * B8 | n * B7 | B6 | |
4272 m * B5 | vm); | 4272 m * B5 | vm); |
4273 } | 4273 } |
4274 | 4274 |
4275 void Assembler::vceq(NeonSize size, QwNeonRegister dst, | 4275 void Assembler::vceq(NeonSize size, QwNeonRegister dst, |
4276 const QwNeonRegister src1, const QwNeonRegister src2) { | 4276 const QwNeonRegister src1, const QwNeonRegister src2) { |
4277 DCHECK(IsEnabled(NEON)); | 4277 DCHECK(IsEnabled(NEON)); |
4278 // Qd = vceq(Qn, Qm) SIMD bitwise compare equal. | 4278 // Qd = vceq(Qn, Qm) SIMD integer compare equal. |
4279 // Instruction details available in ARM DDI 0406C.b, A8-844. | 4279 // Instruction details available in ARM DDI 0406C.b, A8-844. |
4280 int vd, d; | 4280 int vd, d; |
4281 dst.split_code(&vd, &d); | 4281 dst.split_code(&vd, &d); |
4282 int vn, n; | 4282 int vn, n; |
4283 src1.split_code(&vn, &n); | 4283 src1.split_code(&vn, &n); |
4284 int vm, m; | 4284 int vm, m; |
4285 src2.split_code(&vm, &m); | 4285 src2.split_code(&vm, &m); |
4286 int sz = static_cast<int>(size); | 4286 int sz = static_cast<int>(size); |
4287 emit(0x1E6U * B23 | d * B22 | sz * B20 | vn * B16 | vd * B12 | 0x8 * B8 | | 4287 emit(0x1E6U * B23 | d * B22 | sz * B20 | vn * B16 | vd * B12 | 0x8 * B8 | |
4288 n * B7 | B6 | m * B5 | B4 | vm); | 4288 n * B7 | B6 | m * B5 | B4 | vm); |
4289 } | 4289 } |
4290 | 4290 |
4291 static Instr EncodeNeonCompareOp(const QwNeonRegister dst, | |
martyn.capewell
2017/01/06 19:10:21
Why not pass a Condition argument and encapsulate
bbudge
2017/01/10 11:17:51
Done.
| |
4292 const QwNeonRegister src1, | |
4293 const QwNeonRegister src2) { | |
4294 int vd, d; | |
4295 dst.split_code(&vd, &d); | |
4296 int vn, n; | |
4297 src1.split_code(&vn, &n); | |
4298 int vm, m; | |
4299 src2.split_code(&vm, &m); | |
4300 return 0x1E6U * B23 | d * B22 | vn * B16 | vd * B12 | 0xe * B8 | n * B7 | B6 | | |
4301 m * B5 | vm; | |
4302 } | |
4303 | |
4304 static Instr EncodeNeonCompareOp(NeonDataType dt, const QwNeonRegister dst, | |
4305 const QwNeonRegister src1, | |
4306 const QwNeonRegister src2) { | |
4307 int vd, d; | |
4308 dst.split_code(&vd, &d); | |
4309 int vn, n; | |
4310 src1.split_code(&vn, &n); | |
4311 int vm, m; | |
4312 src2.split_code(&vm, &m); | |
4313 int size = (dt & NeonDataTypeSizeMask) / 2; | |
4314 int U = dt & NeonDataTypeUMask; | |
4315 return 0x1E4U * B23 | U | d * B22 | size * B20 | vn * B16 | vd * B12 | | |
4316 0x3 * B8 | n * B7 | B6 | m * B5 | vm; | |
4317 } | |
4318 | |
4319 void Assembler::vcge(const QwNeonRegister dst, const QwNeonRegister src1, | |
4320 const QwNeonRegister src2) { | |
4321 DCHECK(IsEnabled(NEON)); | |
4322 // Qd = vcge(Qn, Qm) SIMD floating point compare greater or equal. | |
4323 // Instruction details available in ARM DDI 0406C.b, A8-848. | |
4324 emit(EncodeNeonCompareOp(dst, src1, src2)); | |
4325 } | |
4326 | |
4327 void Assembler::vcge(NeonDataType dt, QwNeonRegister dst, | |
4328 const QwNeonRegister src1, const QwNeonRegister src2) { | |
4329 DCHECK(IsEnabled(NEON)); | |
4330 // Qd = vcge(Qn, Qm) SIMD integer compare greater or equal. | |
4331 // Instruction details available in ARM DDI 0406C.b, A8-848. | |
4332 emit(EncodeNeonCompareOp(dt, dst, src1, src2) | B4); | |
4333 } | |
4334 | |
4335 void Assembler::vcgt(const QwNeonRegister dst, const QwNeonRegister src1, | |
4336 const QwNeonRegister src2) { | |
4337 DCHECK(IsEnabled(NEON)); | |
4338 // Qd = vcgt(Qn, Qm) SIMD floating point compare greater than. | |
4339 // Instruction details available in ARM DDI 0406C.b, A8-852. | |
4340 emit(EncodeNeonCompareOp(dst, src1, src2) | B21); | |
4341 } | |
4342 | |
4343 void Assembler::vcgt(NeonDataType dt, QwNeonRegister dst, | |
4344 const QwNeonRegister src1, const QwNeonRegister src2) { | |
4345 DCHECK(IsEnabled(NEON)); | |
4346 // Qd = vcgt(Qn, Qm) SIMD integer compare greater than. | |
4347 // Instruction details available in ARM DDI 0406C.b, A8-852. | |
4348 emit(EncodeNeonCompareOp(dt, dst, src1, src2)); | |
4349 } | |
4350 | |
4291 void Assembler::vbsl(QwNeonRegister dst, const QwNeonRegister src1, | 4351 void Assembler::vbsl(QwNeonRegister dst, const QwNeonRegister src1, |
4292 const QwNeonRegister src2) { | 4352 const QwNeonRegister src2) { |
4293 DCHECK(IsEnabled(NEON)); | 4353 DCHECK(IsEnabled(NEON)); |
4294 // Qd = vbsl(Qn, Qm) SIMD bitwise select. | 4354 // Qd = vbsl(Qn, Qm) SIMD bitwise select. |
4295 // Instruction details available in ARM DDI 0406C.b, A8-844. | 4355 // Instruction details available in ARM DDI 0406C.b, A8-844. |
4296 int vd, d; | 4356 int vd, d; |
4297 dst.split_code(&vd, &d); | 4357 dst.split_code(&vd, &d); |
4298 int vn, n; | 4358 int vn, n; |
4299 src1.split_code(&vn, &n); | 4359 src1.split_code(&vn, &n); |
4300 int vm, m; | 4360 int vm, m; |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4944 DCHECK(is_uint12(offset)); | 5004 DCHECK(is_uint12(offset)); |
4945 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); | 5005 instr_at_put(pc, SetLdrRegisterImmediateOffset(instr, offset)); |
4946 } | 5006 } |
4947 } | 5007 } |
4948 | 5008 |
4949 | 5009 |
4950 } // namespace internal | 5010 } // namespace internal |
4951 } // namespace v8 | 5011 } // namespace v8 |
4952 | 5012 |
4953 #endif // V8_TARGET_ARCH_ARM | 5013 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |