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

Unified Diff: src/arm/assembler-arm.h

Issue 23536056: Thumb2 Backend: Enable Assembler to encode Thumb2 instructions Base URL: HEAD^
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.h
diff --git a/src/arm/assembler-arm.h b/src/arm/assembler-arm.h
index c0f0125803c285f1b87e820c537ebb1f4f736342..54f77794e2f87cef2c0decc9a0bf6fc6ad87d97b 100644
--- a/src/arm/assembler-arm.h
+++ b/src/arm/assembler-arm.h
@@ -697,6 +697,9 @@ extern const Instr kCmpCmnFlip;
extern const Instr kAddSubFlip;
extern const Instr kAndBicFlip;
+extern const Instr kThumbLdrPCMask;
+extern const Instr kThumbLdrPCPattern;
+
struct VmovIndex {
unsigned char index;
};
@@ -806,6 +809,7 @@ class Assembler : public AssemblerBase {
// Difference between address of current opcode and value read from pc
// register.
static const int kPcLoadDelta = 8;
+ static const int kThumbPcLoadDelta = 4;
static const int kJSReturnSequenceInstructions = 4;
static const int kDebugBreakSlotInstructions = 3;
@@ -1578,6 +1582,8 @@ class Assembler : public AssemblerBase {
static bool IsNop(Instr instr, int type = NON_MARKING_NOP);
static bool IsMovT(Instr instr);
static bool IsMovW(Instr instr);
+ static bool IsMovTThumb(Instr instr);
+ static bool IsMovWThumb(Instr instr);
// Constants in pools are accessed via pc relative addressing, which can
// reach +/-4KB for integer PC-relative loads and +/-1KB for floating-point
@@ -1595,6 +1601,11 @@ class Assembler : public AssemblerBase {
// Check if is time to emit a constant pool.
void CheckConstPool(bool force_emit, bool require_jump);
+ void set_thumb_mode() { thumb_mode_ = true; }
+ void set_arm_mode() { thumb_mode_ = false; }
+
+ bool is_thumb_mode() {return thumb_mode_; }
+
protected:
// Relocation for a type-recording IC has the AST id added to it. This
// member variable is a way to pass the information from the call site to
@@ -1605,9 +1616,11 @@ class Assembler : public AssemblerBase {
// Decode branch instruction at pos and return branch target pos
int target_at(int pos);
+ int target_at_thumb(int pos);
// Patch branch instruction at pos to branch to given branch target pos
void target_at_put(int pos, int target_pos);
+ void target_at_put_thumb(int pos, int target_pos);
// Prevent contant pool emission until EndBlockConstPool is called.
// Call to this function can be nested but must be followed by an equal
@@ -1851,6 +1864,8 @@ class Assembler : public AssemblerBase {
PositionsRecorder positions_recorder_;
friend class PositionsRecorder;
friend class EnsureSpace;
+
+ bool thumb_mode_;
};
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698