Commit 30f9d529 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[ia32] Make InterpreterEntryTrampoline preserve kRootRegister (ebx)

Also takes care of InterpreterEnterBytecodeAdvance.

Drive-by:
 - Add DCHECK to ensure cmpb is only used with byte registers.
 - Add Push/PopRootRegister to TurboAssembler with DCHECK ensuring
   that there is a NoRootArrayScope


Change-Id: Ibcf1c91b12767bdf6425b18872c41b31124de3ba
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/1190305Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55512}
parent 0acf185a
This diff is collapsed.
......@@ -667,7 +667,10 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
void and_(Operand dst, Register src);
void and_(Operand dst, const Immediate& x);
void cmpb(Register reg, Immediate imm8) { cmpb(Operand(reg), imm8); }
void cmpb(Register reg, Immediate imm8) {
DCHECK(reg.is_byte_register());
cmpb(Operand(reg), imm8);
}
void cmpb(Operand op, Immediate imm8);
void cmpb(Register reg, Operand op);
void cmpb(Operand op, Register reg);
......
......@@ -255,6 +255,17 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadAddress(Register destination, ExternalReference source);
void PushRootRegister() {
// Check that a NoRootArrayScope exists.
CHECK(!root_array_available());
push(kRootRegister);
}
void PopRootRegister() {
// Check that a NoRootArrayScope exists.
CHECK(!root_array_available());
pop(kRootRegister);
}
// Wrapper functions to ensure external reference operands produce
// isolate-independent code if needed.
Operand StaticVariable(const ExternalReference& ext);
......
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