Why all the NOPs with xc8 PRO?

Thread Starter

Robin66

Joined Jan 5, 2016
275
Hi programmers. I'm coding in C in MPLAB x, compiling with xc8 pro, for a PIC18f2620. I'm seeing lots of NOPs in the disassembly. If I'd been compiling in lite mode I'd expect these. I don't see any reason for these according to the MULWF documentation. Can anyone shed any light on this?
Code:
89:                           num+= 15*dErr;
12BC  0E0F     MOVLW 0xF
12BE  03B5     MULWF dErr, BANKED
12C0  CFF3     MOVFF PROD, 0x24
12C2  F024     NOP
12C4  CFF4     MOVFF PRODH, 0x25
12C6  F025     NOP
12C8  03B6     MULWF 0xB6, BANKED
12CA  50F3     MOVF PROD, W, ACCESS
 

AlbertHall

Joined Jun 4, 2014
12,347
MOVFF is a two word instruction, the first word includes the source and the second includes the destination. The second word shows up in dis-assembly as an NOP. It is not just a waste of space-time.
 
Thread starter Similar threads Forum Replies Date
msr Microcontrollers 5
Similar threads
PIC18F: delay with Nops?
Top