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

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

Issue 651029: Forking disassembler and simulator for Thumb2 support; (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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/arm/disasm-arm.cc ('k') | src/arm/macro-assembler-arm.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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // relocation information. If any of these constraints are violated it causes 455 // relocation information. If any of these constraints are violated it causes
456 // an assertion to fail. 456 // an assertion to fail.
457 class CodePatcher { 457 class CodePatcher {
458 public: 458 public:
459 CodePatcher(byte* address, int instructions); 459 CodePatcher(byte* address, int instructions);
460 virtual ~CodePatcher(); 460 virtual ~CodePatcher();
461 461
462 // Macro assembler to emit code. 462 // Macro assembler to emit code.
463 MacroAssembler* masm() { return &masm_; } 463 MacroAssembler* masm() { return &masm_; }
464 464
465 // Emit an instruction directly.
466 void Emit(Instr x);
467
468 // Emit an address directly. 465 // Emit an address directly.
469 void Emit(Address addr); 466 void Emit(Address addr);
470 467
471 private: 468 private:
472 byte* address_; // The address of the code being patched. 469 byte* address_; // The address of the code being patched.
473 int instructions_; // Number of instructions of the expected patch size. 470 int instructions_; // Number of instructions of the expected patch size.
474 int size_; // Number of bytes of the expected patch size. 471 int size_; // Number of bytes of the expected patch size.
475 MacroAssembler masm_; // Macro assembler used to generate the code. 472 MacroAssembler masm_; // Macro assembler used to generate the code.
476 }; 473 };
477 #endif // ENABLE_DEBUGGER_SUPPORT 474 #endif // ENABLE_DEBUGGER_SUPPORT
478 475
479 476
480 // ----------------------------------------------------------------------------- 477 // -----------------------------------------------------------------------------
481 // Static helper functions. 478 // Static helper functions.
482 479
483 #ifdef GENERATED_CODE_COVERAGE 480 #ifdef GENERATED_CODE_COVERAGE
484 #define CODE_COVERAGE_STRINGIFY(x) #x 481 #define CODE_COVERAGE_STRINGIFY(x) #x
485 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 482 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
486 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 483 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
487 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 484 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
488 #else 485 #else
489 #define ACCESS_MASM(masm) masm-> 486 #define ACCESS_MASM(masm) masm->
490 #endif 487 #endif
491 488
492 489
493 } } // namespace v8::internal 490 } } // namespace v8::internal
494 491
495 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 492 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698