Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/17/06 17:08
Read: times


 
#122472 - sure, but there will still be MOVC
Responding to: ???'s previous message
One work around is to fool the compiler by reordering the source code case statements so it cannot build its jump table.

I am very familiar with this since Kail in their infinite wisdom has moved the jump table feature from the compiler (which I use) to the optimizer (which I will not use). Why a feature for which the compiler 'knows' all that is required has to be an optimization I do not understand. Is it not the 'duty' of a C compiler to produce the most effiecient code possible?

Now, someone is going to ask "why not?" well NASA states "we fly what we test" and so do I. Due to the (way too) many outside products we interface with (since another division of my company compete with them they are, of course, most willing to tell me all I want to know) I occasinally have to debug 'on the fly' and doing that with a version that has different timing than the one that show the problem - you've got to be kidding.

Erik



List of 38 messages in thread
TopicAuthorDate
Switch/Case and code protection            01/01/70 00:00      
   What does it do?            01/01/70 00:00      
      I activate MOVC Disable.            01/01/70 00:00      
         In that case ...            01/01/70 00:00      
            Can't tell...uses external CCASE routine            01/01/70 00:00      
               Things you can and can't do ...            01/01/70 00:00      
                  it does            01/01/70 00:00      
               (double post, please disregard)            01/01/70 00:00      
   switch can use MOVC instructions            01/01/70 00:00      
      Aha!            01/01/70 00:00      
         protecting LPC chips            01/01/70 00:00      
            protecting LPC chips            01/01/70 00:00      
               Old question            01/01/70 00:00      
                  case            01/01/70 00:00      
                     Errr...            01/01/70 00:00      
                        There is more than just switch/case            01/01/70 00:00      
                           No C without MOVC            01/01/70 00:00      
                              Protection on other derivatives            01/01/70 00:00      
                                 Example - AT89C51            01/01/70 00:00      
                                    AT89C51 can do MOVC internal !            01/01/70 00:00      
                                       nope            01/01/70 00:00      
            LPC Protection            01/01/70 00:00      
               naah, but make it quite a bit more difficult            01/01/70 00:00      
   Compiler Optimisation            01/01/70 00:00      
      sure, but there will still be MOVC            01/01/70 00:00      
         And upgrading the compiler can change the output            01/01/70 00:00      
            the ICEman cometh            01/01/70 00:00      
               I have found no issues with the ICE            01/01/70 00:00      
                  sure it 'works'            01/01/70 00:00      
         The Reason            01/01/70 00:00      
            no, no, no            01/01/70 00:00      
               But you said..            01/01/70 00:00      
                  if you heard what I thought I said            01/01/70 00:00      
                     Confused            01/01/70 00:00      
                        jmp @dptr is not movc            01/01/70 00:00      
                           jmp @dptr is a computed goto not a jump table            01/01/70 00:00      
   what requires a movc???            01/01/70 00:00      
      Jump TABLE            01/01/70 00:00      

Back to Subject List