Hi all,

I intend to make SoftWire support 64-bit extensions. I've read about the encoding format on sandpile.org, but I'm still wondering how to really get started.

Does anyone have experience with extending their assembler with 64-bit?


Posted on 2006-11-15 08:31:56 by C0D1F1ED

Does anyone have experience with extending their assembler with 64-bit?

Tomasz Grysztar does - www.flatassembler.net :)

I'd recommend getting both Intel as well as AMD manuals, by the way. Sometimes, one of them (*cough* intel *cough*) has bugs or is a little unclear.
Posted on 2006-11-15 08:43:50 by f0dder
Ok, I've released a first 64-bit capable version, but it's still missing a few things. I'm now implementing RIP-relative addressing, and it's working ok, but I was wondering whether absolute addressing would still be useful? If it is, then how could I differentiate between them?
Posted on 2006-11-20 05:29:44 by C0D1F1ED
I just made my own lean mean mini-softwire (with no text assembly support, only C++ "macro" style instruction assembly) supporting all useful parts of the x64 instruction set over a couple of nights, and it was mostly a matter of reading the AMD manuals :)

I don't really see much use for the absolute 32-bit addressing modes, the only thing it can do that RIP can't is address from +2GB to +4GB. If 2GB is enough for your static data, which it pretty much always should be, then it's probably useless. Well, it can also stay pointing at one address while being moved around in memory, but that doesn't seem very useful.

Here's my syntax if anyone is curious: (The first block of code is for something useful, points to whoever can figure out what I'm planning to use this for... the second one is just test crap)

MOVSS(M(&temp), XMM0);
MOV(32,R(EAX), M(&temp));

INC(8, M(&val));
INC(64,MComplex(RAX, R11, 2, 0x1));
DEC(8, R(RAX));
CMOVcc(32, R12, MComplex(RAX, R11, 2, 0x1), CC_BE);
Posted on 2006-11-21 16:33:02 by ector