Reviewers: ulan, jochen,
Description:
ARM64: Fix EnsureSpace to not emit pools.
The EnsureSpace scope must not trigger any code emission, so it should only
grow
the buffer, and not check for pools.
Please review this at https://codereview.chromium.org/230223005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -2 lines):
M src/arm64/assembler-arm64.h
M src/arm64/assembler-arm64-inl.h
Index: src/arm64/assembler-arm64-inl.h
diff --git a/src/arm64/assembler-arm64-inl.h
b/src/arm64/assembler-arm64-inl.h
index
b56e3ed2a18a3aff20778a4240c25af67596d170..3d12ac076c39c150e8f5f2bdba79be53eac9ad8d
100644
--- a/src/arm64/assembler-arm64-inl.h
+++ b/src/arm64/assembler-arm64-inl.h
@@ -1199,11 +1199,16 @@ void Assembler::LoadRelocated(const CPURegister&
rt, const Operand& operand) {
}
-inline void Assembler::CheckBuffer() {
+inline void Assembler::CheckBufferSpace() {
ASSERT(pc_ < (buffer_ + buffer_size_));
if (buffer_space() < kGap) {
GrowBuffer();
}
+}
+
+
+inline void Assembler::CheckBuffer() {
+ CheckBufferSpace();
if (pc_offset() >= next_veneer_pool_check_) {
CheckVeneerPool(false, true);
}
Index: src/arm64/assembler-arm64.h
diff --git a/src/arm64/assembler-arm64.h b/src/arm64/assembler-arm64.h
index
9a8cd467a0f7b8425c6dabe754f9f7f89cc54686..dcf83078709593fce60785d6af0c34eb385d2cc6
100644
--- a/src/arm64/assembler-arm64.h
+++ b/src/arm64/assembler-arm64.h
@@ -2040,6 +2040,7 @@ class Assembler : public AssemblerBase {
}
void GrowBuffer();
+ void CheckBufferSpace();
void CheckBuffer();
// Pc offset of the next constant pool check.
@@ -2238,7 +2239,7 @@ class PatchingAssembler : public Assembler {
class EnsureSpace BASE_EMBEDDED {
public:
explicit EnsureSpace(Assembler* assembler) {
- assembler->CheckBuffer();
+ assembler->CheckBufferSpace();
}
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.