Comments (7)
Looking into this.
I think I had similar issue earlier and may have fixed it in some other project of mine already.
from inline_syscall.
Changing it into "re" or "rZ" or "reZ" works for me so far.
https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
from inline_syscall.
So I looked into this and it seems to compile just fine on godbolt with clang and gcc, but it does seem to be broken on clang-cl on my machine. I'd say this is probably a compiler bug.
Furthermore the e
and Z
constraints don't really make sense since your value is not something that fits into 32 bits and is being sign extended, however it still generates correct assembly so 🤷
I tested just replacing "rn" with "reZ" on my private projects (with clang-cl that is broken in this case) and it seemed to not change codegen in any way on a release build.
Will probably make the change, although I'm a bit afraid I might break it on actual clang/gcc.
from inline_syscall.
Sorry I don't really understand how constraints works. I was typing random letters into the constraints string. "re" and "rZ" and "reZ" are the only ones I found that works so far for this instruction movq %[x], 48(%%rsp)
https://godbolt.org/z/6jbrWW
Do you happen to know any good tutorial on how to write gcc extended asm, or assembly in general?
from inline_syscall.
Should be fixed.
Concerning the learning part I learned assembly mostly trough experience reading about instructions when debugging with tools like x64dbg and for extended asm the GCC docs for it are pretty good
from inline_syscall.
I think it needs to be "re", not "reZ". https://godbolt.org/z/6cfYnc
from inline_syscall.
Changed it
from inline_syscall.
Related Issues (5)
- Debug break HOT 1
- mingw usage? HOT 4
- PEzor HOT 3
- void return type ntapi problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inline_syscall.