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

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

Issue 2773303002: [ARM] Implement widening and narrowing integer moves, vmovl, vqmovn. (Closed)
Patch Set: Add some disassembler tests for vmovl. Created 3 years, 9 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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after
3912 int vd, d; 3912 int vd, d;
3913 dst.split_code(&vd, &d); 3913 dst.split_code(&vd, &d);
3914 int vm, m; 3914 int vm, m;
3915 src.split_code(&vm, &m); 3915 src.split_code(&vm, &m);
3916 int U = NeonU(dt); 3916 int U = NeonU(dt);
3917 int imm3 = 1 << NeonSz(dt); 3917 int imm3 = 1 << NeonSz(dt);
3918 emit(0xFU * B28 | B25 | U * B24 | B23 | d * B22 | imm3 * B19 | vd * B12 | 3918 emit(0xFU * B28 | B25 | U * B24 | B23 | d * B22 | imm3 * B19 | vd * B12 |
3919 0xA * B8 | m * B5 | B4 | vm); 3919 0xA * B8 | m * B5 | B4 | vm);
3920 } 3920 }
3921 3921
3922 void Assembler::vqmovn(NeonDataType dt, DwVfpRegister dst, QwNeonRegister src) {
3923 // Instruction details available in ARM DDI 0406C.b, A8.8.1004.
3924 // vqmovn.<type><size> Dd, Qm. ARM vector narrowing move with saturation.
3925 DCHECK(IsEnabled(NEON));
3926 int vd, d;
3927 dst.split_code(&vd, &d);
3928 int vm, m;
3929 src.split_code(&vm, &m);
3930 int size = NeonSz(dt);
3931 int u = NeonU(dt);
3932 int op = u != 0 ? 3 : 2;
3933 emit(0x1E7U * B23 | d * B22 | 0x3 * B20 | size * B18 | 0x2 * B16 | vd * B12 |
3934 0x2 * B8 | op * B6 | m * B5 | vm);
3935 }
3936
3922 static int EncodeScalar(NeonDataType dt, int index) { 3937 static int EncodeScalar(NeonDataType dt, int index) {
3923 int opc1_opc2 = 0; 3938 int opc1_opc2 = 0;
3924 DCHECK_LE(0, index); 3939 DCHECK_LE(0, index);
3925 switch (dt) { 3940 switch (dt) {
3926 case NeonS8: 3941 case NeonS8:
3927 case NeonU8: 3942 case NeonU8:
3928 DCHECK_GT(8, index); 3943 DCHECK_GT(8, index);
3929 opc1_opc2 = 0x8 | index; 3944 opc1_opc2 = 0x8 | index;
3930 break; 3945 break;
3931 case NeonS16: 3946 case NeonS16:
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
5372 } 5387 }
5373 5388
5374 void PatchingAssembler::FlushICache(Isolate* isolate) { 5389 void PatchingAssembler::FlushICache(Isolate* isolate) {
5375 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap); 5390 Assembler::FlushICache(isolate, buffer_, buffer_size_ - kGap);
5376 } 5391 }
5377 5392
5378 } // namespace internal 5393 } // namespace internal
5379 } // namespace v8 5394 } // namespace v8
5380 5395
5381 #endif // V8_TARGET_ARCH_ARM 5396 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm/disasm-arm.cc » ('j') | src/arm/simulator-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698