Commit 0a95b0e9 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

inst-tasks.hh, inst-tasks.cc: populate

parent 39afac5e
//
// This file is part of Mipsy, a tiny MIPS simulator
// Copyright (C) 2003 Benoit Perrot <benoit@lrde.epita.fr>
//
// Mipsy is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Mipsy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include "common.hh"
#include "parse/parse-tasks.hh"
#include "inst/inst-tasks.hh"
#include "inst/program_solver.hh"
// Inst module related tasks' implementation.
namespace inst
{
namespace tasks
{
void
prg_display ()
{
std::cout << *parse::tasks::program << std::endl;
}
void
prg_solve ()
{
inst::ProgramSolver program_solver;
program_solver.solve(* parse::tasks::program);
if (exit_status != exit_success)
exit (exit_status);
}
} // namespace tasks
} // namespace inst
//
// This file is part of Mipsy, a tiny MIPS simulator
// Copyright (C) 2003 Benoit Perrot <benoit@lrde.epita.fr>
//
// Mipsy is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Mipsy is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef INST_INST_TASKS_HH
# define INST_INST_TASKS_HH
# include "task/task.hh"
namespace inst
{
namespace tasks
{
TASK_MODULE ("2. Instructions");
TASK_DECLARE ("prg-display",
"Display the read program",
prg_display, "parse");
TASK_DECLARE ("prg-solve",
"Resolve jump offsets and check bounds of immediates",
prg_solve, "parse");
} // namespace tasks
} // namespace inst
#endif // !INST_INST_TASKS_HH
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