| 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 void PrepareCallCFunction(int num_reg_arguments, | 1051 void PrepareCallCFunction(int num_reg_arguments, |
| 1052 int num_double_registers, | 1052 int num_double_registers, |
| 1053 Register scratch); | 1053 Register scratch); |
| 1054 void PrepareCallCFunction(int num_reg_arguments, | 1054 void PrepareCallCFunction(int num_reg_arguments, |
| 1055 Register scratch); | 1055 Register scratch); |
| 1056 | 1056 |
| 1057 // There are two ways of passing double arguments on ARM, depending on | 1057 // There are two ways of passing double arguments on ARM, depending on |
| 1058 // whether soft or hard floating point ABI is used. These functions | 1058 // whether soft or hard floating point ABI is used. These functions |
| 1059 // abstract parameter passing for the three different ways we call | 1059 // abstract parameter passing for the three different ways we call |
| 1060 // C functions from generated code. | 1060 // C functions from generated code. |
| 1061 void SetCallCDoubleArguments(DwVfpRegister dreg); | 1061 void SetCallCDoubleArguments(DoubleRegister dreg); |
| 1062 void SetCallCDoubleArguments(DwVfpRegister dreg1, DwVfpRegister dreg2); | 1062 void SetCallCDoubleArguments(DoubleRegister dreg1, DoubleRegister dreg2); |
| 1063 void SetCallCDoubleArguments(DwVfpRegister dreg, Register reg); | 1063 void SetCallCDoubleArguments(DoubleRegister dreg, Register reg); |
| 1064 | 1064 |
| 1065 // Calls a C function and cleans up the space for arguments allocated | 1065 // Calls a C function and cleans up the space for arguments allocated |
| 1066 // by PrepareCallCFunction. The called function is not allowed to trigger a | 1066 // by PrepareCallCFunction. The called function is not allowed to trigger a |
| 1067 // garbage collection, since that might move the code and invalidate the | 1067 // garbage collection, since that might move the code and invalidate the |
| 1068 // return address (unless this is somehow accounted for by the called | 1068 // return address (unless this is somehow accounted for by the called |
| 1069 // function). | 1069 // function). |
| 1070 void CallCFunction(ExternalReference function, int num_arguments); | 1070 void CallCFunction(ExternalReference function, int num_arguments); |
| 1071 void CallCFunction(Register function, int num_arguments); | 1071 void CallCFunction(Register function, int num_arguments); |
| 1072 void CallCFunction(ExternalReference function, | 1072 void CallCFunction(ExternalReference function, |
| 1073 int num_reg_arguments, | 1073 int num_reg_arguments, |
| 1074 int num_double_arguments); | 1074 int num_double_arguments); |
| 1075 void CallCFunction(Register function, | 1075 void CallCFunction(Register function, |
| 1076 int num_reg_arguments, | 1076 int num_reg_arguments, |
| 1077 int num_double_arguments); | 1077 int num_double_arguments); |
| 1078 | 1078 |
| 1079 void GetCFunctionDoubleResult(const DwVfpRegister dst); | 1079 void GetCFunctionDoubleResult(const DoubleRegister dst); |
| 1080 | 1080 |
| 1081 // Calls an API function. Allocates HandleScope, extracts returned value | 1081 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1082 // from handle and propagates exceptions. Restores context. stack_space | 1082 // from handle and propagates exceptions. Restores context. stack_space |
| 1083 // - space to be unwound on exit (includes the call JS arguments space and | 1083 // - space to be unwound on exit (includes the call JS arguments space and |
| 1084 // the additional space allocated for the fast call). | 1084 // the additional space allocated for the fast call). |
| 1085 void CallApiFunctionAndReturn(ExternalReference function, int stack_space); | 1085 void CallApiFunctionAndReturn(ExternalReference function, int stack_space); |
| 1086 | 1086 |
| 1087 // Jump to a runtime routine. | 1087 // Jump to a runtime routine. |
| 1088 void JumpToExternalReference(const ExternalReference& builtin); | 1088 void JumpToExternalReference(const ExternalReference& builtin); |
| 1089 | 1089 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1282 | 1282 |
| 1283 // Get the location of a relocated constant (its address in the constant pool) | 1283 // Get the location of a relocated constant (its address in the constant pool) |
| 1284 // from its load site. | 1284 // from its load site. |
| 1285 void GetRelocatedValueLocation(Register ldr_location, | 1285 void GetRelocatedValueLocation(Register ldr_location, |
| 1286 Register result); | 1286 Register result); |
| 1287 | 1287 |
| 1288 | 1288 |
| 1289 void ClampUint8(Register output_reg, Register input_reg); | 1289 void ClampUint8(Register output_reg, Register input_reg); |
| 1290 | 1290 |
| 1291 void ClampDoubleToUint8(Register result_reg, | 1291 void ClampDoubleToUint8(Register result_reg, |
| 1292 DwVfpRegister input_reg, | 1292 DoubleRegister input_reg, |
| 1293 DwVfpRegister temp_double_reg); | 1293 DoubleRegister temp_double_reg); |
| 1294 | 1294 |
| 1295 | 1295 |
| 1296 void LoadInstanceDescriptors(Register map, Register descriptors); | 1296 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 1297 void EnumLength(Register dst, Register map); | 1297 void EnumLength(Register dst, Register map); |
| 1298 void NumberOfOwnDescriptors(Register dst, Register map); | 1298 void NumberOfOwnDescriptors(Register dst, Register map); |
| 1299 | 1299 |
| 1300 template<typename Field> | 1300 template<typename Field> |
| 1301 void DecodeField(Register reg) { | 1301 void DecodeField(Register reg) { |
| 1302 static const int shift = Field::kShift; | 1302 static const int shift = Field::kShift; |
| 1303 static const int mask = (Field::kMask >> shift) << kSmiTagSize; | 1303 static const int mask = (Field::kMask >> shift) << kSmiTagSize; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 static int SafepointRegisterStackIndex(int reg_code); | 1358 static int SafepointRegisterStackIndex(int reg_code); |
| 1359 MemOperand SafepointRegisterSlot(Register reg); | 1359 MemOperand SafepointRegisterSlot(Register reg); |
| 1360 MemOperand SafepointRegistersAndDoublesSlot(Register reg); | 1360 MemOperand SafepointRegistersAndDoublesSlot(Register reg); |
| 1361 | 1361 |
| 1362 bool generating_stub_; | 1362 bool generating_stub_; |
| 1363 bool allow_stub_calls_; | 1363 bool allow_stub_calls_; |
| 1364 bool has_frame_; | 1364 bool has_frame_; |
| 1365 // This handle will be patched with the code object on installation. | 1365 // This handle will be patched with the code object on installation. |
| 1366 Handle<Object> code_object_; | 1366 Handle<Object> code_object_; |
| 1367 | 1367 |
| 1368 // Needs access to SafepointRegisterStackIndex for compiled frame | 1368 // Needs access to SafepointRegisterStackIndex for optimized frame |
| 1369 // traversal. | 1369 // traversal. |
| 1370 friend class CompiledFrame; | 1370 friend class OptimizedFrame; |
| 1371 }; | 1371 }; |
| 1372 | 1372 |
| 1373 | 1373 |
| 1374 // The code patcher is used to patch (typically) small parts of code e.g. for | 1374 // The code patcher is used to patch (typically) small parts of code e.g. for |
| 1375 // debugging and other types of instrumentation. When using the code patcher | 1375 // debugging and other types of instrumentation. When using the code patcher |
| 1376 // the exact number of bytes specified must be emitted. It is not legal to emit | 1376 // the exact number of bytes specified must be emitted. It is not legal to emit |
| 1377 // relocation information. If any of these constraints are violated it causes | 1377 // relocation information. If any of these constraints are violated it causes |
| 1378 // an assertion to fail. | 1378 // an assertion to fail. |
| 1379 class CodePatcher { | 1379 class CodePatcher { |
| 1380 public: | 1380 public: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1421 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1422 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1422 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1423 #else | 1423 #else |
| 1424 #define ACCESS_MASM(masm) masm-> | 1424 #define ACCESS_MASM(masm) masm-> |
| 1425 #endif | 1425 #endif |
| 1426 | 1426 |
| 1427 | 1427 |
| 1428 } } // namespace v8::internal | 1428 } } // namespace v8::internal |
| 1429 | 1429 |
| 1430 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1430 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |