| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // --------------------------------------------------------------------------- | 312 // --------------------------------------------------------------------------- |
| 313 // Inline caching support | 313 // Inline caching support |
| 314 | 314 |
| 315 // Generate code for checking access rights - used for security checks | 315 // Generate code for checking access rights - used for security checks |
| 316 // on access to global objects across environments. The holder register | 316 // on access to global objects across environments. The holder register |
| 317 // is left untouched, whereas both scratch registers are clobbered. | 317 // is left untouched, whereas both scratch registers are clobbered. |
| 318 void CheckAccessGlobalProxy(Register holder_reg, | 318 void CheckAccessGlobalProxy(Register holder_reg, |
| 319 Register scratch, | 319 Register scratch, |
| 320 Label* miss); | 320 Label* miss); |
| 321 | 321 |
| 322 inline void MarkCode(NopMarkerTypes type) { |
| 323 nop(type); |
| 324 } |
| 325 |
| 326 // Check if the given instruction is a 'type' marker. |
| 327 // ie. check if is is a mov r<type>, r<type> (referenced as nop(type)) |
| 328 // These instructions are generated to mark special location in the code, |
| 329 // like some special IC code. |
| 330 static inline bool IsMarkedCode(Instr instr, int type) { |
| 331 ASSERT((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER)); |
| 332 return IsNop(instr, type); |
| 333 } |
| 334 |
| 335 |
| 336 static inline int GetCodeMarker(Instr instr) { |
| 337 int dst_reg_offset = 12; |
| 338 int dst_mask = 0xf << dst_reg_offset; |
| 339 int src_mask = 0xf; |
| 340 int dst_reg = (instr & dst_mask) >> dst_reg_offset; |
| 341 int src_reg = instr & src_mask; |
| 342 uint32_t non_register_mask = ~(dst_mask | src_mask); |
| 343 uint32_t mov_mask = al | 13 << 21; |
| 344 |
| 345 // Return <n> if we have a mov rn rn, else return -1. |
| 346 int type = ((instr & non_register_mask) == mov_mask) && |
| 347 (dst_reg == src_reg) && |
| 348 (FIRST_IC_MARKER <= dst_reg) && (dst_reg < LAST_CODE_MARKER) |
| 349 ? src_reg |
| 350 : -1; |
| 351 ASSERT((type == -1) || |
| 352 ((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER))); |
| 353 return type; |
| 354 } |
| 355 |
| 322 | 356 |
| 323 // --------------------------------------------------------------------------- | 357 // --------------------------------------------------------------------------- |
| 324 // Allocation support | 358 // Allocation support |
| 325 | 359 |
| 326 // Allocate an object in new space. The object_size is specified in words (not | 360 // Allocate an object in new space. The object_size is specified in words (not |
| 327 // bytes). If the new space is exhausted control continues at the gc_required | 361 // bytes). If the new space is exhausted control continues at the gc_required |
| 328 // label. The allocated object is returned in result. If the flag | 362 // label. The allocated object is returned in result. If the flag |
| 329 // tag_allocated_object is true the result is tagged as as a heap object. All | 363 // tag_allocated_object is true the result is tagged as as a heap object. All |
| 330 // registers are clobbered also when control continues at the gc_required | 364 // registers are clobbered also when control continues at the gc_required |
| 331 // label. | 365 // label. |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 777 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 744 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 778 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 745 #else | 779 #else |
| 746 #define ACCESS_MASM(masm) masm-> | 780 #define ACCESS_MASM(masm) masm-> |
| 747 #endif | 781 #endif |
| 748 | 782 |
| 749 | 783 |
| 750 } } // namespace v8::internal | 784 } } // namespace v8::internal |
| 751 | 785 |
| 752 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 786 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |