Index: ChangeLog
from Benoît Perrot <benoit(a)lrde.epita.fr>
* src/vm/cpu.cc:
Effectively use Cpu::register_type, and not system's register_t.
cpu.cc did not compile on SunOS, where register_t is not defined.
2004-10-25 Benoît Perrot <benoit(a)lrde.epita.fr>
Index: src/vm/cpu.cc
--- src/vm/cpu.cc (revision 141)
+++ src/vm/cpu.cc (revision 142)
@@ -127,10 +127,10 @@
void
Cpu::visit(const inst::Add& add)
{
- register_t a = get_register(add.get_src1 ());
- register_t b = get_register(add.get_src2 ());
+ register_type a = get_register(add.get_src1 ());
+ register_type b = get_register(add.get_src2 ());
- register_t c = a + b;
+ register_type c = a + b;
set_register(add.get_dest (), c);
// FIXME: might be accelerated by testing only the sign bit.
@@ -141,10 +141,10 @@
void
Cpu::visit(const inst::Addi& addi)
{
- register_t a = get_register(addi.get_src ());
+ register_type a = get_register(addi.get_src ());
int b = addi.get_imm ();
- register_t c = a + b;
+ register_type c = a + b;
set_register(addi.get_dest (), c);
// FIXME: might be accelerated by testing only the sign bit.
@@ -169,10 +169,10 @@
void
Cpu::visit(const inst::Sub& sub)
{
- register_t a = get_register(sub.get_src1 ());
- register_t b = get_register(sub.get_src2 ());
+ register_type a = get_register(sub.get_src1 ());
+ register_type b = get_register(sub.get_src2 ());
- register_t c = a - b;
+ register_type c = a - b;
set_register(sub.get_dest (), c);
if ((a < b && c > 0) || (a > b && c < 0))
Show replies by date