MOVS pc,lr - Undocumented compiler features

CC_Undoc - Undocumented CC switches

  1. Introduction
  2. This document details what I believe to be the options available to Norcroft C version 5.06 and later. I reserve the right to be totally wrong.

  3. Formating
  4. This document is currently being updated using tables rather than 'definitions'. If you would prefer to see a non-tables version of this document, please email me.

  5. Undocumented features
  6. SwitchMeaning
    -counts cannot trigger - should show the file 'counts' profiling info
    -verify check the command line used is being interpreted correctly
    -super <unknown>, converse is -arthur
    -L force linking, even if o file given
    -K <unknown>
    -M< <unknown>
    -M+ <unknown>
    -d <unknown>
    -lg <unknown>
    -fb display count of errors/warnings like amu even if none displayed
    -fl In leaf functions, don't stack r14 if you don't have to (?)
    -fn <unknown>
    -fo <unknown>
    -fq <unknown>
    -fr <unknown>
    -fs <unknown>
    -fz <unknown>
    -pg include profiling information - seems to be the same as -px
    -Wb <unknown>
    -Wc <unknown>
    -Wd <unknown>
    -Wf <unknown>
    -Wg <unknown>
    -Wp <unknown>
    -Wr <unknown>
    -Ws <unknown>

    -z options are case insensitive, I think.

    -z[bjs] <unknown>
    -zc ensure that chars are signed (eg :
    char x[5]; char y; y=x[0];
    LDRB y,[v1,#0]
    MOV y,y,LSL #24
    MOV y,y,ASR #24
    -zk[ARMUarmu] Calling standard to use
    • a/A
      APCS-A (r13=sl, r10=fp, r11=ip, r12=sp)
    • r/R/u/U
      APCS-R (r11=sl, r11=fp, r12=ip, r13=sp)
    • m/M
      APCS-? (r12=sl, r10=fp, r11=ip, r13=sp)
    -za[01] ?
    -zd[01] ?
    -zh<x> <x> =
    • AA/AR -> standard option
    • RA -> as RR (?)
    • RR -> generate 32bit,reentrant,FPIS3,NoSWStackCheck
      (interestingly the code I saw stacked only v1 and lr - NOTHING else - implies no backtrace is possible, though function names are embedded. This is a property of the implicit stack check I believe, the 32 bit code implies that functions corrupt PSR on return)
    -zf Warn about repeated #defines (if the same)
    -zu Strange... seems to cause a stack of a1-a3 (though they were not used - only a1 was required and that was moved in registers) looks like it gives an implicit ordering of the arguments on the stack. Might also be doing the same as -zc as well...
    -zi <f> Pre-include file
    -zo Split each function into seperate areas (bug - includes a null code area)
    -ze0/1 <unknown> seems to work with -C (maybe)
    -zpq32 disables assumption that values returned from allocator functions are interchangable
    -zqa debug - castings and symantics ?
    -zqb debug - variable assignments ?
    -zqc debug - CSE decoding
    -zqd debug - data segments
    -zqf debug - function definitions
    -zqg debug - intermediate code dump
    -zqh debug - higher level allocation info ?
    -zqi debug - included files
    -zqk debug - <unknown>
    -zql debug - symbol tokenisation ?
    -zqm debug - <unknown>
    -zqo debug - output decoding (output file contains hex data)
    -zqp debug - pre-processor debug
    -zqq debug - <unknown>
    -zqr debug - register allocation
    -zqs debug - <unknown>
    -zqt debug - typing
    -zqu debug - CSE, register allocation, and -zqk
    -zqw debug - syntax analysis allocation ?
    -zqx debug - <unknown>
    -zqy debug - intermediate code register matching
    -zqz debug - unknown
    -zt+ Optimise for time (-Otime)
    -zt- Optimise for space (-Ospace)

  7. Documented switches
  8. SwitchMeaning
    -help Give summary of details
    -pcc Compile (BSD 4.2) portable C compiler C
    -fussy Be strict about ANSI or PCC standards.
    -strict Be strict about ANSI or PCC standards.
    -list Create listing file as l.<file> or using the -f <file> switch
    -bigend Big-endian compilation
    -littleen Little-endian compilation (default)
    -apcs <qualifiers> Select variant of APCS
    (DEFAULT) 26 bit code
    32 bit code
    Reentrant code
    (DEFAULT) Non-reentrant code
    (DEFAULT) Software stack checking code added
    No software stack checking code added
    Floating point emulator 2 compatible
    (DEFAULT) Floating point emulator 3 compatible
    FP arguments passed in FP regs
    (DEFAULT) FP arguments are not passed in FP regs
    -depend Create a dependency file (usually !Depend), like -M
    -throwback Use throwback output
    -desktop sets the working directory for output and relative source files
    -C++ C++ code is being processed (hack for C++/CFront executable)
    -c Do not link, use -o as the output AOF file
    -I<dir> specify an include directory to use for source files (eg "file.h")
    -j<dir> specify an include directory to use for system files (eg <stdio.h>)
    -E Pre-process the file only
    -C Retain comments when pre-processing (use with -E)
    -M Pre-process the file, and produce dependency tables for make
    -D<x>[=<y> Define a symbols value, if <y> not given, defaults to 1
    -U<x> Undefine a pre-processor symbol
    -o<file> Specify the output file
    -g[g][l][v] Generate debug information (if -g, -gflv assumed]
    • f = generate function and top level variable debug
    • l = generate debug about each line of source
    • v = generate debug about each variable
    -p[x] Generate profiling code; x means include more debug information
    -S output assembler in s.<file>
    -zM Produce code suitable for relocatable modules
    -W supress all warnings
    -Wa supress "Use of = in a condition context" warning
    -Wd supress "Deprecated declaration foo() - give arg types" warning
    -Wf supress "Inventing extern int foo()" warning
    -Wn supress "Implicit narrowing cast" warning
    -Wv supress "Implicit return in non-void context" warning
    -zp[a-z][0-9] Pragma options
    -zpa[01] warn_implicit_fn_decls; equivilent to -Wf
    -zpc[01] check_memory_accesses
    -zpd[01] warn_deprecated; equivilent to -Wd
    -zpe[01] continue_after_hash_error
    -zpf<0-4> FP register variable (?)
    -zpi[01] include_only_once
    -zpj[01] optimise_crossjump
    -zpm[01] optimise_multiple_loads
    -zpp[012] profile / profile_statements; -p / -px
    -zpq8 disable peephole optimisations
    -zpr<1-7> integer register variable (?)
    -zps[01] check_stack
    -zpt[01] force_top_level
    -zpv[012] check_printf_formats / check_scanf_formats
    -zpy[01] side_effects
    -zpz[01] optimise_cse
    -fa Check for data flow anomalies (assignment before use)
    -fc Enable 'limited pcc' support (PCC headers, ANSI source)
    -fe Check for external uniqueness at 6 characters
    -ff Do not embed function names in code area
    -fh Check external objects are declared before use
    -fi In listing file (-list), list lines from included user files
    -fj In listing file (-list), list lines from included system files
    -fk Use K&R style searches for source (not stacked, relative)
    -fm Report unused pre-processor symbols
    -fp Report explicit casts of integers into pointers
    -fu In listing file (-list), do not expand pre-processor defines
    -fv Report unused declarations
    -fw Allow string literals to be written to

  9. History
  10. Version 1.00 : 15 Feb 1998
    Created from disassembly and experimentation.
    Version 1.01 : 29 Jun 1998
    Updated with documented features
    Version 1.02 : 08 Jan 1999
    Reformatted as HTML for the 'info' section of my website.
    Version 1.03 : 28 Apr 2000
    Added -zpq32 flag.


This page is maintained by Justin Fletcher (
Last modified on 21 May, 2001.