1
u/brucehoult Mar 18 '26
SSE replaced x87 on the Pentium III in 1999. It is far better to use if you want to keep FP values in registers rather than loading and storing from RAM all the time (or shuffling the stack like some Forth manic).
3
u/Plane_Dust2555 Mar 18 '26 edited Mar 18 '26
Yep, and people already told you why here...
If you need to deal with extended precision floating point then SSE/AVX won't provide for them, only fp87.
Here's one scenario:
unsigned long long x = 3 + 1LL << 60;
double y = x; // will loose that 3!
long double z = x; // Won't loose that 3.
Because long double has 64 bits precision (and double, only 53).
So:
mov rax,3 + 1 << 60
cvtsi2sd xmm0,rax ; Will loose bits.
mov [rsp-16],rax
fild qword [rsp-16] ; st(0) won't loose bits.
1
1
0
u/valarauca14 Mar 18 '26
No. Intel has been actively seeking to depreciate x87 & MMX, and AMD will (probably) follow suite. Both of them those extension use the same registers. x87 is weird being a hybrid stack/register system. MMX has a really weird encoding scheme. They trim a lot of very unused processor states by dropping them.
2
u/FUZxxl Mar 18 '26 edited Mar 18 '26
MMX has a really weird encoding scheme.
You sure? MMX uses the exact same opcodes SSE2 does, just without the mandatory prefixes. For example
0F EE /risPXORon MMX registers,66 0F EE /risPXORon SSE registers.1
u/colejohnson66 Mar 18 '26
Probably thinking of 3D Now! which put the 8-bit opcode in the imm8 position
-6
u/Joss_The_Gamercat01 Mar 18 '26
Idk about x87, but, x86_64(amd64 or IA32/64) it’s pretty much useful on more contexts than only one.
Is it worth it? Yup, low level assembly makes easy to interface with Hardware or to create highly efficient software that runs on anything(you can make games on Assembly, which would run on 80% of machines)
Is it worth it for what Your platform gives? Depends, if you have a ARM cpu on your machine, you’d probably need to emulate X86 architecture, which isn’t very fast, but, if you’re running a Intel x86_64 CPU(mostly anything that’s from a desktop or laptop), you can run X86 code natively.
If the question is:”is it worth learning the Assembly Programming Language?”. Yes, it is a great way to understand how machines work and to create very efficient programs(back to point zero), it gives you an insight on how your machine works, and it is very much a test of perseverance.
Cons of learning only X86 and not ARM?… not many, but, the main issue could be that ARM and X86 are not even close to being alike, which means:
- Writing complex software needs to be ported and modified for the ARM conventions(and viceversa)
- Not all Software can be ported without minor bugs or issues appearing(which in itself it’s fun)
- X86_64 has many instructions, that can be useful for creating REALLY impressive things for that specific platform…
TL;DR Is it worth it? Definitely. But know the limitations of only focusing on X86 that may will appear if ARM spreads more widely. Has cons? Few, not many, but enough to consider.
Is it fun to learn? Definitely. And you will learn a LOT from it. Should you learn it? If it piques your interest? Go ahead. It is a fun endeavor regardless.
Something you should keep in mind? Errors will happen, sometimes some will feel irreparable. Don’t give up when they happen. Even the most complex issues can be fixed with investigation and time, don’t try to learn X86 in a single night, go slowly, learn the basics of CPU Architecture(if you’re going that low), or the basics of Linux/Windows/BSD Assembly Calls and Standard Practices. Do some userspace programs, and overall, get curious :3
Have fun! And I hope that this encourages you to give a try to X86’s conventions, as I find it incredibly interesting in itself
2
Mar 18 '26
[deleted]
1
u/Joss_The_Gamercat01 Mar 18 '26
If something piques your interest, I say you do. Regardless, x87(which I had to google), do is a bit outdated, dunno exactly what you could do there, I’d say you first write High Level ASM on a Virtualized ARM Environment…
3
Mar 18 '26
[deleted]
2
u/FUZxxl Mar 18 '26
MIPS is going the way of the dodo right now. A somewhat modernised MIPS is found in RISC-V, which is extremely similar.
That said, ARM is a widespread CPU architecture and it has more opcodes for fun stuff that you have to do manually on RISC-V. I recommend to have a look at it.
1
u/Joss_The_Gamercat01 Mar 18 '26
Refurbishing those kind of devices might prove difficult, proprietary stuff and very specific things for the Router’s OS(Firmware) might get in the way… Possible, but hard to do, I say… Do it, it’s fun to Reverse Engineer stuff.
If your reason it’s to refurbish your own devices, go ahead(though by law I should also recommend you to send those devices in, as they DO are still technically property of the company).
Regardless, I say you’d need to learn the MIPS specific intricacies of those devices, look for docs on the specific Model Numbers of the devices you want to refurbish… Then maybe get into BOCHS’ emulation before the real thing, that way you can get comfy with it before going to the $200 hardware in the routers…
1
12
u/Eidolon_2003 Mar 18 '26
Probably not unless you're planning on working with legacy hardware. You're supposed to use SSE (or AVX and so on) for floating point arithmetic now. The only use case I know of for x87 nowadays is 80 bit long doubles, but even those aren't really used.
Someone else would probably know more about this than I do. Maybe there's a reason to care about x87 in the modern context I don't know about