 |
M680x0 Target Options |
The GCC compiler used in TIGCC is configured for just one target family:
the Motorola M680x0 (M68k) family. In the TI-89, TI-92+, and V200 calculators,
an MC68000 processor is used, therefore TIGCC creates code for such a
processor by default. However, switches specifying the processor model, such
as '-m68020', still exist, although they are not useful. However,
there are also options that control the code that is generated specifically
for TI calculators; they also start with '-m':
- -mno-bss
- Output all uninitialized global or static variables as normal data with
zero content. Note that this leads to different semantics if the program is
not compressed or archived: The variables will keep their values even after
program termination, instead of being initialized to zero every time the
program is run. For a better alternative, see
MERGE_BSS
.
- -mlong
- Consider type
int
to be 32 bits wide, like long int
.
The '-mshort' option is enabled by default in TIGCC; the negative is
actually '-mnoshort', but '-mno-short' and '-mlong' have
been added as aliases. Constants such as INT_MAX
are set to the
appropriate values, and __INT_SHORT__
will be defined if short
integers are used (i.e. if this switch is not used). This option may be
useful if you need to port code from a system which uses long integers.
- -mno-tios
- Again, this is the negative form of a switch called '-mtios',
which changes the convention for returning pointers from functions, and which
also implies '-fcall-used-d2'. This is necessary to make GCC work
with the TIOS calling conventions, therefore '-mno-tios' may only be
used if no interaction with the operating system is required. Since library
calls also use the TIOS calling convention, they cannot be used either; you
should disable linking against
tigcc.a
. Only use this option if
you know exactly what you are doing.
- -mmlink
- Assume that uninitialized global variables can be handled smartly through
BSS blocks even in kernel-less mode.
- -mpcrel
- Use the pc-relative addressing mode of the 68000 directly, instead of
using a global offset table (also known as the relocation table).
Therefore, this option produces position-independent code.
- -mregparm[=regcount]
- Use register passing for all user-defined functions. regcount
data registers plus regcount address registers are used to pass
arguments to functions. If regcount is not specified, a default value
of 2 is used. You should not specify a value higher than 6, or 5 if you use
OPTIMIZE_ROM_CALLS
.
Note that you have to be careful with callback functions if you use this
switch, although you will be warned about incompatiblities.
- -mbitfield
- Use bit-field instructions.
- -malign-int
- Aligns
int
, long
, long long
,
float
, double
, and long double
variables on a 32-bit
boundary.
- -mno-strict-align
-mstrict-align
- Do not or do assume that unaligned memory references will be handled by
the system.
- -mno-merge-sections
- Do not merge the
.text
and .data
sections,
as TIGCC normally does (to save space used by relocation).
- -mmerge-to-data
- When merging sections, merge to
.data
rather than to
.text
.
- -mrodata-to-text
- When not merging sections, put read-only data into
.text
rather than .data
.