gnupic: sdcc bug


Previous by date: 14 Oct 2002 20:17:58 -0000 Re: sdcc bug (rigth posting, previous got sent incomplete), Scott Dattalo
Next by date: 14 Oct 2002 20:17:58 -0000 Where in the source code, Ricardo Amezquita Orozco
Previous in thread: 14 Oct 2002 20:17:58 -0000 Re: sdcc bug, Samuel Tardieu
Next in thread: 14 Oct 2002 20:17:58 -0000 SDCC bug, Craig Franklin

Subject: Re: sdcc bug
From: Samuel Tardieu ####@####.####
Date: 14 Oct 2002 20:17:58 -0000
Message-Id: <2002-10-14-22-14-45+trackit+sam@rfc1149.net>

Your post reminded me that I wanted to look at SDCC for a long
time. While reading the source, I noticed the latest peephole
optimization:

replace restart {
        movf    %1,w
        movwf   %1
} by {
        ;     peep 11 - Removed redundant move
        movf    %1,w
}

This optimization looks dangerous to me in at least two situations:
  - one wants to mirror the perceived state of a port in
    high-impedance mode (portb = portb)
  - one wants to act on a timer by having it loose four instruction
    cycles (tmr0 = tmr0 will do that)

What kind of C code could produce such a pattern which needs to be
optimized?

  Sam
-- 
Samuel Tardieu -- ####@####.#### -- http://www.rfc1149.net/sam


Previous by date: 14 Oct 2002 20:17:58 -0000 Re: sdcc bug (rigth posting, previous got sent incomplete), Scott Dattalo
Next by date: 14 Oct 2002 20:17:58 -0000 Where in the source code, Ricardo Amezquita Orozco
Previous in thread: 14 Oct 2002 20:17:58 -0000 Re: sdcc bug, Samuel Tardieu
Next in thread: 14 Oct 2002 20:17:58 -0000 SDCC bug, Craig Franklin


Powered by ezmlm-browse 0.20.