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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 969 |
970 | 970 |
971 void MacroAssembler::IllegalOperation(int num_arguments) { | 971 void MacroAssembler::IllegalOperation(int num_arguments) { |
972 if (num_arguments > 0) { | 972 if (num_arguments > 0) { |
973 add(sp, sp, Operand(num_arguments * kPointerSize)); | 973 add(sp, sp, Operand(num_arguments * kPointerSize)); |
974 } | 974 } |
975 LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 975 LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
976 } | 976 } |
977 | 977 |
978 | 978 |
| 979 void MacroAssembler::IntegerToDoubleConversionWithVFP3(Register inReg, |
| 980 Register outHighReg, |
| 981 Register outLowReg) { |
| 982 // ARMv7 VFP3 instructions to implement integer to double conversion. |
| 983 mov(r7, Operand(inReg, ASR, kSmiTagSize)); |
| 984 fmsr(s15, r7); |
| 985 fsitod(d7, s15); |
| 986 fmrrd(outLowReg, outHighReg, d7); |
| 987 } |
| 988 |
| 989 |
979 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) { | 990 void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) { |
980 // All parameters are on the stack. r0 has the return value after call. | 991 // All parameters are on the stack. r0 has the return value after call. |
981 | 992 |
982 // If the expected number of arguments of the runtime function is | 993 // If the expected number of arguments of the runtime function is |
983 // constant, we check that the actual number of arguments match the | 994 // constant, we check that the actual number of arguments match the |
984 // expectation. | 995 // expectation. |
985 if (f->nargs >= 0 && f->nargs != num_arguments) { | 996 if (f->nargs >= 0 && f->nargs != num_arguments) { |
986 IllegalOperation(num_arguments); | 997 IllegalOperation(num_arguments); |
987 return; | 998 return; |
988 } | 999 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 } | 1190 } |
1180 | 1191 |
1181 | 1192 |
1182 void CodePatcher::Emit(Address addr) { | 1193 void CodePatcher::Emit(Address addr) { |
1183 masm()->emit(reinterpret_cast<Instr>(addr)); | 1194 masm()->emit(reinterpret_cast<Instr>(addr)); |
1184 } | 1195 } |
1185 #endif // ENABLE_DEBUGGER_SUPPORT | 1196 #endif // ENABLE_DEBUGGER_SUPPORT |
1186 | 1197 |
1187 | 1198 |
1188 } } // namespace v8::internal | 1199 } } // namespace v8::internal |
OLD | NEW |