Chromium Code Reviews

Side by Side Diff: src/arm/macro-assembler-arm.h

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

Powered by Google App Engine