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

Vlado Handziski handzisk at tkn.tu-berlin.de
Thu Dec 20 03:10:55 PST 2007


This being the default event handler, it ends up in the default section of
the switch statement that nesC creates for the parametrized interface, so
while being there it should not be called in Blink.

Vlado

On Dec 20, 2007 12:24 AM, Michele Mastrogiovanni <
michele.mastrogiovanni at gmail.com> wrote:

> 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
>
>
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20071220/4515d827/attachment.html


More information about the Tinyos-devel mailing list