Skip to contentSkip to conversation

simplify_cast() question

DISCUSSION Xi Wang 1 participant 1 message Jun 8, 2012 Sparse checker

lore
Share & tools
lore

Xi Wang

author
#0 lore raw

Hi,

Consider the code:

unsigned int foo(unsigned long long x)

{
	unsigned int tmp = x & 0x1fffffff;
	return tmp;
}

sparse emits:

	and.64      %r2 <- %arg1, $0x1fffffff
	ret.32      %r2

%r2 seems to be interpreted as both 64 and 32 bits. Is this the intended behavior? This could bring some trouble when we add ->ctype to pseudo..

- xi