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.

(I compiled this way:  msp430-gcc -S -mmcu=msp430x1611 main.c.)

Norm

Reply via email to