I don’t think gcc for ARM allows you to use constraints to specify exactly which register to use. However, you can use explicit register variables to specify a register to store a variable in:
register int my_variable asm("r0");
More Related Contents:
- Calling printf in extended inline ASM
- exit.c:(.text+0x18): undefined reference to `_exit’ when using arm-none-eabi-gcc
- ARM compilation error, VFP registers used by executable, not object file
- How to set a variable in GCC with Intel syntax inline assembly?
- How to set gcc or clang to use Intel syntax permanently for inline asm() statements?
- How to write multiline inline assembly code in GCC C++?
- clang (LLVM) inline assembly – multiple constraints with useless spills / reloads
- linking arbitrary data using GCC ARM toolchain
- Fast Division on GCC/ARM
- Is the hash required for immediate values in ARM assembly?
- Assembly code fsqrt and fmul instructions
- How to invoke a system call via syscall or sysenter in inline assembly?
- How to install GCC piece by piece with GMP, MPFR, MPC, ELF, without shared libraries?
- How can I tell, with something like objdump, if an object file has been built with -fPIC?
- How do I run the GCC preprocessor to get the code after macros like #define are expanded?
- How do I set up CLion to compile and run?
- How to retrieve the GCC version used to compile a given ELF executable?
- Disable specific warnings in GCC [duplicate]
- “undefined reference” errors when trying to use address sanitizer with GCC
- Undefined reference to `omp_get_max_threads_’
- How to repair warning: missing braces around initializer?
- Why did GCC generate mov %eax,%eax and what does it mean?
- Why would one use #include_next in a project?
- make: *** [ ] Error 1 error [duplicate]
- Makefile removes object files for no reason
- -static option for gcc?
- CMake and Static Linking
- How to convert Linux 32-bit gcc inline assembly to 64-bit code? [closed]
- what is the order of source operands in AT&T syntax compared to Intel syntax?
- Compile with older libc (version `GLIBC_2.14′ not found)