12.07.2015 Views

MPLAB C32 C COMPILER USER'S GUIDE

MPLAB C32 C COMPILER USER'S GUIDE

MPLAB C32 C COMPILER USER'S GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MPLAB</strong> ® <strong>C32</strong> C Compiler User’s Guide1.8.11 Options for Code Generation ConventionsOptions of the form -fflag specify machine-independent flags. Most flags have bothpositive and negative forms. The negative form of -ffoo would be -fno-foo. In thetable below, only one of the forms is listed (the one that is not the default.)TABLE 1-15: CODE GENERATION CONVENTION OPTIONSOptionDefinition-fargument-alias-fargument-noalias-fargumentnoalias-global-fcall-saved-reg-fcall-used-reg-ffixed-regSpecify the possible relationships among parameters and betweenparameters and global data.-fargument-alias specifies that arguments (parameters) mayalias each other and may alias global storage.-fargument-noalias specifies that arguments do not aliaseach other, but may alias global storage.-fargument-noalias-global specifies that arguments do notalias each other and do not alias global storage.Each language automatically uses whatever option is required bythe language standard. You should not need to use these optionsyourself.Treat the register named reg as an allocatable register saved byfunctions. It may be allocated even for temporaries or variablesthat live across a call. Functions compiled this way saves andrestores the register reg if they use it.It is an error to used this flag with the Frame Pointer or StackPointer. Use of this flag for other registers that have fixedpervasive roles in the machine’s execution model producesdisastrous results.A different sort of disaster results from the use of this flag for aregister in which function values are returned.This flag should be used consistently through all modules.Treat the register named reg as an allocatable register that isclobbered by function calls. It may be allocated for temporaries orvariables that do not live across a call. Functions compiled this waydo not save and restore the register reg.It is an error to use this flag with the Frame Pointer or StackPointer. Use of this flag for other registers that have fixedpervasive roles in the machine’s execution model producesdisastrous results.This flag should be used consistently through all modules.Treat the register named reg as a fixed register. Generated codeshould never refer to it (except perhaps as a Stack Pointer, FramePointer or in some other fixed role).reg must be the name of a register, e.g., -ffixed-$0.DS51686A-page 38© 2007 Microchip Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!