| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 Condition cond = al); | 171 Condition cond = al); |
| 172 void Bfc(Register dst, Register src, int lsb, int width, Condition cond = al); | 172 void Bfc(Register dst, Register src, int lsb, int width, Condition cond = al); |
| 173 void Usat(Register dst, int satpos, const Operand& src, | 173 void Usat(Register dst, int satpos, const Operand& src, |
| 174 Condition cond = al); | 174 Condition cond = al); |
| 175 | 175 |
| 176 void Call(Label* target); | 176 void Call(Label* target); |
| 177 | 177 |
| 178 // Register move. May do nothing if the registers are identical. | 178 // Register move. May do nothing if the registers are identical. |
| 179 void Move(Register dst, Handle<Object> value); | 179 void Move(Register dst, Handle<Object> value); |
| 180 void Move(Register dst, Register src, Condition cond = al); | 180 void Move(Register dst, Register src, Condition cond = al); |
| 181 void Move(DwVfpRegister dst, DwVfpRegister src); | 181 void Move(DoubleRegister dst, DoubleRegister src); |
| 182 | 182 |
| 183 // Load an object from the root table. | 183 // Load an object from the root table. |
| 184 void LoadRoot(Register destination, | 184 void LoadRoot(Register destination, |
| 185 Heap::RootListIndex index, | 185 Heap::RootListIndex index, |
| 186 Condition cond = al); | 186 Condition cond = al); |
| 187 // Store an object to the root table. | 187 // Store an object to the root table. |
| 188 void StoreRoot(Register source, | 188 void StoreRoot(Register source, |
| 189 Heap::RootListIndex index, | 189 Heap::RootListIndex index, |
| 190 Condition cond = al); | 190 Condition cond = al); |
| 191 | 191 |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 void PrepareCallCFunction(int num_reg_arguments, | 1059 void PrepareCallCFunction(int num_reg_arguments, |
| 1060 int num_double_registers, | 1060 int num_double_registers, |
| 1061 Register scratch); | 1061 Register scratch); |
| 1062 void PrepareCallCFunction(int num_reg_arguments, | 1062 void PrepareCallCFunction(int num_reg_arguments, |
| 1063 Register scratch); | 1063 Register scratch); |
| 1064 | 1064 |
| 1065 // There are two ways of passing double arguments on ARM, depending on | 1065 // There are two ways of passing double arguments on ARM, depending on |
| 1066 // whether soft or hard floating point ABI is used. These functions | 1066 // whether soft or hard floating point ABI is used. These functions |
| 1067 // abstract parameter passing for the three different ways we call | 1067 // abstract parameter passing for the three different ways we call |
| 1068 // C functions from generated code. | 1068 // C functions from generated code. |
| 1069 void SetCallCDoubleArguments(DwVfpRegister dreg); | 1069 void SetCallCDoubleArguments(DoubleRegister dreg); |
| 1070 void SetCallCDoubleArguments(DwVfpRegister dreg1, DwVfpRegister dreg2); | 1070 void SetCallCDoubleArguments(DoubleRegister dreg1, DoubleRegister dreg2); |
| 1071 void SetCallCDoubleArguments(DwVfpRegister dreg, Register reg); | 1071 void SetCallCDoubleArguments(DoubleRegister dreg, Register reg); |
| 1072 | 1072 |
| 1073 // Calls a C function and cleans up the space for arguments allocated | 1073 // Calls a C function and cleans up the space for arguments allocated |
| 1074 // by PrepareCallCFunction. The called function is not allowed to trigger a | 1074 // by PrepareCallCFunction. The called function is not allowed to trigger a |
| 1075 // garbage collection, since that might move the code and invalidate the | 1075 // garbage collection, since that might move the code and invalidate the |
| 1076 // return address (unless this is somehow accounted for by the called | 1076 // return address (unless this is somehow accounted for by the called |
| 1077 // function). | 1077 // function). |
| 1078 void CallCFunction(ExternalReference function, int num_arguments); | 1078 void CallCFunction(ExternalReference function, int num_arguments); |
| 1079 void CallCFunction(Register function, int num_arguments); | 1079 void CallCFunction(Register function, int num_arguments); |
| 1080 void CallCFunction(ExternalReference function, | 1080 void CallCFunction(ExternalReference function, |
| 1081 int num_reg_arguments, | 1081 int num_reg_arguments, |
| 1082 int num_double_arguments); | 1082 int num_double_arguments); |
| 1083 void CallCFunction(Register function, | 1083 void CallCFunction(Register function, |
| 1084 int num_reg_arguments, | 1084 int num_reg_arguments, |
| 1085 int num_double_arguments); | 1085 int num_double_arguments); |
| 1086 | 1086 |
| 1087 void GetCFunctionDoubleResult(const DwVfpRegister dst); | 1087 void GetCFunctionDoubleResult(const DoubleRegister dst); |
| 1088 | 1088 |
| 1089 // Calls an API function. Allocates HandleScope, extracts returned value | 1089 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1090 // from handle and propagates exceptions. Restores context. stack_space | 1090 // from handle and propagates exceptions. Restores context. stack_space |
| 1091 // - space to be unwound on exit (includes the call JS arguments space and | 1091 // - space to be unwound on exit (includes the call JS arguments space and |
| 1092 // the additional space allocated for the fast call). | 1092 // the additional space allocated for the fast call). |
| 1093 void CallApiFunctionAndReturn(ExternalReference function, int stack_space); | 1093 void CallApiFunctionAndReturn(ExternalReference function, int stack_space); |
| 1094 | 1094 |
| 1095 // Jump to a runtime routine. | 1095 // Jump to a runtime routine. |
| 1096 void JumpToExternalReference(const ExternalReference& builtin); | 1096 void JumpToExternalReference(const ExternalReference& builtin); |
| 1097 | 1097 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 | 1290 |
| 1291 // Get the location of a relocated constant (its address in the constant pool) | 1291 // Get the location of a relocated constant (its address in the constant pool) |
| 1292 // from its load site. | 1292 // from its load site. |
| 1293 void GetRelocatedValueLocation(Register ldr_location, | 1293 void GetRelocatedValueLocation(Register ldr_location, |
| 1294 Register result); | 1294 Register result); |
| 1295 | 1295 |
| 1296 | 1296 |
| 1297 void ClampUint8(Register output_reg, Register input_reg); | 1297 void ClampUint8(Register output_reg, Register input_reg); |
| 1298 | 1298 |
| 1299 void ClampDoubleToUint8(Register result_reg, | 1299 void ClampDoubleToUint8(Register result_reg, |
| 1300 DwVfpRegister input_reg, | 1300 DoubleRegister input_reg, |
| 1301 DwVfpRegister temp_double_reg); | 1301 DoubleRegister temp_double_reg); |
| 1302 | 1302 |
| 1303 | 1303 |
| 1304 void LoadInstanceDescriptors(Register map, Register descriptors); | 1304 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 1305 void EnumLength(Register dst, Register map); | 1305 void EnumLength(Register dst, Register map); |
| 1306 void NumberOfOwnDescriptors(Register dst, Register map); | 1306 void NumberOfOwnDescriptors(Register dst, Register map); |
| 1307 | 1307 |
| 1308 template<typename Field> | 1308 template<typename Field> |
| 1309 void DecodeField(Register reg) { | 1309 void DecodeField(Register reg) { |
| 1310 static const int shift = Field::kShift; | 1310 static const int shift = Field::kShift; |
| 1311 static const int mask = (Field::kMask >> shift) << kSmiTagSize; | 1311 static const int mask = (Field::kMask >> shift) << kSmiTagSize; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1366 static int SafepointRegisterStackIndex(int reg_code); | 1366 static int SafepointRegisterStackIndex(int reg_code); |
| 1367 MemOperand SafepointRegisterSlot(Register reg); | 1367 MemOperand SafepointRegisterSlot(Register reg); |
| 1368 MemOperand SafepointRegistersAndDoublesSlot(Register reg); | 1368 MemOperand SafepointRegistersAndDoublesSlot(Register reg); |
| 1369 | 1369 |
| 1370 bool generating_stub_; | 1370 bool generating_stub_; |
| 1371 bool allow_stub_calls_; | 1371 bool allow_stub_calls_; |
| 1372 bool has_frame_; | 1372 bool has_frame_; |
| 1373 // This handle will be patched with the code object on installation. | 1373 // This handle will be patched with the code object on installation. |
| 1374 Handle<Object> code_object_; | 1374 Handle<Object> code_object_; |
| 1375 | 1375 |
| 1376 // Needs access to SafepointRegisterStackIndex for compiled frame | 1376 // Needs access to SafepointRegisterStackIndex for optimized frame |
| 1377 // traversal. | 1377 // traversal. |
| 1378 friend class CompiledFrame; | 1378 friend class OptimizedFrame; |
| 1379 }; | 1379 }; |
| 1380 | 1380 |
| 1381 | 1381 |
| 1382 // The code patcher is used to patch (typically) small parts of code e.g. for | 1382 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 1383 // debugging and other types of instrumentation. When using the code patcher | 1383 // debugging and other types of instrumentation. When using the code patcher |
| 1384 // the exact number of bytes specified must be emitted. It is not legal to emit | 1384 // the exact number of bytes specified must be emitted. It is not legal to emit |
| 1385 // relocation information. If any of these constraints are violated it causes | 1385 // relocation information. If any of these constraints are violated it causes |
| 1386 // an assertion to fail. | 1386 // an assertion to fail. |
| 1387 class CodePatcher { | 1387 class CodePatcher { |
| 1388 public: | 1388 public: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1429 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1430 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1430 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1431 #else | 1431 #else |
| 1432 #define ACCESS_MASM(masm) masm-> | 1432 #define ACCESS_MASM(masm) masm-> |
| 1433 #endif | 1433 #endif |
| 1434 | 1434 |
| 1435 | 1435 |
| 1436 } } // namespace v8::internal | 1436 } } // namespace v8::internal |
| 1437 | 1437 |
| 1438 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1438 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |