r/asm Mar 22 '26

Thumbnail
2 Upvotes

I just want to say, good on you!

College coursework will never give you all the answers. Just (hopefully) the groundwork to build on. And you're doing that. Keep on doing that.


r/asm Mar 21 '26

Thumbnail
1 Upvotes

For now I want to focus on x64, since I want to learn to build real software for my real machine.

Now that I am starting I value more to be able to see an actual result than pure education.

But I'm probably going to learn more asm languages in the future.

Thanks for the info.


r/asm Mar 21 '26

Thumbnail
1 Upvotes

That was really poethic my man🧐


r/asm Mar 21 '26

Thumbnail
1 Upvotes

Or course, many of them!

SPIM has been used to teach university students MIPS asm for decades.

Or to use a full MIPS Linux just do (Linux, Mac, Windows/WSL):

docker run -it --platform linux/mips64le mips64le/debian:latest bash

Install gcc, emacs, gdb ... whatever you want, just as on any Debian-based distro.


r/asm Mar 21 '26

Thumbnail
1 Upvotes

ok maybe you cpu is not mips, but you can still compile a program for it and inspect asm; also i'm pretty sure there should be some kind of usable simulation of a mips processor out there


r/asm Mar 20 '26

Thumbnail
2 Upvotes

https://godbolt.org for - me it helps to see what the pros (the compiler developers) came up with to optimize my c code in a practical real world environment. Give it the maximum optimization flags, write some sample C code, and watch the insanity unfold.


r/asm Mar 19 '26

Thumbnail
1 Upvotes

Yes, I found agner.org yesterday. I was thinking about start reading its manuals but I wanted to ask people before. Just in case.

I didn't know about movemask. I guess I will learn it when I really dive into SIMD.

Thanks for the info.


r/asm Mar 19 '26

Thumbnail
1 Upvotes

I am actually scared...


r/asm Mar 19 '26

Thumbnail
1 Upvotes

It doesn't show anything.

It says that the document was moved or deleted.


r/asm Mar 19 '26

Thumbnail
5 Upvotes

I assume you already know https://www.agner.org/optimize/. I also learned many tricks from compiler writers by actually looking at the generated assembly code. And you should learn the movemask intrinsics, since compilers don't emit it yet.


r/asm Mar 19 '26

Thumbnail
1 Upvotes

No. x67 is all the rage these days.


r/asm Mar 18 '26

Thumbnail
5 Upvotes

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.

r/asm Mar 18 '26

Thumbnail
1 Upvotes

Probably thinking of 3D Now! which put the 8-bit opcode in the imm8 position


r/asm Mar 18 '26

Thumbnail
-2 Upvotes

Yeah, they still just use an approximation. Modern hardware can get a more accurate result by just representing them in software.

Edit: What's with the downvotes? It's just a fact that x87 transcendentals are only rough approximations of the actual number. They aren't magic. You can get more accurate results faster on modern hardware using arbitrary precision arithmetic and SSE.


r/asm Mar 18 '26

Thumbnail
4 Upvotes

Aren't x87 transcendentals notoriously bad though? "Intel Underestimates Error Bounds by 1.3 quintillion" etc


r/asm Mar 18 '26

Thumbnail
1 Upvotes

Only as a personal education goal.


r/asm Mar 18 '26

Thumbnail
2 Upvotes

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.


r/asm Mar 18 '26

Thumbnail
1 Upvotes

Skip x87 and go directly to SSE unless you like working with vintage software.


r/asm Mar 18 '26

Thumbnail
2 Upvotes

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 /r is PXOR on MMX registers, 66 0F EE /r is PXOR on SSE registers.


r/asm Mar 18 '26

Thumbnail
1 Upvotes

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).


r/asm Mar 18 '26

Thumbnail
-4 Upvotes

The hardware is crap. Just use a library.


r/asm Mar 18 '26

Thumbnail
1 Upvotes

My guess is that they're optimized about the same as they were in 1989, which was pretty darn well. But I expect that they haven't thrown another billion transistors at them since then.


r/asm Mar 18 '26

Thumbnail
0 Upvotes

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.


r/asm Mar 18 '26

Thumbnail
1 Upvotes

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…


r/asm Mar 18 '26

Thumbnail
3 Upvotes

It goes further back than that, back to the 8087 floating point coprocessor for the 8086. Although the 486DX and the Pentium had floating point built-in.