code optimization and parameters marshalling question

From: Zigbee (zigbee_at_libero.it)
Date: 03/29/05

  • Next message: Lanarcam: "Re: code optimization and parameters marshalling question"
    Date: Tue, 29 Mar 2005 09:13:26 +0200
    
    

    Hi folks,

     I've recently discovered that if I ask my NC30 compiler to optimize
     my C code, it passes function parameters through the registers and not
     through the stack. The question is:

     What happens if I call a function that belongs to a library which
     was compiled using optimizing options (parameters passed through
     the registers), from a function that was compiled without optimizing
     options (parameters passed through the stack)?

    thanks,
     Enrico


  • Next message: Lanarcam: "Re: code optimization and parameters marshalling question"

    Relevant Pages

    • Re: [OT] PostLisp, a language experiment
      ... >> that a C compiler generates code to arrange the parameters where it ... > value from the user stack. ... > can be simply passed in registers. ... common for the top stack item to reside in a register, ...
      (comp.lang.lisp)
    • Re: next mystery: 32 vs 64 bits...
      ... single pass compiler to use ret n for loops and stackframe. ... namely, they are no longer regarded as 'registers', even for the stack. ... With the dependence of the x86 instruction set on EAX, ...
      (alt.lang.asm)
    • Re: why this program is not crashing
      ... >> compiler would need to stack it before the call to printf. ... If the args were in registers, you'd need either a need a wierd ...
      (comp.lang.c)
    • Re: Kernel Calling Conventions
      ... The C calling convention is touted as being more convenient, ... passing arguments within registers. ... calling convention is to use registers and not the stack. ... over the DJGPP GCC based compiler, is due to the fact that the OW ...
      (comp.lang.asm.x86)
    • Re: Kernel Calling Conventions
      ... The C calling convention is touted as being more convenient, ... passing arguments within registers. ... stack as opposed to passing them via registers? ... by the C compiler or tell the C compiler to "reoptimize" your assembly code. ...
      (comp.lang.asm.x86)