We landed in Las Cruces just in time .. tomorrow and Saturday the airstrip will be closed for the XPrize.
« September 2006 | Main | November 2006 »
Sat down with the LinuxGames folks for their podcast #5. I think it was a tad too long, and I bored myself to death listening it back .. still I think listeners liked it.
Most of the feedback I got was about the MSVC assembly -> Linux assembly stuff. I slap myself for not having written a little something about it, what I tried, what works ok, what doesn't.. so I'll sum up a few things:
gcc can produce intel assembly syntax, and gas can understand it ( at least modern versions of gcc do, such as 4.x ). It is marginally handy. It's easier to look at MSVC assembly and retype it with the intel syntax rather than the swapped-around AT&T one. But the main problems remain, which is the setup of the constraints for the in and out of your inline assembly section. This is the real time consuming task. The conversion of the actual assembly can be automated to a large extent.
I converted our set of MMX memcpy functions using the above method and intel syntax. Worked great, until I compiled with some optimizations on ( -O1 / -O2 ) .. then the code stopped working right.
Using the Intel compiler on Linux may be the quick and dirty way here. It can read MSVC inline assembly syntax directly, which eliminates the difficulty of the contraints setup. And the objects produced are said to be compatible with gcc otherwise.
Still, using NASM across the board for all platforms may be the better way. I don't know if icc is available for Intel Macs for instance. inline assembly is on it's way out on MSVC as well. The 64 bit version of Visual Studio 8 only supports intrinsics and has no inline assembly whatsoever.
PS: Side note on my previous rant about Skype .. don't know if it's Skype's fault or Alsa's fault .. but I had to use Windows for the podcast, as I had mighty echo issues with Skype on Linux.
Posted at 11:21 AM | Permalink | Comments (0)