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

Unified Diff: src/assembler-ia32.h

Issue 13783: * Made preemption work in Irregexp-native-ia32 (Closed)
Patch Set: Addressed review comments Created 12 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler-ia32.h
diff --git a/src/assembler-ia32.h b/src/assembler-ia32.h
index 17c6b82d600fd41258127426b4d21c9eb1364eb4..2abf24aaa1cbf7cce44567705de7df1ce849a471 100644
--- a/src/assembler-ia32.h
+++ b/src/assembler-ia32.h
@@ -185,6 +185,10 @@ class Immediate BASE_EMBEDDED {
inline explicit Immediate(Handle<Object> handle);
inline explicit Immediate(Smi* value);
+ static Immediate CodeRelativeOffset(Label* label) {
+ return Immediate(label);
+ }
+
bool is_zero() const { return x_ == 0 && rmode_ == RelocInfo::NONE; }
bool is_int8() const {
return -128 <= x_ && x_ < 128 && rmode_ == RelocInfo::NONE;
@@ -194,6 +198,8 @@ class Immediate BASE_EMBEDDED {
}
private:
+ inline explicit Immediate(Label* value);
+
int x_;
RelocInfo::Mode rmode_;
@@ -731,24 +737,6 @@ class Assembler : public Malloced {
private:
- // Code buffer:
- // The buffer into which code and relocation info are generated.
- byte* buffer_;
- int buffer_size_;
- // True if the assembler owns the buffer, false if buffer is external.
- bool own_buffer_;
-
- // code generation
- byte* pc_; // the program counter; moves forward
- RelocInfoWriter reloc_info_writer;
-
- // push-pop elimination
- byte* last_pc_;
-
- // source position information
- int last_position_;
- int last_statement_position_;
-
byte* addr_at(int pos) { return buffer_ + pos; }
byte byte_at(int pos) { return buffer_[pos]; }
uint32_t long_at(int pos) {
@@ -766,6 +754,9 @@ class Assembler : public Malloced {
inline void emit(const Immediate& x);
inline void emit_w(const Immediate& x);
+ // Emit the code-object-relative offset of the label's position
+ inline void emit_code_relative_offset(Label* label);
+
// instruction generation
void emit_arith_b(int op1, int op2, Register dst, int imm8);
@@ -794,6 +785,24 @@ class Assembler : public Malloced {
friend class CodePatcher;
friend class EnsureSpace;
+
+ // Code buffer:
+ // The buffer into which code and relocation info are generated.
+ byte* buffer_;
+ int buffer_size_;
+ // True if the assembler owns the buffer, false if buffer is external.
+ bool own_buffer_;
+
+ // code generation
+ byte* pc_; // the program counter; moves forward
+ RelocInfoWriter reloc_info_writer;
+
+ // push-pop elimination
+ byte* last_pc_;
+
+ // source position information
+ int last_position_;
+ int last_statement_position_;
};
« no previous file with comments | « no previous file | src/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698