Top "Inline-assembly" questions

Assembly that is embedded within a source in another, higher language, such as x86 assembly embedded in C or C++.

Which inline assembly code is correct for rdtscp?

Disclaimer: Words cannot describe how much I detest AT&T style syntax I have a problem that I hope …

gcc assembly x86-64 inline-assembly
Programmatically cause Undefined Instruction exception

I want to cause an ARM Cortex-M3 Undefined Instruction exception for the test of my test fixture. The IAR compiler …

gcc arm inline-assembly cortex-m3
how to set control register 0 (cr0) bits in x86-64 using gcc assembly on linux

I am using the following code to set the cr0 bit to disable cache. When I compile this #include <…

linux gcc x86-64 inline-assembly
How to use address constants in GCC x86 inline assembly

The GCC toolchain uses AT&T assembler syntax by default, but support for Intel syntax is available via the .…

c gcc assembly inline-assembly
How do I specify immediate floating point numbers with inline assembly?

When I try to compile this code: #include <stdio.h> main(int argc, char *argv[]) { double y = 0; __asm__ ("…

c gcc assembly inline-assembly x87
Using GCC inline assembly with instructions that take immediate values

The problem I'm working on a custom OS for an ARM Cortex-M3 processor. To interact with my kernel, user threads …

c gcc assembly arm inline-assembly
Linux kernel assembly and logic

My question is somewhat weird but I will do my best to explain. Looking at the languages the linux kernel …

linux assembly kernel inline-assembly
Why does adding inline assembly comments cause such radical change in GCC's generated code?

So, I had this code: constexpr unsigned N = 1000; void f1(char* sum, char* a, char* b) { for(int i = 0; i &…

c++ gcc assembly optimization inline-assembly
Is there an equivalent instruction to rdtsc in ARM?

For my project I must use inline assembly instructions such as rdtsc to calculate the execution time of some C/…

c++ c assembly arm inline-assembly