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

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 269443002: Only assume that we have 32 D registers on ARMv7-a. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 EmitVFPsss(cond, B23 | B21 | B20 | B6, sd, S0, sm); 894 EmitVFPsss(cond, B23 | B21 | B20 | B6, sd, S0, sm);
895 } 895 }
896 896
897 897
898 void Assembler::vmovd(DRegister dd, DRegister dm, Condition cond) { 898 void Assembler::vmovd(DRegister dd, DRegister dm, Condition cond) {
899 EmitVFPddd(cond, B23 | B21 | B20 | B6, dd, D0, dm); 899 EmitVFPddd(cond, B23 | B21 | B20 | B6, dd, D0, dm);
900 } 900 }
901 901
902 902
903 bool Assembler::vmovs(SRegister sd, float s_imm, Condition cond) { 903 bool Assembler::vmovs(SRegister sd, float s_imm, Condition cond) {
904 if (TargetCPUFeatures::arm_version() != ARMv7) {
905 return false;
906 }
904 uint32_t imm32 = bit_cast<uint32_t, float>(s_imm); 907 uint32_t imm32 = bit_cast<uint32_t, float>(s_imm);
905 if (((imm32 & ((1 << 19) - 1)) == 0) && 908 if (((imm32 & ((1 << 19) - 1)) == 0) &&
906 ((((imm32 >> 25) & ((1 << 6) - 1)) == (1 << 5)) || 909 ((((imm32 >> 25) & ((1 << 6) - 1)) == (1 << 5)) ||
907 (((imm32 >> 25) & ((1 << 6) - 1)) == ((1 << 5) -1)))) { 910 (((imm32 >> 25) & ((1 << 6) - 1)) == ((1 << 5) -1)))) {
908 uint8_t imm8 = ((imm32 >> 31) << 7) | (((imm32 >> 29) & 1) << 6) | 911 uint8_t imm8 = ((imm32 >> 31) << 7) | (((imm32 >> 29) & 1) << 6) |
909 ((imm32 >> 19) & ((1 << 6) -1)); 912 ((imm32 >> 19) & ((1 << 6) -1));
910 EmitVFPsss(cond, B23 | B21 | B20 | ((imm8 >> 4)*B16) | (imm8 & 0xf), 913 EmitVFPsss(cond, B23 | B21 | B20 | ((imm8 >> 4)*B16) | (imm8 & 0xf),
911 sd, S0, S0); 914 sd, S0, S0);
912 return true; 915 return true;
913 } 916 }
914 return false; 917 return false;
915 } 918 }
916 919
917 920
918 bool Assembler::vmovd(DRegister dd, double d_imm, Condition cond) { 921 bool Assembler::vmovd(DRegister dd, double d_imm, Condition cond) {
922 if (TargetCPUFeatures::arm_version() != ARMv7) {
923 return false;
924 }
919 uint64_t imm64 = bit_cast<uint64_t, double>(d_imm); 925 uint64_t imm64 = bit_cast<uint64_t, double>(d_imm);
920 if (((imm64 & ((1LL << 48) - 1)) == 0) && 926 if (((imm64 & ((1LL << 48) - 1)) == 0) &&
921 ((((imm64 >> 54) & ((1 << 9) - 1)) == (1 << 8)) || 927 ((((imm64 >> 54) & ((1 << 9) - 1)) == (1 << 8)) ||
922 (((imm64 >> 54) & ((1 << 9) - 1)) == ((1 << 8) -1)))) { 928 (((imm64 >> 54) & ((1 << 9) - 1)) == ((1 << 8) -1)))) {
923 uint8_t imm8 = ((imm64 >> 63) << 7) | (((imm64 >> 61) & 1) << 6) | 929 uint8_t imm8 = ((imm64 >> 63) << 7) | (((imm64 >> 61) & 1) << 6) |
924 ((imm64 >> 48) & ((1 << 6) -1)); 930 ((imm64 >> 48) & ((1 << 6) -1));
925 EmitVFPddd(cond, B23 | B21 | B20 | ((imm8 >> 4)*B16) | B8 | (imm8 & 0xf), 931 EmitVFPddd(cond, B23 | B21 | B20 | ((imm8 >> 4)*B16) | B8 | (imm8 & 0xf),
926 dd, D0, D0); 932 dd, D0, D0);
927 return true; 933 return true;
928 } 934 }
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 3028
3023 3029
3024 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3030 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3025 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3031 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3026 return fpu_reg_names[reg]; 3032 return fpu_reg_names[reg];
3027 } 3033 }
3028 3034
3029 } // namespace dart 3035 } // namespace dart
3030 3036
3031 #endif // defined TARGET_ARCH_ARM 3037 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698