Commit 2b23e892 authored by Jaideep Bajwa's avatar Jaideep Bajwa Committed by Commit Bot

PPC/s390: Move TF parts of MacroAssembler into new TurboAssembler.

Port dfdcaf43
Port 2e1f5567

Original Commit Message:

    This CL introduces TurboAssembler, a super-class of Assembler and sub-class
    of MacroAssembler. TurboAssembler contains all the functionality that is used
    by Turbofan and previously was part of MacroAssembler. TurboAssembler has
    access to the isolate but, in contrast to MacroAssembler, does not expect to
    be running on the main thread.

R=neis@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6048
LOG=N

Change-Id: I3f51771afefe46410db7cda2625472d78c87f8c6
Reviewed-on: https://chromium-review.googlesource.com/583584Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#46900}
parent 231bb1a2
This diff is collapsed.
This diff is collapsed.
...@@ -200,9 +200,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, ...@@ -200,9 +200,8 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size,
// See assembler-ppc-inl.h for inlined constructors // See assembler-ppc-inl.h for inlined constructors
Operand::Operand(Handle<HeapObject> handle) { Operand::Operand(Handle<HeapObject> handle) {
AllowHandleDereference using_location;
rm_ = no_reg; rm_ = no_reg;
value_.immediate = reinterpret_cast<intptr_t>(handle.location()); value_.immediate = reinterpret_cast<intptr_t>(handle.address());
rmode_ = RelocInfo::EMBEDDED_OBJECT; rmode_ = RelocInfo::EMBEDDED_OBJECT;
} }
......
...@@ -2313,20 +2313,20 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker( ...@@ -2313,20 +2313,20 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
// Fall through when we need to inform the incremental marker. // Fall through when we need to inform the incremental marker.
} }
void ProfileEntryHookStub::MaybeCallEntryHookDelayed(MacroAssembler* masm, void ProfileEntryHookStub::MaybeCallEntryHookDelayed(TurboAssembler* tasm,
Zone* zone) { Zone* zone) {
if (masm->isolate()->function_entry_hook() != NULL) { if (tasm->isolate()->function_entry_hook() != NULL) {
PredictableCodeSizeScope predictable(masm, PredictableCodeSizeScope predictable(tasm,
#if V8_TARGET_ARCH_PPC64 #if V8_TARGET_ARCH_PPC64
14 * Assembler::kInstrSize); 14 * Assembler::kInstrSize);
#else #else
11 * Assembler::kInstrSize); 11 * Assembler::kInstrSize);
#endif #endif
__ mflr(r0); tasm->mflr(r0);
__ Push(r0, ip); tasm->Push(r0, ip);
__ CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr)); tasm->CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr));
__ Pop(r0, ip); tasm->Pop(r0, ip);
__ mtlr(r0); tasm->mtlr(r0);
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -310,7 +310,7 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size, ...@@ -310,7 +310,7 @@ void RelocInfo::unchecked_update_wasm_size(Isolate* isolate, uint32_t size,
Operand::Operand(Handle<HeapObject> handle) { Operand::Operand(Handle<HeapObject> handle) {
AllowHandleDereference using_location; AllowHandleDereference using_location;
rm_ = no_reg; rm_ = no_reg;
value_.immediate = reinterpret_cast<intptr_t>(handle.location()); value_.immediate = reinterpret_cast<intptr_t>(handle.address());
rmode_ = RelocInfo::EMBEDDED_OBJECT; rmode_ = RelocInfo::EMBEDDED_OBJECT;
} }
......
...@@ -336,6 +336,8 @@ class Operand BASE_EMBEDDED { ...@@ -336,6 +336,8 @@ class Operand BASE_EMBEDDED {
return is_heap_object_request_; return is_heap_object_request_;
} }
RelocInfo::Mode rmode() const { return rmode_; }
private: private:
Register rm_; Register rm_;
union Value { union Value {
......
...@@ -2248,10 +2248,10 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker( ...@@ -2248,10 +2248,10 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
// Fall through when we need to inform the incremental marker. // Fall through when we need to inform the incremental marker.
} }
void ProfileEntryHookStub::MaybeCallEntryHookDelayed(MacroAssembler* masm, void ProfileEntryHookStub::MaybeCallEntryHookDelayed(TurboAssembler* tasm,
Zone* zone) { Zone* zone) {
if (masm->isolate()->function_entry_hook() != NULL) { if (tasm->isolate()->function_entry_hook() != NULL) {
PredictableCodeSizeScope predictable(masm, PredictableCodeSizeScope predictable(tasm,
#if V8_TARGET_ARCH_S390X #if V8_TARGET_ARCH_S390X
40); 40);
#elif V8_HOST_ARCH_S390 #elif V8_HOST_ARCH_S390
...@@ -2259,10 +2259,10 @@ void ProfileEntryHookStub::MaybeCallEntryHookDelayed(MacroAssembler* masm, ...@@ -2259,10 +2259,10 @@ void ProfileEntryHookStub::MaybeCallEntryHookDelayed(MacroAssembler* masm,
#else #else
32); 32);
#endif #endif
__ CleanseP(r14); tasm->CleanseP(r14);
__ Push(r14, ip); tasm->Push(r14, ip);
__ CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr)); tasm->CallStubDelayed(new (zone) ProfileEntryHookStub(nullptr));
__ Pop(r14, ip); tasm->Pop(r14, ip);
} }
} }
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment