From b83da9f5c3cc9e4604cfc44bea7328f41e1ff347 Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Thu, 20 Feb 2014 21:03:26 +0000 Subject: [PATCH] MIPS: Add flag for testing long branch mode. TEST= BUG= R=jkummerow@chromium.org, plind44@gmail.com Review URL: https://codereview.chromium.org/173773003 Patch from Dusan Milosavljevic . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/flag-definitions.h | 2 ++ src/mips/assembler-mips.cc | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 476e534..13de6b5 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -398,6 +398,8 @@ DEFINE_bool(enable_32dregs, ENABLE_32DREGS_DEFAULT, "enable use of d16-d31 registers on ARM - this requires VFP3") DEFINE_bool(enable_vldr_imm, false, "enable use of constant pools for double immediate (ARM only)") +DEFINE_bool(force_long_branches, false, + "force all emitted branches to be in long mode (MIPS only)") // bootstrapper.cc DEFINE_string(expose_natives_as, NULL, "expose natives in global object") diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc index f551dd5..9adb900 100644 --- a/src/mips/assembler-mips.cc +++ b/src/mips/assembler-mips.cc @@ -313,11 +313,12 @@ Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size) trampoline_pool_blocked_nesting_ = 0; // We leave space (16 * kTrampolineSlotsSize) // for BlockTrampolinePoolScope buffer. - next_buffer_check_ = kMaxBranchOffset - kTrampolineSlotsSize * 16; + next_buffer_check_ = FLAG_force_long_branches + ? kMaxInt : kMaxBranchOffset - kTrampolineSlotsSize * 16; internal_trampoline_exception_ = false; last_bound_pos_ = 0; - trampoline_emitted_ = false; + trampoline_emitted_ = FLAG_force_long_branches; unbound_labels_count_ = 0; block_buffer_growth_ = false; -- 2.7.4