Cr0a3 / ygen

Ygen - Yet another code generation libary
https://ygen.vercel.app/
Apache License 2.0
85 stars 3 forks source link

[BUG] SystemV number of vector register reset #5

Closed Cr0a3 closed 2 months ago

Cr0a3 commented 2 months ago

Describe the bug Before function calls eax needs to be reset:

xor eax, eax

but it doesn't get added https://github.com/Cr0a3/ygen/blob/main/src/Target/x64/ir.rs#L552 (it gets optimized out)

Cr0a3 commented 2 months ago

fixed the optimization out

Cr0a3 commented 2 months ago

But's still giving segmentation fault