How to encode this instruction correctly?

How to encode this instruction correctly?

Hi, I was developing my own assembler and decided to add {sae} in my AVX-encoder, so I consider to add sae for `vfoo [memory], vreg, imm`, and I tested my assembler with objdump and I saw exactly same result witch nasm generated and you can see it on a screenshot. Please help, because documentation is to week, intel sdm tells me nothing, idk if it's bug in nasm or objdump. I also tryed to ask AI, but did not yield results.

Nasm version – 3.02

Objdump version – 2.40

Sorry for English.

u/This-Assumption-5924 — 3 days ago
▲ 66 r/Assembly_language+1 crossposts

AVX-512 support in my own Assembler

AVX-512 support in my own Assembler

About a year ago I started writing AmmAsm, a handwritten x86-64 assembler in C to better understand x86-64 instruction encoding, ELF, and linking.

It currently supports generating Linux x86-64 executables, PIE binaries, and ELF relocatable object files that can be linked with ld or gcc, basic part of SIMD such as sse, sse2, avx, avx2, avx512

I implemented everything from the lexer and parser to the instruction encoder, ELF writer, relocation handling, symbol resolution.

In last realize, I fully implemented VEX/EVEX, including vvvv, w, mmm, broadcast, k0/k1-k7 mask registers, z mask, tuple type, and other fields thats belong to vex and evex. The most hard part was a W and tuple time, as I spend hours for searching every avx512 instruction for type of tuple if broadcast exists and W field.

I'd love to hear feedback from people interested in assemblers, instruction encoding(especially VEX/EVEX), or x86-64 in general.

Thanks!

Repository: https://github.com/LinuxCoder13/AmmAsm

u/This-Assumption-5924 — 11 days ago

My assembler for linux is running on windows, but how?

Hi I'm Ammar, and I am back again, few days ago I saw a 2 screenshots from community, were AmmAsm is running on windows. I will not write what is AmmAsm, as you can look to this post: https://www.reddit.com/r/Compilers/s/KrbM40UJz2

So, I didn't get any feedback from that person who build AmmAsm on windows, I almost don't know anything about the low level programing on windows, and how they convert the ELF64(which AmmAsm generated) to COFF format, nevertheless I would like to hear explanation from this community. Thanks.

u/This-Assumption-5924 — 20 days ago
▲ 42 r/Assembly_language+1 crossposts

AmmAsm now supports SSE, CMOVcc, and SETcc

This is part 2 of post: https://www.reddit.com/r/Compilers/s/E5R5MQSlQe

I recently finished implementing CMOVcc, SETcc, and the first group of SSE instructions in my handwritten x86-64 assembler written in C.

Seeing objdump correctly decode the generated object file is always satisfying.

I'm still implementing more of the x86-64 ISA, so if there are instruction groups you'd like to see next, I'd be happy to hear suggestions, and feedbacks. Thanks!

Github: https://github.com/LinuxCoder13/AmmAsm

u/This-Assumption-5924 — 29 days ago

Assembler x86-64 from scratch

About a year ago I started writing AmmAsm, a handwritten x86-64 assembler in C to better understand x86-64 instruction encoding, ELF, and linking.

It currently supports generating Linux x86-64 executables, PIE binaries, and ELF relocatable object files that can be linked with ld or gcc.

I implemented everything from the lexer and parser to the instruction encoder, ELF writer, relocation handling, symbol resolution, and, in the latest release (v2.2.0), a macro preprocessor.

I'd love to hear feedback from people interested in assemblers, instruction encoding, or x86-64 in general.

Thanks!

Repository: https://github.com/LinuxCoder13/AmmAsm

u/This-Assumption-5924 — 1 month ago
▲ 156 r/teenagersbutcode+2 crossposts

x86-64 Assembler from scratch

My first big compiler project

About a year ago I started writing AmmAsm, a handwritten x86-64 assembler in C as a way to learn how machine code, ELF, and linking actually work.

Today it can generate Linux x86-64 executables, PIE binaries, and ELF relocatable object files that can be linked with "ld" or "gcc". Along the way I implemented a lexer, parser, expression evaluator, x86-64 instruction encoder, ELF writer, relocations, and symbol resolution.

it is bootstraped about 0.257% :)

The latest version(2.2.0) also includes a macro preprocessor.

I'd really appreciate any feedback on the project, code, or documentation. Thanks!

repo: https://github.com/LinuxCoder13/AmmAsm.git

u/This-Assumption-5924 — 25 days ago