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

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

Issue 203016: Implement code patcher for 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/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 // Allocation support helpers. 374 // Allocation support helpers.
375 void LoadAllocationTopHelper(Register result, 375 void LoadAllocationTopHelper(Register result,
376 Register result_end, 376 Register result_end,
377 Register scratch, 377 Register scratch,
378 AllocationFlags flags); 378 AllocationFlags flags);
379 void UpdateAllocationTopHelper(Register result_end, Register scratch); 379 void UpdateAllocationTopHelper(Register result_end, Register scratch);
380 }; 380 };
381 381
382 382
383 #ifdef ENABLE_DEBUGGER_SUPPORT
384 // The code patcher is used to patch (typically) small parts of code e.g. for
385 // debugging and other types of instrumentation. When using the code patcher
386 // the exact number of bytes specified must be emitted. Is not legal to emit
387 // relocation information. If any of these constraints are violated it causes
388 // an assertion.
389 class CodePatcher {
390 public:
391 CodePatcher(byte* address, int size);
392 virtual ~CodePatcher();
393
394 // Macro assembler to emit code.
395 MacroAssembler* masm() { return &masm_; }
396
397 private:
398 byte* address_; // The address of the code being patched.
399 int size_; // Number of bytes of the expected patch size.
400 MacroAssembler masm_; // Macro assembler used to generate the code.
401 };
402 #endif // ENABLE_DEBUGGER_SUPPORT
403
404
383 // ----------------------------------------------------------------------------- 405 // -----------------------------------------------------------------------------
384 // Static helper functions. 406 // Static helper functions.
385 407
386 // Generate an Operand for loading a field from an object. 408 // Generate an Operand for loading a field from an object.
387 static inline Operand FieldOperand(Register object, int offset) { 409 static inline Operand FieldOperand(Register object, int offset) {
388 return Operand(object, offset - kHeapObjectTag); 410 return Operand(object, offset - kHeapObjectTag);
389 } 411 }
390 412
391 413
392 // Generate an Operand for loading an indexed field from an object. 414 // Generate an Operand for loading an indexed field from an object.
(...skipping 23 matching lines...) Expand all
416 } \ 438 } \
417 masm-> 439 masm->
418 #else 440 #else
419 #define ACCESS_MASM(masm) masm-> 441 #define ACCESS_MASM(masm) masm->
420 #endif 442 #endif
421 443
422 444
423 } } // namespace v8::internal 445 } } // namespace v8::internal
424 446
425 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 447 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698