Reviewers: danno, Yang,
Message:
From reading the codes, it seems that RUNTIME_ENTRY is added for IA32 for
relative direct jump/conditional branch/call instructions. RUNTIME_ENTRY is
encoded and decoded as an EXTERNAL_REFERENCE and they are both fixed (not
moved
by GC). The difference is that for RUNTIME_ENTRY, when the IA32 generated
codes
are moved by GC, the offset in the instruction stream need to be adjusted by
RelocInfo::apply. So in X64 for the RUNTIME_ENTRY usages in this CL, they
could
be replaced by EXTERNAL_REFERENCE.
After this change, the RUNTIME_ENTRY could be freed for the deoptimization
table
entries (they will be generated in the code range and fixed) in X64 and
will be
used for relative direct jump/conditional branch/call in the same way for
IA32.
There is another RUNTIME_ENTRY usage "masm->call(x64_coverage_function,
RelocInfo::RUNTIME_ENTRY)" which is guarded by "#ifdef
GENERATED_CODE_COVERAGE"
in macro-assembler-x64.h. I have tried to enable GENERATED_CODE_COVERAGE in
the
Makefile and common.gypi, and this functionality is broken for all the
platforms.
Description:
Use EXTERNAL_REFERENCE instead of RUNTIME_ENTRY for Runtime::PerformGC and
CallApiFunctionAndReturn in X64
Please review this at https://codereview.chromium.org/11694008/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/x64/code-stubs-x64.cc
M src/x64/macro-assembler-x64.cc
Index: src/x64/code-stubs-x64.cc
===================================================================
--- src/x64/code-stubs-x64.cc (revision 13283)
+++ src/x64/code-stubs-x64.cc (working copy)
@@ -3930,8 +3930,7 @@
__ movq(rdi, rax);
#endif
__ movq(kScratchRegister,
- FUNCTION_ADDR(Runtime::PerformGC),
- RelocInfo::RUNTIME_ENTRY);
+ ExternalReference::perform_gc_function(masm->isolate()));
__ call(kScratchRegister);
}
Index: src/x64/macro-assembler-x64.cc
===================================================================
--- src/x64/macro-assembler-x64.cc (revision 13283)
+++ src/x64/macro-assembler-x64.cc (working copy)
@@ -731,7 +731,7 @@
// Call the api function!
movq(rax, reinterpret_cast<int64_t>(function_address),
- RelocInfo::RUNTIME_ENTRY);
+ RelocInfo::EXTERNAL_REFERENCE);
call(rax);
if (FLAG_log_timer_events) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev