[Tinyos-devel] Problem in the compiler for default methods?

Michele Mastrogiovanni michele.mastrogiovanni at gmail.com
Wed Dec 19 15:24:25 PST 2007


I noticed a kind of bug after disassembling the simple Blink
application for tmotes. It seems that the implementation of
event fired of the Msp430TimerP call the default implementation
of the method for that interface (that is empty).

Here the default method is at index 0x4118 while you can notice
at the end of event fired the call (call #16664).

00004118 <Msp430TimerP$1$Event$default$fired>:
     4118:	30 41       	ret			


0000411a <Msp430TimerP$1$Event$fired>:
     411a:	4e 4f       	mov.b	r15,	r14	;
...
     41d4:	b0 12 18 41 	call	#16664		;#0x4118
     41d8:	30 41       	ret			

Is that a bug of the compiler?

This can introduce overhead in code.

Michele Mastrogiovanni

PS
	The instruction I used to disassemble is:

	msp430-objdump -Dslx --disassemble-zeroes tinyos-2.x/apps/Blink/ 
build/telosb/main.exe




More information about the Tinyos-devel mailing list