13100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// Copyright 2010 the V8 project authors. All rights reserved.
23100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// Redistribution and use in source and binary forms, with or without
33100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// modification, are permitted provided that the following conditions are
43100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// met:
53100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//
63100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//     * Redistributions of source code must retain the above copyright
73100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       notice, this list of conditions and the following disclaimer.
83100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//     * Redistributions in binary form must reproduce the above
93100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       copyright notice, this list of conditions and the following
103100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       disclaimer in the documentation and/or other materials provided
113100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       with the distribution.
123100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//     * Neither the name of Google Inc. nor the names of its
133100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       contributors may be used to endorse or promote products derived
143100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//       from this software without specific prior written permission.
153100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu//
163100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
173100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
183100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
193100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
203100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
213100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
223100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
233100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
243100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
253100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
263100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
273100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
283100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
293100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#include "v8.h"
303100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
31f7060e27768c550ace7ec48ad8c093466db52dfaLeon Clarke#if defined(V8_TARGET_ARCH_MIPS)
32f7060e27768c550ace7ec48ad8c093466db52dfaLeon Clarke
333100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#include "codegen-inl.h"
343100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#include "jump-target-inl.h"
353100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#include "register-allocator-inl.h"
366ded16be15dd865a9b21ea304d5273c8be299c87Steve Block#include "virtual-frame-inl.h"
373100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
383100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescunamespace v8 {
393100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescunamespace internal {
403100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
413100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// -------------------------------------------------------------------------
423100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu// JumpTarget implementation.
433100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
443100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#define __ ACCESS_MASM(cgen()->masm())
453100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
4644f0eee88ff00398ff7f715fab053374d808c90dSteve Block// BRANCH_ARGS_CHECK checks that conditional jump arguments are correct.
4744f0eee88ff00398ff7f715fab053374d808c90dSteve Block#define BRANCH_ARGS_CHECK(cond, rs, rt) ASSERT(                                \
4844f0eee88ff00398ff7f715fab053374d808c90dSteve Block    (cond == cc_always && rs.is(zero_reg) && rt.rm().is(zero_reg)) ||          \
4944f0eee88ff00398ff7f715fab053374d808c90dSteve Block    (cond != cc_always && (!rs.is(zero_reg) || !rt.rm().is(zero_reg))))
5044f0eee88ff00398ff7f715fab053374d808c90dSteve Block
5144f0eee88ff00398ff7f715fab053374d808c90dSteve Block
523100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescuvoid JumpTarget::DoJump() {
5344f0eee88ff00398ff7f715fab053374d808c90dSteve Block  UNIMPLEMENTED_MIPS();
543100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu}
553100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
5644f0eee88ff00398ff7f715fab053374d808c90dSteve Block// Original prototype for mips, needs arch-indep change. Leave out for now.
5744f0eee88ff00398ff7f715fab053374d808c90dSteve Block// void JumpTarget::DoBranch(Condition cc, Hint ignored,
5844f0eee88ff00398ff7f715fab053374d808c90dSteve Block//     Register src1, const Operand& src2) {
593100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescuvoid JumpTarget::DoBranch(Condition cc, Hint ignored) {
603100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu  UNIMPLEMENTED_MIPS();
613100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu}
623100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
633100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
643100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescuvoid JumpTarget::Call() {
653100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu  UNIMPLEMENTED_MIPS();
663100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu}
673100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
683100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
693100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescuvoid JumpTarget::DoBind() {
703100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu  UNIMPLEMENTED_MIPS();
713100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu}
723100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
733100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
743100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu#undef __
7544f0eee88ff00398ff7f715fab053374d808c90dSteve Block#undef BRANCH_ARGS_CHECK
763100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
773100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
783100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu} }  // namespace v8::internal
793100271588b61cbc1dc472a3f2f105d2eed8497fAndrei Popescu
80f7060e27768c550ace7ec48ad8c093466db52dfaLeon Clarke#endif  // V8_TARGET_ARCH_MIPS
81