OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 336 |
337 | 337 |
338 // Generate an Operand for loading an indexed field from an object. | 338 // Generate an Operand for loading an indexed field from an object. |
339 static inline Operand FieldOperand(Register object, | 339 static inline Operand FieldOperand(Register object, |
340 Register index, | 340 Register index, |
341 ScaleFactor scale, | 341 ScaleFactor scale, |
342 int offset) { | 342 int offset) { |
343 return Operand(object, index, scale, offset - kHeapObjectTag); | 343 return Operand(object, index, scale, offset - kHeapObjectTag); |
344 } | 344 } |
345 | 345 |
| 346 |
| 347 #ifdef GENERATED_CODE_COVERAGE |
| 348 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 349 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 350 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 351 extern byte* ia32_coverage_function; |
| 352 #define DEFINE_MASM(masm) \ |
| 353 masm->pushfd(); \ |
| 354 masm->pushad(); \ |
| 355 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ |
| 356 masm->call(ia32_coverage_function, RelocInfo::RUNTIME_ENTRY); \ |
| 357 masm->pop(eax); \ |
| 358 masm->popad(); \ |
| 359 masm->popfd(); \ |
| 360 masm-> |
| 361 #else |
| 362 #define DEFINE_MASM(masm) masm-> |
| 363 #endif |
| 364 |
| 365 |
346 } } // namespace v8::internal | 366 } } // namespace v8::internal |
347 | 367 |
348 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 368 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |