Commit a298eb56 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[ia32,root] Add more ebx access scopes

R=jarin@chromium.org

Change-Id: Ib4dd0135e7ade3bbe5dd89ae8d2915ca6707f015
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1264275Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56470}
parent 7f474f93
......@@ -4311,6 +4311,7 @@ void CodeGenerator::AssembleConstructFrame() {
if (saves != 0) { // Save callee-saved registers.
DCHECK(!info()->is_osr());
TurboAssembler::AllowExplicitEbxAccessScope spill_register(tasm());
for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
if (((1 << i) & saves)) __ push(Register::from_code(i));
}
......@@ -4333,6 +4334,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
__ add(esp, Immediate(returns * kPointerSize));
}
for (int i = 0; i < Register::kNumRegisters; i++) {
TurboAssembler::AllowExplicitEbxAccessScope reload_register(tasm());
if (!((1 << i) & saves)) continue;
__ pop(Register::from_code(i));
}
......
......@@ -2214,6 +2214,10 @@ void Assembler::setcc(Condition cc, Register reg) {
void Assembler::cvttss2si(Register dst, Operand src) {
EnsureSpace ensure_space(this);
// The [src] might contain ebx's register code, but in
// this case, it refers to xmm3, so it is OK to emit.
AllowExplicitEbxAccessScope accessing_xmm_register(this);
DCHECK(is_ebx_addressable_ || dst != ebx);
EMIT(0xF3);
EMIT(0x0F);
EMIT(0x2C);
......@@ -2222,6 +2226,10 @@ void Assembler::cvttss2si(Register dst, Operand src) {
void Assembler::cvttsd2si(Register dst, Operand src) {
EnsureSpace ensure_space(this);
// The [src] might contain ebx's register code, but in
// this case, it refers to xmm3, so it is OK to emit.
AllowExplicitEbxAccessScope accessing_xmm_register(this);
DCHECK(is_ebx_addressable_ || dst != ebx);
EMIT(0xF2);
EMIT(0x0F);
EMIT(0x2C);
......
......@@ -44,6 +44,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
// Save callee-saved registers (C calling conventions).
__ push(edi);
__ push(esi);
Assembler::AllowExplicitEbxAccessScope spill_register(masm);
__ push(ebx);
__ InitializeRootRegister();
......
......@@ -110,6 +110,7 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void CheckStackAlignment();
void InitializeRootRegister() {
Assembler::AllowExplicitEbxAccessScope setup(this);
// For now, only check sentinel value for root register.
// TODO(jgruber,v8:6666): Implement root register.
if (FLAG_ia32_verify_root_register && FLAG_embedded_builtins) {
......
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