Testing little/big endian issues on an Intel PC

I need to test code for some compression algorithms for any possible little/big endian issues that I might have left in there.

As development was done on an Intel desktop, what is the best way to test it out without having to buy big-endian hardware. Can some emulator etc be used for this?

The code is fairly portable (basic C++, mostly maths, and some file reading/writing) and can be built on any decent compiler/platform.

Sachin Garg

Reply to
Sachin Garg
Loading thread data ...

Compile/run/test the code on a simulator for a big-endian target like a powerpc.

--
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
Kennesaw, GA, USA 30144    http://mnmoran.org

"So often times it happens, that we live our lives in chains
  and we never even know we have the key."
"Already Gone" by Jack Tempchin (recorded by The Eagles)

The Beatles were wrong: 1 & 1 & 1 is 1
Reply to
Michael N. Moran

Can you recommend a good (and cheap/free) simulator for this purpose?

Sachin Garg

Reply to
Sachin Garg

I did came across 'psim' and it seems to be able to do what I need, I will be trying it out. Will it be a good choice for this purpose or are there other better options?

Sachin Garg

Reply to
Sachin Garg

Whilst totally over the top, I've run Mac OS X (PPC version) within the PearPC emulator, which was surprisingly quick. You could install the 'xcode' (GCC etc) toolchain and compile and run it with ease.

Jonny

Reply to
Jonny Barker

You might want to take a look at qemu. This is a free (GPL) simulator that does full machine emulation for some platforms, but can also run ELF binaries compiled for various platforms directly from the commandline. It has a builtin debugger stub to connect to with gdb.

--
:wq
^X^Cy^K^X^C^C^C^C
Reply to
Ico

Thanks, this sounds interesting.

Reply to
Sachin Garg

more actively maintained.

Thanks.

Reply to
Sachin Garg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.