Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

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

Issue 193057: Cleaned up some debugger stuff on ia32 and x64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 // Allocation support helpers. 332 // Allocation support helpers.
333 void LoadAllocationTopHelper(Register result, 333 void LoadAllocationTopHelper(Register result,
334 Register result_end, 334 Register result_end,
335 Register scratch, 335 Register scratch,
336 AllocationFlags flags); 336 AllocationFlags flags);
337 void UpdateAllocationTopHelper(Register result_end, Register scratch); 337 void UpdateAllocationTopHelper(Register result_end, Register scratch);
338 }; 338 };
339 339
340 340
341 #ifdef ENABLE_DEBUGGER_SUPPORT
341 // The code patcher is used to patch (typically) small parts of code e.g. for 342 // The code patcher is used to patch (typically) small parts of code e.g. for
342 // debugging and other types of instrumentation. When using the code patcher 343 // debugging and other types of instrumentation. When using the code patcher
343 // the exact number of bytes specified must be emitted. Is not legal to emit 344 // the exact number of bytes specified must be emitted. Is not legal to emit
344 // relocation information. If any of these constraints are violated it causes 345 // relocation information. If any of these constraints are violated it causes
345 // an assertion. 346 // an assertion.
346 class CodePatcher { 347 class CodePatcher {
347 public: 348 public:
348 CodePatcher(byte* address, int size); 349 CodePatcher(byte* address, int size);
349 virtual ~CodePatcher(); 350 virtual ~CodePatcher();
350 351
351 // Macro assembler to emit code. 352 // Macro assembler to emit code.
352 MacroAssembler* masm() { return &masm_; } 353 MacroAssembler* masm() { return &masm_; }
353 354
354 private: 355 private:
355 byte* address_; // The address of the code being patched. 356 byte* address_; // The address of the code being patched.
356 int size_; // Number of bytes of the expected patch size. 357 int size_; // Number of bytes of the expected patch size.
357 MacroAssembler masm_; // Macro assembler used to generate the code. 358 MacroAssembler masm_; // Macro assembler used to generate the code.
358 }; 359 };
360 #endif // ENABLE_DEBUGGER_SUPPORT
359 361
360 362
361 // ----------------------------------------------------------------------------- 363 // -----------------------------------------------------------------------------
362 // Static helper functions. 364 // Static helper functions.
363 365
364 // Generate an Operand for loading a field from an object. 366 // Generate an Operand for loading a field from an object.
365 static inline Operand FieldOperand(Register object, int offset) { 367 static inline Operand FieldOperand(Register object, int offset) {
366 return Operand(object, offset - kHeapObjectTag); 368 return Operand(object, offset - kHeapObjectTag);
367 } 369 }
368 370
(...skipping 25 matching lines...) Expand all
394 } \ 396 } \
395 masm-> 397 masm->
396 #else 398 #else
397 #define ACCESS_MASM(masm) masm-> 399 #define ACCESS_MASM(masm) masm->
398 #endif 400 #endif
399 401
400 402
401 } } // namespace v8::internal 403 } } // namespace v8::internal
402 404
403 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 405 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698