Comments (1)
Hello,
This emulator uses the SoftFloat package from Bochs, which handles big-endian data better than I do:
/*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point types.
*----------------------------------------------------------------------------*/
#ifdef BX_BIG_ENDIAN
typedef struct { // leave alignment to compiler
uint16_t exp;
uint64_t fraction;
} floatx80;
#else
typedef struct {
uint64_t fraction;
uint16_t exp;
} floatx80;
#endif
Aliasing the MMX registers to the FP stack was a hack involving a union (but it works, so there's that!), and I had to make sure that both registers were laid out the same way (replacing fraction
for r8
. r16
, etc.). Rather than BX_BIG_ENDIAN
, I went with the simpler BIG_ENDIAN
.
The fact that BIG_ENDIAN
is defined on x86-64 systems is a good point (and a slightly strange one, too, considering that x86-64 is a little-endian system) and something that definitely needs to be fixed, but in practice it's never caused me any trouble.
Concerning endianness: big endian hosts might work, but I doubt they do. Reworking the emulator to handle guest loads/stores would be a massive multi-month project, but sadly I don't have any big-endian systems to debug on. At the very least, all those crazy arith_rmw
macros in opcodes.c
will need to be reworked.
from halfix.
Related Issues (20)
- Alpine Linux as docker host with inbound/outbound networking HOT 1
- Problems building
- lib/drive-filereader.js is missing HOT 3
- emscripten_load_state missing HOT 4
- Exploring halfix with emulation of web browsers HOT 7
- Native build on osx has missing color channels? HOT 5
- Disk Image documentation update
- Emulator/JS communication - stdin, stdout, stderr? HOT 3
- Options handling HOT 1
- Failing to compile HOT 3
- Windows XP not working in halfix-demo HOT 8
- Can't compile for termux HOT 7
- out of memory HOT 3
- Visual Studio project? HOT 6
- x86-64 and some upgrade? HOT 3
- mobile rendering
- Add networking support HOT 1
- how do i port this app to uwp Universal Windows HOT 3
- how would this work on replit HOT 1
- Can't increase ram? (192mb limit on browser) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from halfix.