>> r2 is not then used anywhere, so why does this happen, and is there
>> anything I can do to stop it happening?
> Try the latest snapshot version of SDCC. It should optimize this.

The latest snapshot optimises it for &= writes, but it's still there for
|= writes:

;       src/myfile.c:247: MY_REG |= 0xC0;
        mov     dptr,#_MY_REG
        movx    a,@dptr
        mov     r3,a
        orl     a,#0xC0
        movx    @dptr,a

> The register was used during code generation as an
> intermediate and then a peephole optimization rule removed
> the read of it

The .asm files generated by the latest snapshot don't seem to list the
peephole optimisations used, so I can't tell where peephole
optimisations are being used any more.

Mary-Ann

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to