OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Declares a Simulator for S390 instructions if we are not generating a native | 5 // Declares a Simulator for S390 instructions if we are not generating a native |
6 // S390 binary. This Simulator allows us to run and debug S390 code generation | 6 // S390 binary. This Simulator allows us to run and debug S390 code generation |
7 // on regular desktop machines. | 7 // on regular desktop machines. |
8 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, | 8 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, |
9 // which will start execution in the Simulator or forwards to the real entry | 9 // which will start execution in the Simulator or forwards to the real entry |
10 // on a S390 hardware platform. | 10 // on a S390 hardware platform. |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 inline void WriteW(intptr_t addr, uint32_t value, Instruction* instr); | 302 inline void WriteW(intptr_t addr, uint32_t value, Instruction* instr); |
303 inline void WriteW(intptr_t addr, int32_t value, Instruction* instr); | 303 inline void WriteW(intptr_t addr, int32_t value, Instruction* instr); |
304 | 304 |
305 inline int64_t ReadDW(intptr_t addr); | 305 inline int64_t ReadDW(intptr_t addr); |
306 inline double ReadDouble(intptr_t addr); | 306 inline double ReadDouble(intptr_t addr); |
307 inline float ReadFloat(intptr_t addr); | 307 inline float ReadFloat(intptr_t addr); |
308 inline void WriteDW(intptr_t addr, int64_t value); | 308 inline void WriteDW(intptr_t addr, int64_t value); |
309 | 309 |
310 // S390 | 310 // S390 |
311 void Trace(Instruction* instr); | 311 void Trace(Instruction* instr); |
312 bool DecodeTwoByte(Instruction* instr); | |
313 bool DecodeFourByte(Instruction* instr); | |
314 bool DecodeFourByteArithmetic(Instruction* instr); | |
315 bool DecodeFourByteArithmetic64Bit(Instruction* instr); | |
316 bool DecodeFourByteFloatingPoint(Instruction* instr); | |
317 void DecodeFourByteFloatingPointIntConversion(Instruction* instr); | |
318 void DecodeFourByteFloatingPointRound(Instruction* instr); | |
319 | |
320 bool DecodeSixByte(Instruction* instr); | |
321 bool DecodeSixByteArithmetic(Instruction* instr); | |
322 bool S390InstructionDecode(Instruction* instr); | |
323 void DecodeSixByteBitShift(Instruction* instr); | |
324 | 312 |
325 // Used by the CL**BR instructions. | 313 // Used by the CL**BR instructions. |
326 template <typename T1, typename T2> | 314 template <typename T1, typename T2> |
327 void SetS390RoundConditionCode(T1 r2_val, T2 max, T2 min) { | 315 void SetS390RoundConditionCode(T1 r2_val, T2 max, T2 min) { |
328 condition_reg_ = 0; | 316 condition_reg_ = 0; |
329 double r2_dval = static_cast<double>(r2_val); | 317 double r2_dval = static_cast<double>(r2_val); |
330 double dbl_min = static_cast<double>(min); | 318 double dbl_min = static_cast<double>(min); |
331 double dbl_max = static_cast<double>(max); | 319 double dbl_max = static_cast<double>(max); |
332 | 320 |
333 if (r2_dval == 0.0) | 321 if (r2_dval == 0.0) |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { | 1283 static inline void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
1296 Simulator::current(isolate)->PopAddress(); | 1284 Simulator::current(isolate)->PopAddress(); |
1297 } | 1285 } |
1298 }; | 1286 }; |
1299 | 1287 |
1300 } // namespace internal | 1288 } // namespace internal |
1301 } // namespace v8 | 1289 } // namespace v8 |
1302 | 1290 |
1303 #endif // !defined(USE_SIMULATOR) | 1291 #endif // !defined(USE_SIMULATOR) |
1304 #endif // V8_S390_SIMULATOR_S390_H_ | 1292 #endif // V8_S390_SIMULATOR_S390_H_ |
OLD | NEW |