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

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

Issue 573027: ARMv7 ubfx support... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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 | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 Register outHighReg, 1099 Register outHighReg,
1100 Register outLowReg) { 1100 Register outLowReg) {
1101 // ARMv7 VFP3 instructions to implement integer to double conversion. 1101 // ARMv7 VFP3 instructions to implement integer to double conversion.
1102 mov(r7, Operand(inReg, ASR, kSmiTagSize)); 1102 mov(r7, Operand(inReg, ASR, kSmiTagSize));
1103 vmov(s15, r7); 1103 vmov(s15, r7);
1104 vcvt(d7, s15); 1104 vcvt(d7, s15);
1105 vmov(outLowReg, outHighReg, d7); 1105 vmov(outLowReg, outHighReg, d7);
1106 } 1106 }
1107 1107
1108 1108
1109 void MacroAssembler::GetLeastBitsFromSmi(Register dst,
1110 Register src,
1111 int num_least_bits) {
1112 if (CpuFeatures::IsSupported(ARMv7)) {
1113 ubfx(dst, src, Operand(kSmiTagSize), Operand(num_least_bits - 1));
1114 } else {
1115 mov(dst, Operand(src, ASR, kSmiTagSize));
1116 and_(dst, dst, Operand((1 << num_least_bits) - 1));
1117 }
1118 }
1119
1120
1109 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) { 1121 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
1110 // All parameters are on the stack. r0 has the return value after call. 1122 // All parameters are on the stack. r0 has the return value after call.
1111 1123
1112 // If the expected number of arguments of the runtime function is 1124 // If the expected number of arguments of the runtime function is
1113 // constant, we check that the actual number of arguments match the 1125 // constant, we check that the actual number of arguments match the
1114 // expectation. 1126 // expectation.
1115 if (f->nargs >= 0 && f->nargs != num_arguments) { 1127 if (f->nargs >= 0 && f->nargs != num_arguments) {
1116 IllegalOperation(num_arguments); 1128 IllegalOperation(num_arguments);
1117 return; 1129 return;
1118 } 1130 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1388 }
1377 1389
1378 1390
1379 void CodePatcher::Emit(Address addr) { 1391 void CodePatcher::Emit(Address addr) {
1380 masm()->emit(reinterpret_cast<Instr>(addr)); 1392 masm()->emit(reinterpret_cast<Instr>(addr));
1381 } 1393 }
1382 #endif // ENABLE_DEBUGGER_SUPPORT 1394 #endif // ENABLE_DEBUGGER_SUPPORT
1383 1395
1384 1396
1385 } } // namespace v8::internal 1397 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698