OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |