From b3464ef18061626c096c96d952971e61de97938b Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Sun, 19 Mar 2006 13:40:03 -0500 Subject: support for unaligned memory access arch/mips/isa/base.isa: disassembly fixes arch/mips/isa/decoder.isa: support for unaligned loads/stores arch/mips/isa_traits.hh: edit Syscall Reg values arch/mips/linux_process.cc: call writevFunc on writev syscall --HG-- extra : convert_revision : 4aea6d069bd7ba0e83b23d2d85c50d68532f0454 --- arch/mips/isa/decoder.isa | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/mips/isa/decoder.isa') diff --git a/arch/mips/isa/decoder.isa b/arch/mips/isa/decoder.isa index 3a8a4dfd8..f5dd3d911 100644 --- a/arch/mips/isa/decoder.isa +++ b/arch/mips/isa/decoder.isa @@ -865,11 +865,11 @@ decode OPCODE_HI default Unknown::unknown() { format LoadMemory { 0x0: lb({{ Rt.sw = Mem.sb; }}); 0x1: lh({{ Rt.sw = Mem.sh; }}); - 0x2: lwl({{ Rt.sw = Mem.sw; }});//, WordAlign); + 0x2: lwl({{ uint32_t temp = Mem.uw<31:16> << 16; Rt.uw &= 0x00FF; Rt.uw |= temp;}}, {{ EA = (Rs + disp) & ~3; }}); 0x3: lw({{ Rt.sw = Mem.sw; }}); 0x4: lbu({{ Rt.uw = Mem.ub; }}); 0x5: lhu({{ Rt.uw = Mem.uh; }}); - 0x6: lwr({{ Rt.uw = Mem.uw; }});//, WordAlign); + 0x6: lwr({{ uint32_t temp = 0x00FF & Mem.uw<15:0>; Rt.uw &= 0xFF00; Rt.uw |= temp; }}, {{ EA = (Rs + disp) & ~3; }}); } 0x7: FailUnimpl::reserved(); @@ -879,9 +879,9 @@ decode OPCODE_HI default Unknown::unknown() { format StoreMemory { 0x0: sb({{ Mem.ub = Rt<7:0>; }}); 0x1: sh({{ Mem.uh = Rt<15:0>; }}); - 0x2: swl({{ Mem.uw = Rt<31:0>; }});//,WordAlign); + 0x2: swl({{ Mem.uh = Rt<31:16>; }}, {{ EA = (Rs + disp) & ~3; }}); 0x3: sw({{ Mem.uw = Rt<31:0>; }}); - 0x6: swr({{ Mem.uw = Rt<31:0>; }});//,WordAlign); + 0x6: swr({{ Mem.uh = Rt<15:0>; }},{{ EA = ((Rs + disp) & ~3) + 4;}}); } format WarnUnimpl { -- cgit v1.2.3