-
Notifications
You must be signed in to change notification settings - Fork 0
/
c68.txt
3012 lines (2287 loc) · 146 KB
/
c68.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
NAME
c68/c386/c86/c30 - Compile preprocessed C source.
SYNOPSIS
c68 [options] [input_file [output_file [listing_file]]]
c386 [options] [input_file [output_file [listing_file]]]
c86 [options] [input_file [output_file [listing_file]]]
c30 [options] [input_file [output_file [listing_file]]]
cARM [options] [input_file [output_file [listing_file]]]
cPPC [options] [input_file [output_file [listing_file]]]
DESCRIPTION
c68 is a publicly available ANSI C compiler. The compiler
can also operate in a mode that is compatible with the
original Kernighan and Richie (K&R) definition. The user
can select K&R mode (which causes many ANSI specific
features to be disabled) by a run-time parameter option.
The default is ANSI compatible mode as this is what most
people would wish to use.
Although generically the compiler is known under the name
of c68 the actual program name normally varies according
to the target environment in which it is hosted. The
names used are c68 when hosted on Motorola 680x0 systems;
c386 when hosted on Intel 386 (or better) systems running
in 32 bit mode; c86 when hosted on an Intel 8086 (or
better system) running in 16-bit real mode; cARM when
hosted on a Acorn ARM Risc processor; c30 when hosted on a
Texas Instruments TMSC30 processor; cPPC when hosted on a
Power PC processor.
The compiler was originally developed to run on the MINIX
operating system, but is known to be in wide use on a wide
variety of other operating systems such as LINUX, TOS
(Atari), QDOS/SMSQ (Sinclair QL) and EPOC (Psion 3a). The
source has been specifically written with maximum
portability in mind.
The compiler is slightly unusual in there is the
capability for simultaneous support of multiple target
processor types and/or multiple assemblers. The user
specifies at the time that the compiler is built which
target processors and combination of options are to be
supported. If support for multiple processors and/or
assemblers are configured to be built in, then options
other than the default can be selected by appropriate
runtime parameter options. This can make the compiler
very useful as a tool for cross-development between
different hardware platforms.
The compiler takes the output of a C pre-processor, and
compiles it to give assembler source. If no output file
is specified on the command line then the compiler writes
the generated assembler code to standard output. If in
addition there is no input file specified then the
compiler reads the C source from standard input. Finally
if the compiler run time option requesting a listing is
used and no listing file is specified, the compiler
writes it to standard error.
The options available to control the behaviour of the
compiler are listed below. The options to the compiler
can also be passed as -Qoption in addition to the syntax
given below. This is to make it easier for the front-end
programs (typically called CC) to decide which options
belong to the compiler phase. Not all options are
necessarily available in all versions of the compiler as
some of them are dependent on the settings in the compiler
configuration file at the time that the compiler is
actually built.
GENERAL OPTIONS
These are options that are not dependent on the target
processor type, and are general in nature. Where the
option can be a list, then multiple options from the list
can be specified separated by commas. There must be no
spaces between the options in this case.
-? Display a message giving the full list of
options available in this particular version of
the compiler. It also details the default
settings for the parameters. This option can be
very useful as it always reflects the choices of
settings in the compiler configuration file that
were actually used when generating this version
of the compiler. If you find a parameter option
listed in this document appears to be ignored,
then this is the way to check if the version of
the compiler you are actually using has been
built with that option enabled.
The values listed are organised so that the
first section applies to setting global to all
variants of the compiler, and then sections
specific to each target processor type for which
support has been included when the compiler was
built.
The output is normally too long to fit onto a
single screen, so you may need to redirect into
a file to see all the options.
-v Output additional information during the compile
process. If the compiler was built without the
VERBOSE configuration option set then this is
merely a message giving the version number of
the compiler. If the VERBOSE configuration
option was used when the compiler was built,
then additional progress information is output
during the compile process.
Default: The compiler as supplied is not
normally built with the VERBOSE option
and merely provides the version number
message if -v is used.
-warn=n Control the severity level of warning and
diagnostic messages that will be output during
the compilation process. Messages with a higher
severity value (i.e. less severe) than the value
specified will not be output. See later for
more information on the effect of possible
values for n.
Default: -warn=3
-error=n Make messages that are normally only warnings to
be treated as errors instead. The value of n
specifies what severity of messages that would
normally be only warnings are instead to be
treated as errors. This option is often used in
conjunction with the maxerr option..
Default: -error=0
-maxerr=n Sets the maximum error count to the value of n.
This is the maximum number of errors that will
be reported before the compiler abandons a
compile. As one error can cause others to
occur, in a cascade effect, it is often a good
idea to set this to a low value in the region of
10-20 errors which fits on one screen.
Default: -maxerr=200
-debug=option_list
This option is only available in a version of
the compiler built with the DEBUG configuration
option defined. It is used to control the
amount of debug information that is written to
the listing file. The option_list can be any
combination of the following:
global
peep
expr
code
register
symbol
Default: No debug information output.
N.B. The DEBUG configuration option when
building the compiler is normally only set
if you are developing new code to be
included in the compiler or investigating
faults. It is therefore never normally
included in any generally distributed
binaries.
-align=yes|no
All processors tend to have default alignments
at which they generate most efficient code. The
compiler will use the setting of the -align
option to decide whether to use the processor
optimum alignment, or ask the compiler to
attempt to use a different alignment. A yes
value for this option means align structures
and unions using the same rules as applied to
the member that has the strictest alignment
rules, while no means use the default value for
the processor type. In particular if you want
structures or unions which only contain 'char'
data types to be packed as closely as possible
(and therefore possibly start on odd addresses)
you must use the -align=yes setting.
Default: -align=yes for Intel targets
(any boundaries)
-align=no for 68000 and ARM targets
(even boundaries)
-align=yes for TMS C30 targets
(even boundaries)
-asm=yes|no
Specifies whether the use of the asm keyword
should be allowed in your C source. Use of the
asm keyword is not part of ANSI C and will
definitely result in non-portable code.
Support for the asm keyword is not included in
the compiler unless the ASM configuration option
is set at the time the compiler is built. We do
not normally include such support in binaries we
put on general distribution.
Default: -asm=no
-extension=yes|no
Specifies whether options that are under
consideration for inclusion in the next ANSI C
standard (amendment 2) should be included.
Support for these options will only be included
in the compiler if the EXTENSIONS configuration
option is set when the compiler is built. We
normally do include such an option in binaries
we put on general distribution except when the
size of the compiler is constrained by memory
limits. For details of what options are affected
by this keyword refer to the section later in
this document labelled "EXTENSIONS TO ANSI C".
Default: -extensions=no
-extern=yes|no
Output details of external symbols in this
module to the listing file. This is intended in
the future to provide the basis of a lint-style
facility to provide cross-module consistency
checking.
Whether support for this option is included in
the compiler is controlled by the EXTERNAL
configuration option at the time the compiler is
built. We do not normally include such support
in binaries we put on general distribution.
Default: -extern=no
-fcheck=yes|no
This option is only relevant in versions of the
compiler that were configured at build time to
not include support for floating point, but that
did have the FLOAT_CHECK configuration option
set. Setting -fcheck=yes means that floating
point keywords will be recognised and you will
get errors output if you try and use such
keywords. Setting -fcheck=no means that these
keywords are not recognised as C keywords.
Default: fcheck=no
-format=yes|no
Activate additional checks for the 'printf' and
'scanf' families of library routines. If
active, then the parameters following the format
string are checked as being compatible with the
format string.
This option is only available if the
FORMAT_CHECK configuration option was set at the
time the compiler it is built. This option is
very useful so we normally try and include it,
but the support is sometimes removed to save
memory when this is critical.
Default: -format=yes (check parameters)
-icode Output run-time debugging information to the
listing file. Intended mainly for debugging the
compiler itself.
This option is only available if the compiler
was built with the ICODE configuration option
defined. This option is not normally defined
for binaries that we put on general
distribution.
Default: -icode=no
-int=16|32
Specify whether the length of int declarations
should be 16 bit (same as a short) or a 32 bit
(same as a long). There is a lot of code around
that assumes
sizeof(int)==sizeof(char *)
so getting this setting correct for your target
platform is important.
Default: c386: -int=32
c68: -int=16 (MINIX systems)
-int=32 (QDOS/SMS systems)
c86: -int=16 (Psion 3a systems)
c30: -int=32
-lattice=yes|no
Older versions of Lattice C had partial support
of prototypes in which a variable number of
parameters was indicated by finishing the
parameter list with a comma (rather than the
ANSI style of using ,...). The use of this
option means the Lattice syntax will also be
accepted.
Default: -lattice=no
-list=yes|no
Control listing of symbol table.
Support for this option is only available if the
LIST configuration option was included when the
compiler was built. This option is primarily an
aid to helping us debug the compiler, so support
for this option would not normally be included
in any distribute binaries.
Default: -list=no
-obsolete=yes|no
Specifies whether warnings should be generated
if you use an option that is currently part of
the ANSI C standard, but which the ANSI
committee have warned may be removed from future
versions of the ANSI C standard. Examples of
this is support for K&R style function
definitions.
Default: -obsolete=no (no warnings)
-packenum=yes|no
Specify whether the compiler should use the
smallest integer type that is capable of
containing all the enumeration values that are
defined for a particular enumeration type. If
-packenum=no is in effect then 'int' is used as
the enumeration type.
This option is only supported if the PACKENUM
configuration option was set at the time the
compiler was built. We normally do have this
option supported in any binaries we put on
general distribution.
Default: -packenum=no
-revbit=yes|no
Control the order in which the compiler
allocates the bits in a bitfield. The
-revbit=yes option causes the bitfield to be
allocated starting from the highest number bit
downwards, rather than the default of allocating
them from bit 0 upwards.
Default: -revbit=no (start at bit 0)
-topspeed=yes|no
Control whether certain specific extensions to
the C syntax that are used by the TopSpeed C
compiler should be treated as valid or not.
N.B. The fact that the syntax is accepted does
not mean that the same effect will be
obtained as when used under TopSpeed - in
most cases the additional information is
simply ignored.
Whether this option is supported is determined
by whether the TOPSPEED configuration option was
set at the time the compiler was built.
Default: -topspeed=no
-trad=yes|no
Determine whether the compiler should reject
most of the ANSI extensions to the original K&R
definition and work instead in "traditional"
mode. For more detail on what ANSI options are
not supported when this option is set, see the
section later in this document on K&R
Compatibility Mode.
Default: -trad=no
-uchar=yes
Specifies whether the char data type is
considered as an unsigned integer type with
values in the range 0 to 255, or a signed
integer type with the range +127 to -128.
Default: -uchar=no (signed char)
GENERAL CODE GENERATION OPTIONS
These are options that affect the code generation process,
but that are not dependent on the target processor type.
-g Output additional information for debugging
purposes. Branch optimisation is also
suppressed even if the -O option has been
specified. The current effect of this option is
to include line directives in the generated
assembler output, plus the text of the current
source line as a comment. Not all the assembler
can accept the line directive, so you may find
that you cannot generate the object code from
such an assembler source file. This can still
be useful if you wish to see exactly which C
source lines caused particular assembler code to
be generated.
Default: No debugging information is generated.
-O Specifies that maximum optimisation available is
to be used. This can significantly reduce the
size of the generated code, and will also
normally slightly improve on run time. It can,
however, slow down the compilation process.
You can also use the -peep option to turn on
just certain parts of the optimisation process.
Note that this option is ignored if the -g or
-opt=no options are also specified in the
command line.
Default: The optimisation triggered by this
option is not performed.
-code=yes|no
Specifies whether code is to be generated, or if
this run is merely being used to check for
errors in the source code. The advantage of
specifying the -code=no option if you are merely
looking for errors is that the compiler will run
faster if no attempt is made to generate code.
Default: -code=yes
-longdouble=yes|no
If set to 'yes' then 'long double' is treated as
being a distinct type from 'double' with
different support routines.
Default: -longdouble=no
NOTE. The software support routines for 'long
double' are not currently available for
use with c386/c86/c68 so you would
normally only consider using this option
if generating inline FPU instructions.
-opt=yes|no
Control the operation of the global optimiser.
Normally the optimiser is active as it results
in more efficient code. If you wish to suppress
all global optimisations then you can specify
the -opt=no option. You would not normally use
this option unless you suspect an error in the
optimiser. Using the -opt=no option will
override the -O option if it is also specified.
Default: -opt=yes
-prefix=string
This allows the prefix that is added to external
symbol names (normally either an underscore
character, or a null string) to be changed. The
compiler takes whatever follows the equals sign
as the string value. Quotes should NOT be added
unless required by the parameter parsing
mechanism of the host operating system.
Default: This is really determined by the
standards of the target operating
system. As issued the setting is:
-prefix=_
-reg=yes|no
Specifies constraints on how the compiler is
allowed to allocate variables to registers.
Normally the compiler will try to do automatic
allocation of variables to registers according
to their run-time usage. The -reg=no option
forces the use of register variables only when
explicitly requested by the programmer.
Default: -reg=yes
-separate=yes|no
Determine whether the compiler should allocate
strings and constants in the same segment as the
code, or in a separate data segment.
Default: -separate=no
-stackcheck=yes|no
Specify whether calls should be made to a
support routine to perform stack checks at the
start of each function. To use this option, it
is necessary to have implemented the appropriate
(system dependent) support routine.
Default: -stackcheck=no
-stackopt=safest|minimum|average|maximum
Used to control whether the 'lazy stack
updating' optimisation is to be used. The
meanings of the various values are:
safest Suppress this level of optimisation.
It is advisable to suppress lazy stack
optimisation on routines which are
recursive in nature. Failure to do so
may lead to excessive stack space
being required to successfully run
this program.
minimum A certain amount of optimisation is
done, but nothing that is considered
dangerous. This is the safest mode of
optimisation assuming you allow this
type of optimisation at all.
average Allow optimisation for functions whose
name starts with an underscore.
maximum Allow optimisation for functions whose
name starts with an underscore, or
which are called via a function
variable. This effectively optimises
all function calls.
See the section on optimisation later in this
document for more detail on the implications of
the various settings for this optimisation.
Default: -stackopt=minimum
-trace=yes|no
Control the generation of run-time trace
information. Intended in the future to help
support a source code debugger. However, at the
moment this capability is incomplete. This
option is only available if the compiler was
built with the TRACE configuration option set.
The compiler as normally supplied is not set to
have this option built in.
Default: -trace=no
-trans=yes|no
This option is used if you are working on a
system which can only support symbols names of
limited length. It allows you to make certain
all names in the assembler output are only 8
characters in length (a special algorithm is
used for names that are longer than this). This
is used if the assembler phase cannot handle
long C names. Support for this option is only
included if the TRANSLATE configuration option
was set when the compiler was built. As most
modern systems can support longer symbol names
we normally omit support for this option in
binaries that are put on general distribution.
Default: -trans=no
MOTOROLA 68K OPTIONS
The options listed in this section apply when generating
code for Motorola 68K family of processors. They will
only be available if support for the Motorola 68K
processors was specified at the time the compiler was
built.
-codemode=absolute|small|large
This option is used to tell the compiler what
addressing modes to use for jump instructions.
The meanings of the options are:
absolute Any generated jump instructions use
absolute addressing mode. Typically
this means that runtime relocation of
the generated program needs to be
done.
small Jump instructions will use relative
addressing modes assuming the 'small
model'. This means that all target of
jump instructions are within a 16-bit
displacement of the source. If you
set this and it turns out not to be
true you will almost certainly get
errors when you try and link your
code.
large Jump instructions will use relative
addressing modes assuming the 'large
model' This means that all targets of
jump instructions are within a 32-bit
displacement of the source (which will
always be true).
Note that although the small and large options
generate position independent code, the
resulting program will not be position
independent unless any supplied libraries you
intend to use have also been generated to use
this option, and any variables (that are not
auto variables) are accessed using position
relative addressing.
Default: -codemodel=absolute
-datamodel=absolute|small|large
This option is used to tell the compiler what
addressing modes to use for accessing program
variables. The meanings of the options are:
absolute Variables are accessed using absolute
mode. Typically this means that
runtime relocation of the generated
program needs to be done.
small Variables are accessed using 'small
model' addressing. This means 16-bit
displacements from the register
specified in the -regdata parameter.
If you set this and it turns out not
to be true you will almost certainly
get errors when you try and link your
code.
large Variables are accessed using 'large
model' addressing. This means 32-bit
displacements from the register
specified in the -regdata parameter.
Note that the code generated by the small and
large options requires the address of a specific
external label to be loaded into the register
specified by the -regdata parameter as all
addresses are generated as displacements from
this label. Typically this is done in the
program start-up module.
Only change this option from the default if your
library supplier tells you that you can, or you
are very sure you know what you are doing. Also
there is normally not much to be gained from
using this option unless any supplied libraries
you intend to use have also been generated to
use this option.
Default: -datamodel=absolute
-fpu=yes|no
Specify whether operations involving floating
point variables should generate in-line calls to
a hardware floating point unit, or whether calls
are made instead to library support routines.
Using library support routines allows floating
point operations to be carried out purely in
software.
Default: -fpu=no
-fpureturn=yes|no
This option is used to tell the compiler whether
the library routines are such that floating
point results are returned in the hardware FPU
registers, or in normal registers. Note you
should not normally change this value from the
default unless you have been specifically
advised to do so.
Default: -fpureturn=no
-interrupt=yes|no
This option is used to decide whether functions
should be terminated with a RTS or a RTE
instruction. You would want a RTS in normal
code, and a RTE in an interrupt handler.
The way that you would most likely use this
option is by by using it with an inline #pragma
statement rather than as a command line option.
In otherwords along the lines of:
#pragma interrupt=yes
void special_func()
{
.... code for function
}
#pragma interrupt=no
This would have the effect of only the single
function specified having a RTE instruction to
terminate it with all others having an RTS as
the return instruction.
Default: -interrupt=no
-peep=none|peepopt_list|all
Control the level of peephole optimisation that
should be done. Past experience has shown that
some of the more obscure bugs reported on the
compiler are those where the peephole optimiser
part of the compiler has made an invalid
optimisation. You would therefore use this
option if you suspect that the compiler has
generated incorrect code, and you want to look
at what would be generated if some or all of the
the peephole optimisation was not done.
The meanings of the options are:
none All peephole optimisations are
suppressed.
all All peephole optimisations are
performed.
You can also exercise a finer level of control
by specifying the exact combination of peephole
optimisations that you want from the following
options:
instruction This controls whether instruction
sequences should be replaced by more
effecient combinations.
jumps This controls whether jump
optimisation should be used which
tries to common up re-occurring bits
of code. This normally produces
significant size savings in the
generated code.
flow This tries to analyse the flow of the
code to eliminate redundant loads of
registers. A significant size savig
normally results from this option.
However if it goes wrong, the results
can be rather unpredictable.
Default: -peep=all
-probe=no|yes
Specify whether stack probes should be generated
each time a stack frame is generated. These can
be desirable if using the compiler in a
multi-tasking environment and with a 680x0 based
system which has hardware protection for invalid
memory accesses. The problem is that not enough
space is always left on the stack to store
information for a restart of an instruction, and
stack probes insure that the stack has enough
allocated memory to accommodate the needs of the
routine. Support for this option is only
included if the PROBES configuration option was
set when the compiler was built.
Default: -probe=no
Note: The compiler as supplied is not
normally set to have this option
compiled in. Also there is no point
in attempting to use it if your system
does not have hardware that will
detect attempts to access memory
addresses that are outside the stack.
-regdata=an
Specify which address register is to be used as
the index register for access to variables. This
parameter is only relevant if the setting of the
-datamode specifies that absolute addressing is
not being used. Note that no check is made that
the settings do not conflict with any of the
other -regxxxx options.
Default: -regdata=a5
-regframe=an
Specify which address register is to be used as
the frame pointer. Note that no check is made
that the settings do not conflict with any of
the other -regxxxx options.
Default: -regframe=a6
-regtemp=register_list
Specify which registers are treated as scratch
registers. Note that no check is made to ensure
that you have left enough for the compiler to be
able to sensibly generate code, or that the
settings do not conflict with any of the other
-regxxxx options.
Default: -regtemp=d0,d1,d2,a0,a1,fp0,fp1,fp2
-regunused=register_list
Specify which registers should not be used.
This would be used if you needed to ensure that
a particular register was never corrupted for
some reason. Note that issued libraries will
not have been built with this setting, so use in
average programs is not much use unless the
libraries are rebuilt to match. Note that no
check is made that the settings do not conflict
with any of the other -regxxxx options.
Default: -regunused=
-target=n Used to specify the target processor type.
Values supported are:
68000
68010
68020
68030
68040
Default: -target=68000
If support for multiple processors and/or assemblers was
configured when the compiler was built, then a you can
specify a 68k target with a specific assembler using the
following options:
-ack68k Generate 680x0 code. Use the ACK assembler
syntax for the output.
-cpm68k Generate 680x0 code. Use the CPM assembler
syntax for the output.
-gas68K Generate 680x0 code. Use the GNU assembler
syntax for the output.
-qmc68k Generate 680x0 code. Use the QMAC assembler
syntax for the output.
INTEL 386 OPTIONS
The options in this section apply when generating 32-bit
code for Intel 386 (or better) processors. They will only
be available if support for the Intel 386 processor was
specified at the time the compiler was built.
-fpu=yes|no
Specify whether operations involving floating
point variables should generate in-line calls to
a hardware floating point unit, or whether calls
are made instead to library support routines.
Using library support routines allows floating
point operations to be carried out purely in
software.
Default: -fpu=yes
N.B. We do not supply suitable library routines
to do software emulation of floating point
with the compiler.
-fpureturn=yes|no
This option is used to tell the compiler whether
the library routines are such that floating
point results are returned in the hardware FPU
registers, or in normal registers. Note you
should not normally change this value from the
default unless you have been specifically
advised to do so.
Default: -fpureturn=no
-peep=none|peepopt_list|all
Control the level of peephole optimisation that
should be done. Past experience has shown that
some of the more obscure bugs reported on the
compiler are those where the peephole optimiser
part of the compiler has made an invalid
optimisation. You would therefore use this
option if you suspect that the compiler has
generated incorrect code, and you want to look
at what would be generated if some or all of the
the peephole optimisation was not done.
The meanings of the options are:
none All peephole optimisations are
suppressed.
all All peephole optimisations are
performed. It is equivalent to giving
-peep=flow.
You can also exercise a finer level of control
by specifying the exact combination of peephole
optimisations that you want from the following
options:
flow This tries to analyse the flow of the
code to eliminate redundant loads of
registers. A significant size savig
normally results from this option.
However if it goes wrong, the results
can be rather unpredictable.
Default: -peep=all
If support for multiple assemblers and/or processors types
was specified when the compiler was built, then a 386
processor target plus a specific assembler can be
specified using the following options:
-bas386 Generate 386 code. Use the syntax for Bruce
Evan's 386 assembler for the output.
-gas386 Generate 386 code. Use the GNU 386 assembler
syntax for the output.
-masm386 Generate 386 code. Use the Microsoft MASM
assembler syntax for the output
-sysv386 Generate 386 code. Use the Unix SVR4 assembler
syntax for the output.
INTEL 8086 OPTIONS
The options listed in this section apply when generating
16-bit code for use on Intel processors. They will only
be available if support for the Intel 8086 processor type
was specified at the time the compiler was built.
-fpu=yes|no
Specify whether operations involving floating
point variables should generate in-line calls to
the a hardware floating point unit, or whether
calls are made instead to library support
routines. Using library support routines allows
floating point operations to be carried out
purely in software.
Default: -fpu=yes
-peep=none|peepopt_list|all
Control the level of peephole optimisation that
should be done. Past experience has shown that
some of the more obscure bugs reported on the
compiler are those where the peephole optimiser
part of the compiler has made an invalid
optimisation. You would therefore use this
option if you suspect that the compiler has
generated incorrect code, and you want to look
at what would be generated if some or all of the
the peephole optimisation was not done.
The meanings of the options are:
none All peephole optimisations are
suppressed.
all All peephole optimisations are
performed. It is equivalent to giving
-peep=flow.
You can also exercise a finer level of control
by specifying the exact combination of peephole
optimisations that you want from the following
options:
flow This tries to analyse the flow of the
code to eliminate redundant loads of
registers. A significant size savig
normally results from this option.
However if it goes wrong, the results
can be rather unpredictable.
Default: -peep=all
-pointer=16|32
Specifies that the code should be generated to
conform to the small memory model (64K data +
64K code segments) which uses 16 bit pointers or
the large model which uses 32 bit pointers.
Default: -pointer=16
If support for multiple processors and/or assemblers was
configured when the compiler was built, then you can
specify the target to be a 8086 processor and a specific
assembler can be specified using the following options: