From: Stuart B. <sd...@nt...> - 2007-04-20 16:26:40
|
On Fri, Apr 20, 2007 at 07:28:59PM +0900, Tomonori Yamane wrote: > I am really happy to know that someone else started to work > on PA-RISC emulation on QEMU. Thanks! Seems quite a few people are interested in PA-RISC emulation. :-) > I have developed HP-UX user mode emulation > and found my interpreter is slow > and I am concerned the legality of running HP-UX application > on an emulated system. ( I need to copy HP-UX shared libraries > to run HP-UX applications.) That's quite impressive! May I ask what the host system was? > Aside from the legality, I am interested in the fast emulator. > > Therefore I would like to know what I can do for your project. > > I attached several patches as my self introduction. > I hope they may be some help. The patches you attached are exactly the sort of thing that's needed. However, I think we're now at the point where we need to start testing small binaries (such as /bin/true) and start debugging. I've found that load ops are crashing, and I'm not sure why... > (1) First one (cpu.h) is a reorder of the PSW flags according to the > PA-RISC 1.1 Architecture and Instruction Set Reference Manual. > (This is just bitwise reverse.) *Blush* -- I think the PSW flags were one of the first things I did... I obviously got confused by the big endian bit enumeration that's used throughout the PA docs. Committed -- thanks for spotting this! > (2) The second one (op.c ) is corresponding modifications of > ssm/rsm/mtsm Committed. > (3) The third one (op.c) fixes idcor / dcor instruction from misuse > of 'and' operator. Comitted (and simplified). > (4) The fourth one (op.c) fixes op_shrpw_cc() in case of 32bit left shift. > ( I have stacked this problem for 2 months and I don't want > you stack the same problem.) > > 0x12345678 << 32 => 0 on HP-UX > 0x12345678 << 32 => 0x12345678 on Linux/Pentium (No optimize) > 0x12345678 << 32 => 0 on Linux/Pentium (Optimized) Ouch... C99 states that the result is undefined. I've added the missing FORCE_RET() and committed this fix. Thanks. (BTW, I noticed that your email client damaged the patch in a few places. Sending patches as attachments should avoid the problem.) Many thanks again for your patches. I'm looking forward to any more you may send. :-) Cheers, -- Stuart Brady |