Hi Shuai,

A couple of things you could try:
1) Running in SE mode instead of full system. Is there something in the
simple test case that requires full system?
2) I quickly tried running the code in SE mode myself, but it looks like
it's using some pthreads functions. Can you provide the minimal example
code that fails? An option to do this easily is to set up a docker image
with your code / compiler / etc so I can generate the binary that's causing
the issue.

At a high level, it's not surprising that this is failing on x86. Many of
the more esoteric x86 instructions have not been heavily tested. Even the
ones that have been tested may not have been tested with inputs like you
see in a big int library.

Cheers,
Jason

On Mon, Feb 6, 2017 at 12:37 PM Fernando Endo <[email protected]>
wrote:

> Hello,
>
> Probably I don't have all the info, but I had the following questions: Do
> you really need to compile and debug (e.g., run gdb) in the guest
> environment ("inside the gem5 FS linux")? Would not comparing the HW
> results with the gem5 traces in Atomic mode be enough?
>
> Regards,
>
> --
> Fernando A. Endo, Post-doc
>
> INRIA Rennes-Bretagne Atlantique
> France
>
>
> 2017-01-08 1:19 GMT+01:00 Shuai Wang <[email protected]>:
>
> Dear list,
>
>
> I am trying to run some binary code on x86 full-system simulated mode of
> gem5. While most of my test binaries work well on the full-system simulated
> mode, I am trapped in running a C++ test case for several days. In general,
> the output of running my C++ binary code is inconsistent comparing the
> physical machine with the gem5's full-system simulated mode.
>
> I dig into the code for a while and figure out that actually *performing
> big integer multiplication can lead to incorrect results on the gem5's
> full-system simulated mode*. I attached a very simple test case I use
> (the source code; note that this source code leverages the bigint
> implementation of Botan <https://botan.randombit.net/> library version
> 1.10.13). I also uploaded the compiled x86 64-bit binary code here
> <https://www.dropbox.com/s/bkw2ym2clizum4f/bigintm.gz?dl=0>. By running
> the compiled binary code on my full-system simulation environment, I would
> get incorrect multiplication results (detailed information is given in the
> source code).
>
> It is really painful to compile/debug on the simulated platform; I cannot
> make much progress by debugging the code. I also tried to add some logging
> code and rerun the binary code on the simulated OS, however, some
> segmentation faults happened at this time....
>
> This seems to me some simulation issue on certain x86 opcodes. However, I
> am not sure. So I am writing to ask, is there anyone that happen to see
> similar issue like this one?  Any suggestion would be greatly appreciated,
> thank you!
>
> Sincerely,
> Shuai
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to