Custom Query (145 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (58 - 60 of 145)

Ticket Owner Reporter Resolution Summary
#149 Thierry Delisle fixed Incorrectly resolving asm statement operand names
Description

Given the following code :

static inline bool bts(volatile size_t * target, size_t bit ) {
	int result = 0;
	asm volatile(
		"LOCK btsq %[bit_asm], %[target_asm]\n\t"
            :"=@ccc" (result)
            : [target_asm] "m" (*target), [bit_asm] "r" (bit)
	);
	return result != 0;
}

Cforall attempts to resolve the names target_asm and bit_asm. This behaviour is incorrect and the names should be left as is.

#150 Thierry Delisle <tdelisle@…> Thierry Delisle fixed Incorrect Scoping when using continue
Description

CFA code :

int main() {
	for(4) {
		if(true) continue;
		int num = 0;
	}
}

This should compile normally but results in an error claiming the continue jumps into a scope where num exists but was not initialized.

The reason is that the code is rewritten as :

int main(){
    for (4) {
        if (true) goto __loopContinue;
        int num = 0;
        __loopContinue: __attribute__ ((unused));
    }
}

It should probably be :

int main(){
    for (4) {
        {
            if (true) goto __loopContinue;
            int num = 0;
        }
        __loopContinue: __attribute__ ((unused));
    }
}
#152 Thierry Delisle <tdelisle@…> Thierry Delisle fixed Incorrect Lvalue conversion when using inline assembly
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 ) :  );
}

Note: See TracQuery for help on using queries.