Commit b9021fd0 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoît Perrot  <benoit@lrde.epita.fr>
        * src/common.hh,
        * src/mipsy.cc,
        * src/inst/exp.hh,
        * src/inst/register.hh,
        * src/vm/cpu.hh, src/vm/cpu.cc:
        Use STL type naming style on enumerations.
parent 792a192b
2004-04-03 Benot Perrot <benoit@lrde.epita.fr>
* src/common.hh,
* src/mipsy.cc,
* src/inst/exp.hh,
* src/inst/register.hh,
* src/vm/cpu.hh, src/vm/cpu.cc:
Use STL type naming style on enumerations.
2004-04-03 Benot Perrot <benoit@lrde.epita.fr>
* dev/inst-nodes-gen.py,
......
......@@ -2,22 +2,23 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 79)
(Parent-Version mipsy 0 78)
(Project-Version mipsy 0 80)
(Parent-Version mipsy 0 79)
(Version-Log
"Index: ChangeLog
from Benot Perrot <benoit@lrde.epita.fr>
* dev/inst-nodes-gen.py,
* src/inst/exp.cc:
Display the identifier of labels and registers instead of
their address.
* src/common.hh,
* src/mipsy.cc,
* src/inst/exp.hh,
* src/inst/register.hh,
* src/vm/cpu.hh, src/vm/cpu.cc:
Use STL type naming style on enumerations.
")
(New-Version-Log
"")
(Checkin-Time "Sat, 03 Apr 2004 14:38:59 +0200")
(Checkin-Time "Sat, 03 Apr 2004 15:46:26 +0200")
(Checkin-Login benoit)
(Files
......@@ -25,7 +26,7 @@ from Beno
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 644))
(COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.73 604))
(ChangeLog (mipsy/2_ChangeLog 1.74 604))
(INSTALL (mipsy/b/12_INSTALL 1.1 604))
(Makefile.am (mipsy/3_Makefile.a 1.8 604))
(NEWS (mipsy/b/25_NEWS 1.6 604))
......@@ -56,17 +57,17 @@ from Beno
;; ./src/
(src/Makefile.am (mipsy/18_Makefile.a 1.2 644))
(src/common.hh (mipsy/19_common.hh 1.4 644))
(src/common.hh (mipsy/19_common.hh 1.5 644))
(src/mipsy-tasks.cc (mipsy/20_mipsy-task 1.3 644))
(src/mipsy-tasks.hh (mipsy/21_mipsy-task 1.3 644))
(src/mipsy.cc (mipsy/22_mipsy.cc 1.4 604))
(src/mipsy.cc (mipsy/22_mipsy.cc 1.5 604))
(src/modules.hh (mipsy/23_modules.hh 1.3 644))
;; ./src/inst/
(src/inst/data_section.hh (mipsy/24_data_secti 1.8 604))
(src/inst/data_section.cc (mipsy/c/31_data_secti 1.2 644))
(src/inst/exp-visitor.hh (mipsy/25_exp-visito 1.4 604))
(src/inst/exp.hh (mipsy/26_exp.hh 1.7 604))
(src/inst/exp.hh (mipsy/26_exp.hh 1.8 604))
(src/inst/exp.cc (mipsy/c/32_exp.cc 1.3 644))
(src/inst/inst-tasks.cc (mipsy/b/23_inst-tasks 1.2 644))
(src/inst/inst-tasks.hh (mipsy/b/22_inst-tasks 1.2 644))
......@@ -76,7 +77,7 @@ from Beno
(src/inst/program.hh (mipsy/28_program.hh 1.4 644))
(src/inst/program_builder.cc (mipsy/29_program_bu 1.14 604))
(src/inst/program_solver.hh (mipsy/30_program_so 1.8 644))
(src/inst/register.hh (mipsy/31_register.h 1.6 644))
(src/inst/register.hh (mipsy/31_register.h 1.7 644))
(src/inst/section.hh (mipsy/b/24_section.hh 1.8 604))
(src/inst/text_section.hh (mipsy/32_text_secti 1.8 604))
(src/inst/text_section.cc (mipsy/c/33_text_secti 1.2 644))
......@@ -108,8 +109,8 @@ from Beno
;; ./src/vm/
(src/vm/Makefile.am (mipsy/b/0_Makefile.a 1.4 604))
(src/vm/cpu.hh (mipsy/b/1_cpu.hh 1.16 604))
(src/vm/cpu.cc (mipsy/b/5_virtual_ma 1.23 604))
(src/vm/cpu.hh (mipsy/b/1_cpu.hh 1.17 604))
(src/vm/cpu.cc (mipsy/b/5_virtual_ma 1.24 604))
(src/vm/memory.hh (mipsy/b/2_memory.hh 1.10 604))
(src/vm/mmu.hh (mipsy/c/15_mmu.hh 1.3 604))
(src/vm/segment.hh (mipsy/b/3_segment.hh 1.5 644))
......
......@@ -23,7 +23,7 @@
extern const char *program_name;
// Manage exit status
enum exit_t
enum exit_type
{
exit_success = 0,
exit_failure = 1,
......@@ -32,10 +32,10 @@ enum exit_t
exit_solve = 4,
exit_runtime = 5
};
extern exit_t exit_status;
extern exit_type exit_status;
inline void
exit_set (exit_t estatus)
exit_set (exit_type estatus)
{
if (!exit_status || estatus < exit_status)
exit_status = estatus;
......
......@@ -130,7 +130,7 @@ namespace inst
public Exp
{
public:
typedef enum { add, sub, mul, div } kind_type;
enum kind_type { add, sub, mul, div };
public:
OpExp(Exp *left, kind_type kind, Exp *right):
kind_(kind), left_(left), right_(right)
......
......@@ -29,14 +29,14 @@ namespace inst
class Register
{
public:
enum kind_t
enum kind_type
{
general,
unlimited
};
public:
Register (kind_t kind, int index):
Register (kind_type kind, int index):
kind_(kind), index_(index)
{
}
......@@ -48,7 +48,7 @@ namespace inst
}
public:
kind_t get_kind () const
kind_type get_kind () const
{
return kind_;
}
......@@ -67,7 +67,7 @@ namespace inst
}
protected:
kind_t kind_;
kind_type kind_;
int index_;
};
......
......@@ -27,7 +27,7 @@
#include "task/task_register.hh"
exit_t exit_status = exit_success;
exit_type exit_status = exit_success;
const char* program_name;
int main(int argc, char* argv[])
......
......@@ -682,7 +682,7 @@ namespace vm
case 10:
halt_ = true;
if (!exit_status)
exit_status = (exit_t) get_register(Cpu::a0);
exit_status = (exit_type) get_register(Cpu::a0);
break;
default:
......
......@@ -45,7 +45,7 @@ namespace vm
{
public:
/// General purpose registers indices
enum kind_t
enum kind_type
{
zero = 0,
at,
......@@ -82,12 +82,12 @@ namespace vm
\{ */
public:
/// Return the general purpose register \a k.
register_type get_register(kind_t k) const
register_type get_register(kind_type k) const
{
return GPR_[k];
}
/// Set the general purpose register \a k to \a r.
void set_register(kind_t k, register_type r)
void set_register(kind_type k, register_type r)
{
if (k != Cpu::zero)
GPR_[k] = r;
......@@ -128,7 +128,7 @@ namespace vm
}
precondition(reg.get_kind() == inst::Register::general &&
Cpu::zero <= reg.get_index() && reg.get_index() <= Cpu::ra);
return get_register((kind_t) reg.get_index());
return get_register((kind_type) reg.get_index());
}
/// Set the register identified by \a reg to \a r.
void set_register(const inst::Register& reg, register_type r)
......@@ -140,7 +140,7 @@ namespace vm
}
precondition(reg.get_kind() == inst::Register::general &&
Cpu::zero <= reg.get_index() && reg.get_index() <= Cpu::ra);
set_register((kind_t) reg.get_index(), r);
set_register((kind_type) reg.get_index(), r);
}
/** \} */
......@@ -256,7 +256,7 @@ namespace vm
{
if (check_callee_save_p_)
for (int i = Cpu::s0; i <= Cpu::s7; ++i)
set_unlimited(-i, get_register((Cpu::kind_t) i));
set_unlimited(-i, get_register((Cpu::kind_type) i));
call_stack_.push(get_pc ());
unlimited_.begin_scope();
......@@ -267,13 +267,13 @@ namespace vm
if (check_callee_save_p_)
for (int i = Cpu::s0; i <= Cpu::s7; ++i)
if (get_unlimited(-i) != get_register((Cpu::kind_t) i))
if (get_unlimited(-i) != get_register((Cpu::kind_type) i))
{
std::cerr
<< "Warning: callee save register `$s" << i - Cpu::s0
<< "' was not preserved across last call to 0x"
<< std::hex << call_stack_.top() << std::dec << std::endl;
set_register((Cpu::kind_t) i, get_unlimited(-i));
set_register((Cpu::kind_type) i, get_unlimited(-i));
exit_set(exit_runtime);
}
call_stack_.pop();
......@@ -309,7 +309,7 @@ namespace vm
protected:
bool trace_p_;
enum pipeline_stage_t
enum pipeline_stage_type
{
i_stage = 0,
d_stage,
......
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