At 09:27 14-03-08 -0700, Norman Davis wrote:
>Hi everyone,
>
>For the following C language code:
>
>
>  long a, b, c;
>
>  b = 12345;
>  c = 54321;
>
>  a = b * c;
>
>I get the following assembler output in the .s file.
>
> mov #llo(12345), 4(r4)
> mov #lhi(12345), 4+2(r4)
> mov #llo(54321), 8(r4)
> mov #lhi(54321), 8+2(r4)
> mov 4(r4), r10
> mov 4+2(r4), r11
> mov 8(r4), r12
> mov 8+2(r4), r13
> push r2
> dint
> call #__umulsi3hw
> pop r2
> mov r14, @r4
> mov r15, 2(r4)
>
>It looks like the interrupts are being disabled around the call:
>
> push r2                   ; store interrupt status (among other status)
> dint                         ; disable interrupts
> call #__umulsi3hw
> pop r2                     ; restore previous interrupt status
>
>I'm curious what the purpose of this is. In my particular case, I know
>none of my interrupt routines (currently) use the hardware multiplier,
>so is there an option to disable this disabling? It might be adding a
>significant interrupt latency for my application.

Norman,
push r2 means saving register r2 onto the stack and pop r2 means restoring
it. This has nothing to do with interrupts. The contents of r2 needs to be
saved, that's all.

Nico Coesel


/---------------------------------------------------------------\
|                       N C T  Developments                     |
|Innovative solutions for:                                      |
|   Electronics * Computers * Internet * Networking * Telecom   |
\---------------------------------------------------------------/

Reply via email to