This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Extra (useless) instructions involving r7 and accumulator

Why would the following line in C:

XRAM00 |= 0x01;

compile into this:

mov dptr, #XRAM00
movx a, @dptr
mov r7, a
mov a, r7
orl a, #1
mov r7, a
mov dptr, #XRAM00
mov a, r7
movx @dptr, a

I would have expected this:

mov dptr, #XRAM00
movx a, @dptr
orl a, #1
movx @dptr, a

Parents
  • I asked for a translation which will allow me to understand the problem you have with optimisation of switch/case constructs.
    do you actually want to help? that is a new one.
    my 'problem' I just hate inefficiencies, with the "switch/case constructs" is that you can not get it without the debugger killer (I can not tell you what that is till you answer the question below since I am dead tired of your nitpicking.

    'execution string' "instruction sequence"? ....
    Ok, but how about telling us the correct way to say it?

    if none of the above is 'correct' enough for you, then, instead of bitching, post what is 'correct' enough for you. I have no idea whatsoever what problem (besides a personal one) you have with either of the two expressions above.

    Erik

Reply
  • I asked for a translation which will allow me to understand the problem you have with optimisation of switch/case constructs.
    do you actually want to help? that is a new one.
    my 'problem' I just hate inefficiencies, with the "switch/case constructs" is that you can not get it without the debugger killer (I can not tell you what that is till you answer the question below since I am dead tired of your nitpicking.

    'execution string' "instruction sequence"? ....
    Ok, but how about telling us the correct way to say it?

    if none of the above is 'correct' enough for you, then, instead of bitching, post what is 'correct' enough for you. I have no idea whatsoever what problem (besides a personal one) you have with either of the two expressions above.

    Erik

Children