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

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

Issue 569015: ARMv7 ubfx support from Kun Zhang (zhangk@codeaurora.org), Code Aurora (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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 Register outHighReg, 1017 Register outHighReg,
1018 Register outLowReg) { 1018 Register outLowReg) {
1019 // ARMv7 VFP3 instructions to implement integer to double conversion. 1019 // ARMv7 VFP3 instructions to implement integer to double conversion.
1020 mov(r7, Operand(inReg, ASR, kSmiTagSize)); 1020 mov(r7, Operand(inReg, ASR, kSmiTagSize));
1021 vmov(s15, r7); 1021 vmov(s15, r7);
1022 vcvt(d7, s15); 1022 vcvt(d7, s15);
1023 vmov(outLowReg, outHighReg, d7); 1023 vmov(outLowReg, outHighReg, d7);
1024 } 1024 }
1025 1025
1026 1026
1027 void MacroAssembler::GetLeastBitsFromSmi(Register dst,
1028 Register src,
1029 int num_least_bits) {
1030 if (CpuFeatures::IsSupported(ARMv7)) {
1031 // UBFX r2, r0, #kSmiTagSize, #(num_least_bits-1)
1032 ubfx(dst, src, Operand(kSmiTagSize), Operand(num_least_bits - 1));
1033 } else {
1034 mov(dst, Operand(src, ASR, kSmiTagSize));
1035 and_(dst, dst, Operand((1 << num_least_bits) - 1));
1036 }
1037 }
1038
1039
1027 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) { 1040 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
1028 // All parameters are on the stack. r0 has the return value after call. 1041 // All parameters are on the stack. r0 has the return value after call.
1029 1042
1030 // If the expected number of arguments of the runtime function is 1043 // If the expected number of arguments of the runtime function is
1031 // constant, we check that the actual number of arguments match the 1044 // constant, we check that the actual number of arguments match the
1032 // expectation. 1045 // expectation.
1033 if (f->nargs >= 0 && f->nargs != num_arguments) { 1046 if (f->nargs >= 0 && f->nargs != num_arguments) {
1034 IllegalOperation(num_arguments); 1047 IllegalOperation(num_arguments);
1035 return; 1048 return;
1036 } 1049 }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1303 }
1291 1304
1292 1305
1293 void CodePatcher::Emit(Address addr) { 1306 void CodePatcher::Emit(Address addr) {
1294 masm()->emit(reinterpret_cast<Instr>(addr)); 1307 masm()->emit(reinterpret_cast<Instr>(addr));
1295 } 1308 }
1296 #endif // ENABLE_DEBUGGER_SUPPORT 1309 #endif // ENABLE_DEBUGGER_SUPPORT
1297 1310
1298 1311
1299 } } // namespace v8::internal 1312 } } // 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