-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-14179
-
C29_1.0.0.LTS
-
C29_2.2.0.LTS*
-
default
For this source code ...
unsigned int sp;
void fxn()
{
/* Compilation fails as the compiler selects a `Dx` register instead of a `Ax` register to load the address of `sp`. */
__asm volatile("ST.32 *%0, A15" : : "r"(&sp));
}
Compile it ...
% c29clang -c file.c
file.c:7:20: error: illegal base register for indirect
7 | __asm volatile("ST.32 *%0, A15" : : "r"(&sp));
| ^
<inline asm>:1:11: note: instantiated into assembly here
1 | ST.32 *D0, A15
| ^
1 error generated.