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?
Thanks,
c0d1f1ed
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?
Thanks,
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.
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?
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)
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));
BSWAP(32,EAX);
MOV(32,MatR(R15),R(EAX));
INC(8, M(&val));
MASKMOVDQU(XMM12,XMM13);
INC(64,MComplex(RAX, R11, 2, 0x1));
DEC(8, R(RAX));
CMOVcc(32, R12, MComplex(RAX, R11, 2, 0x1), CC_BE);
RSQRTPS(XMM11, R(XMM12));