diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/assembler/CodeLocation.h | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/assembler/CodeLocation.h')
-rw-r--r-- | Source/JavaScriptCore/assembler/CodeLocation.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/JavaScriptCore/assembler/CodeLocation.h b/Source/JavaScriptCore/assembler/CodeLocation.h index 86d1f2b75..3116e0602 100644 --- a/Source/JavaScriptCore/assembler/CodeLocation.h +++ b/Source/JavaScriptCore/assembler/CodeLocation.h @@ -32,6 +32,8 @@ namespace JSC { +enum NearCallMode { Regular, Tail }; + class CodeLocationInstruction; class CodeLocationLabel; class CodeLocationJump; @@ -59,7 +61,7 @@ public: CodeLocationLabel labelAtOffset(int offset); CodeLocationJump jumpAtOffset(int offset); CodeLocationCall callAtOffset(int offset); - CodeLocationNearCall nearCallAtOffset(int offset); + CodeLocationNearCall nearCallAtOffset(int offset, NearCallMode); CodeLocationDataLabelPtr dataLabelPtrAtOffset(int offset); CodeLocationDataLabel32 dataLabel32AtOffset(int offset); CodeLocationDataLabelCompact dataLabelCompactAtOffset(int offset); @@ -115,10 +117,13 @@ public: class CodeLocationNearCall : public CodeLocationCommon { public: CodeLocationNearCall() {} - explicit CodeLocationNearCall(MacroAssemblerCodePtr location) - : CodeLocationCommon(location) {} - explicit CodeLocationNearCall(void* location) - : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} + explicit CodeLocationNearCall(MacroAssemblerCodePtr location, NearCallMode callMode) + : CodeLocationCommon(location), m_callMode(callMode) { } + explicit CodeLocationNearCall(void* location, NearCallMode callMode) + : CodeLocationCommon(MacroAssemblerCodePtr(location)), m_callMode(callMode) { } + NearCallMode callMode() { return m_callMode; } +private: + NearCallMode m_callMode = NearCallMode::Regular; }; class CodeLocationDataLabel32 : public CodeLocationCommon { @@ -181,10 +186,10 @@ inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset) return CodeLocationCall(reinterpret_cast<char*>(dataLocation()) + offset); } -inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset) +inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset, NearCallMode callMode) { ASSERT_VALID_CODE_OFFSET(offset); - return CodeLocationNearCall(reinterpret_cast<char*>(dataLocation()) + offset); + return CodeLocationNearCall(reinterpret_cast<char*>(dataLocation()) + offset, callMode); } inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset) |