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

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

Issue 342054: Introduce a switch for the new snapshot code and switch... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // GetCode emits any pending (non-emitted) code and fills the descriptor 433 // GetCode emits any pending (non-emitted) code and fills the descriptor
434 // desc. GetCode() is idempotent; it returns the same result if no other 434 // desc. GetCode() is idempotent; it returns the same result if no other
435 // Assembler functions are invoked in between GetCode() calls. 435 // Assembler functions are invoked in between GetCode() calls.
436 void GetCode(CodeDesc* desc); 436 void GetCode(CodeDesc* desc);
437 437
438 // Read/Modify the code target in the branch/call instruction at pc. 438 // Read/Modify the code target in the branch/call instruction at pc.
439 inline static Address target_address_at(Address pc); 439 inline static Address target_address_at(Address pc);
440 inline static void set_target_address_at(Address pc, Address target); 440 inline static void set_target_address_at(Address pc, Address target);
441 441
442 // This sets the branch destination (which is in the instruction on x86). 442 // This sets the branch destination (which is in the instruction on x86).
443 // This is for calls and branches within generated code.
443 inline static void set_target_at(Address instruction_payload, 444 inline static void set_target_at(Address instruction_payload,
444 Address target) { 445 Address target) {
445 set_target_address_at(instruction_payload, target); 446 set_target_address_at(instruction_payload, target);
446 } 447 }
447 448
449 // This sets the branch destination (which is in the instruction on x86).
450 // This is for calls and branches to runtime code.
451 inline static void set_external_target_at(Address instruction_payload,
452 Address target) {
453 set_target_address_at(instruction_payload, target);
454 }
455
448 static const int kCallTargetSize = kPointerSize; 456 static const int kCallTargetSize = kPointerSize;
457 static const int kExternalTargetSize = kPointerSize;
449 458
450 // Distance between the address of the code target in the call instruction 459 // Distance between the address of the code target in the call instruction
451 // and the return address 460 // and the return address
452 static const int kCallTargetAddressOffset = kPointerSize; 461 static const int kCallTargetAddressOffset = kPointerSize;
453 // Distance between start of patched return sequence and the emitted address 462 // Distance between start of patched return sequence and the emitted address
454 // to jump to. 463 // to jump to.
455 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. 464 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32.
456 465
457 466
458 // --------------------------------------------------------------------------- 467 // ---------------------------------------------------------------------------
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 private: 892 private:
884 Assembler* assembler_; 893 Assembler* assembler_;
885 #ifdef DEBUG 894 #ifdef DEBUG
886 int space_before_; 895 int space_before_;
887 #endif 896 #endif
888 }; 897 };
889 898
890 } } // namespace v8::internal 899 } } // namespace v8::internal
891 900
892 #endif // V8_IA32_ASSEMBLER_IA32_H_ 901 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/mksnapshot.cc » ('j') | src/mksnapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698