I'm looking to understand SSE2's capabilities a little more, and would like to know if one could make a 128-bit wide integer that supports addition, subtraction, XOR and multiplication? Thanks, Erkling.
相关问题
- Null-terminated string, opening file for reading
- What's the difference between 0 and dword 0?
- Translate the following machine language code (0x2
- Where can the code be more efficient for checking
- How can I include a ASM program into my Turbo Basi
相关文章
- How to generate assembly code with gcc that can be
- Select unique/deduplication in SSE/AVX
- Optimising this C (AVR) code
- Why does the latency of the sqrtsd instruction cha
- Difference in ABI between x86_64 Linux functions a
- x86 instruction encoding tables
- Why doesn't there exists a subi opcode for MIP
- Tool to Debug Guest OS in Virtual Box
SSE2 has no carry flag but you can easily calculate the carry as
carry = sum < a
orcarry = sum < b
like this. But worse yet, SSE2 doesn't have 64-bit comparisons too, so you must use some workarounds like the one hereHere is an untested, unoptimized C code based on the idea above.
As you can see, the code requires many more instructions and even after optimized it may still be much more longer than a simple 2 instruction add/adc in x86_64 (or 4 in x86)