#152 closed defect (fixed)
Incorrect Lvalue conversion when using inline assembly
| Reported by: | Thierry Delisle | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | cfa-cc |
| Version: | 1.0 | Keywords: | |
| Cc: |
Description
Given the following code :
void bts(unsigned long long int * target, unsigned long long int bit ) {
asm (
"LOCK btsq %[bit], %[target]\n\t" :
: [target] "m" (*target), [bit] "r" (bit)
);
}
The code generator incorrectly generates code missing the * in front of target as follows:
void _X3btsFv_Pyy__1(unsigned long long int *_X6targetPy_1, unsigned long long int _X3bity_1){
asm ( "LOCK btsq %[bit], %[target]\n\t" : : [ target ] "m" ( _X6targetPy_1 ), [ bit ] "r" ( _X3bity_1 ) : );
}
It should generate:
void _X3btsFv_Pyy__1(unsigned long long int *_X6targetPy_1, unsigned long long int _X3bity_1){
asm ( "LOCK btsq %[bit], %[target]\n\t" : : [ target ] "m" ( *_X6targetPy_1 ), [ bit ] "r" ( _X3bity_1 ) : );
}
Change History (2)
comment:1 by , 6 years ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 78cdb06: