Live data from Hacker News

The Art of 64-bit Assembly

nostarch.com

31–40 of 122 posts

Re: The Art of 64-bit Assembly

#31
post #26
post #17

>> You can ask an AI to explain how vtables work in x86. It will give you something that sounds right. What it won’t give you is what Windows actually expects the vtable to look like, why method dispatch behaves the way it does at the instruction level, or what breaks when you deviate from convention. This volume of The Art of 64-Bit Assembly closes the gap between a plausible explanation and genuine understanding. O…

You also don’t need it to be trained on it specifically, just give it some docs or links to docs or source code as reference

Show it the disassembler...

Re: The Art of 64-bit Assembly

#32
post #6

Is anyone still writing assembly in the age of LLMs? Asking seriously because most assembly is just doing one very simple thing very fast and because it's so simple conceptually, an LLM can easily code it without errors.

Yes. And for the same reason I still write in C or Common Lisp - by hand - in the age of LLMs.

It’s a hobby.

Re: The Art of 64-bit Assembly

#33
post #6

Is anyone still writing assembly in the age of LLMs? Asking seriously because most assembly is just doing one very simple thing very fast and because it's so simple conceptually, an LLM can easily code it without errors.

an LLM can easily code it without errors can't tell if sarcasm or not. Just in case it's not.. in that case why don't we all vibe everything in assembly? No need for abstractions anymore since that's a human concept. LLM can do it without errors, as you say, and we'll reap the benefits of speed!

Except for some odd corner cases, it is very hard for a good engineer to beat compilers these days (they are very good now). Not to mention, tuning depends on the platform, and often the exact model of chip.

Re: The Art of 64-bit Assembly

#34
post #29

I am more curious about how they would cleanly manage hierarchical labels (usually called "namespaces"), register naming, and stack management with deep register spilling, description of the register state on the various entries from the various dominators of a code block. I am doing all that with a basic C pre-processor in my assembly source code. But the more I think about this, the more I think I should write my o…

I'm... confused. Don't we use macro assemblers anymore?

We do. I always use fasmg and it's amazing!!

Re: The Art of 64-bit Assembly

#36
post #29

I am more curious about how they would cleanly manage hierarchical labels (usually called "namespaces"), register naming, and stack management with deep register spilling, description of the register state on the various entries from the various dominators of a code block. I am doing all that with a basic C pre-processor in my assembly source code. But the more I think about this, the more I think I should write my o…

I'm... confused. Don't we use macro assemblers anymore?

The pre-processor of an assembler is specific to that very assembler.

For instance, with a C pre-processor, I have a very lean C pre-processor dialect which allows me to assemble simple x86_64 code with... fasmg[12] or nasm(probably yasm) or gas(intel syntax).

A big project which was bitten by specific pre-processor abuse: ffmpeg with nasm (but it is still much less toxic than to start to be hard dependent on advanced and specific C compiler extensions... look a the failure from linux on that matter).

Re: The Art of 64-bit Assembly

#39

Earlier quoted context omitted.

I'm... confused. Don't we use macro assemblers anymore?

We do. I always use fasmg and it's amazing!!

fasmg[12] is much more powerful than gas or nasm(~yasm): it is not a classic pre-processor. With CALM, it is basically a language able to implement assemblers supporting various binary file formats.

Re: The Art of 64-bit Assembly

#40
post #6

Is anyone still writing assembly in the age of LLMs? Asking seriously because most assembly is just doing one very simple thing very fast and because it's so simple conceptually, an LLM can easily code it without errors.

Yes. Mostly for learning purposes and for fun. Also, there are things you must drop down to assembly level in order to achieve. Implementing coroutines, a JIT compiler, etc. It's fun to learn about these.
Post reply on HN