Commit 87e57a99 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoît Perrot  <benoit@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.
parent 6dc5373a
2004-10-25 Benot Perrot <benoit@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 Benot Perrot <benoit@lrde.epita.fr>
* config/stdint.m4, config/inttypes.m4:
......
......@@ -127,10 +127,10 @@ namespace vm
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 @@ namespace vm
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 @@ namespace vm
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))
......
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