Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It has a hardware mode which emulates the x86 memory model, and IIRC also has something in hardware to help emulate the x86 flags register.

AFAIK, the memory model is the main missing piece. And it seems like it's certainly something that could be implemented separately. IMO, it's something the ARM group could (and probably should) easily add into the platform.

The flags register is a minor thing that's pretty easy to pull off. Most of the x86 instructions that mess with the flags have direct ARM instructions. The ones that don't can easily be emulated by burning a register and maintaining the flags in said register when needs be.

I think the other important thing to note is that while x86 has a wealth of exotic functions that do wild things, a lot of those instructions aren't generated by any modern compiler. Not saying you can't find a stray `ENTER`/`LEAVE` instruction in old software, it's just not likely. That significantly cuts down on weird instructions doing wild things harming performance.

A quick google about what apple did to support x86 flags is they added undocumented bits to their own flags register to help support 8080 instructions.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: