2
Readme for the m68k compiler FPC 0.99.5c
3
----------------------------------------
5
Updated since last version:
6
- alignment problems bugfixed -- now it works for real (I hope!)
7
- CRC loading on big endian machines was wrong
10
2) Cross-compiler binaries
11
3) General information and porting tips
13
1) m68k Binaries information
14
----------------------------
16
Amiga binary version notes:
17
---------------------------
20
- 2 Megabytes RAM (Chip or Fast) minimum to produce assembler files
21
- 1 Megabyte hard drive space
22
- 128K stack space (set it via 'stack')
23
- AmigaOS v2.04 or higher
26
- Because the heap can become fragmented when using ld and as, sometimes
27
you will no longer be able to run ppc after calling these programs,
28
use avail flush or reboot your computer to solve this.
29
- Because how the os works with files and because of a bug in the
30
compiler, if an error occurs or a break signal is issued. some files
31
might remain opened. This only happens with non units and non source
32
code files such as ppc.cfg, the only way to fix this is to reboot
33
the computer. As soon as i have the time, I will implement an exit
34
procedure in the system unit which close all files automatically on
35
any program termination.
36
- gdb support is not implemented, as it requires an interface
38
- as 2.5.2 and ld 2.8.1 are used in this package, since as 2.8.1 seems
39
to be buggy (at least the version i downloaded) with gdb info
40
- A good debugging tool to use is barfly available from Aminet
42
Atari binary version notes:
43
---------------------------
46
- 2 Megabytes RAM minimum to produce assembler files
47
- 1 Megabyte hard drive space
48
- GemDOS 0.15 or higher
49
- Atari Extended Argument Specification compatible shell
52
2) Cross-compiler binaries
53
--------------------------
57
- 2 Megabytes RAM minimum to produce assembler files
58
- 1 Megabyte hard drive space
60
- 16-bit dpmi server (one is supplied with the binary)
62
A default configuration can be found in ppc.cfg, and the
63
sysatari library source code is in the ./src/ directory.
65
This can be used as a template for embedded processor
66
development, you just need to replace all sysatari
67
routines by emtpy ones (for example), most other routines
68
in the include file should be kept (some of them are internal)
72
- 2 Megabytes RAM minimum to produce Amiga binaries
73
- 2 Megabyte hard drive space with all binaries,
74
compiler, assembler and linker + rtl.
76
- amigaas, gnu as, a crossversion, included
77
- amigald, gnu ld, a crossversion, included
79
The compiler will read pp68k.cfg for configuration the
80
proper place for this is in /etc. A default pp68k.cfg is
83
Just make sure that pp68k, amigaas and amigald is in
84
your path, why not /usr/local/bin
86
3) General information and porting tips
87
---------------------------------------
89
- Alignment output is supposedely correct even though i can't
90
personally test this. (Someone else tested for me)
91
- Some tips to port some general code from i386 FPC to m68k FPC,
92
you should limit your local variables and pushed variables
93
in a routine 32K, this is a displacement limit of older m68k
94
processors, and it has been kept.
95
- If you use PACKED records anywhere, make sure that non-byte fields
96
are aligned on even addresses, otherwise this will cause
97
alignment errors on older m68k processors (68000/68010), if
98
you don't use packed , disregard this remark, as everything
99
will be automatically aligned. The compiler takes care of
100
of aligning all local and global simple type variables on
101
at least word boundaries (for the m68k only). pointer are always
102
at least aligned on dword boundaries.
103
- PPU files (PP? files) are portable across big-endian and little
104
endian systems, EXCEPT in the case where the unit references
105
floating point values, as these are not saved in the correct
106
endian for the moment.
107
- GNU assembler (gas) syntax acceptance varies widely between gas versions
108
,therefore the -Ai and -Agas switches are your friend here. If you
109
still get trouble try, -TPALMOS as a target, this changes to more
110
standard assembler. Finally in any case you can always the
111
--register-prefix-optional options in any GNU assembler version if it
113
- To compile a system unit use these switches:
114
TARGET -dm68k -Sg -Us mysystem.pp
116
-TAMIGA, -TATARI , -TLINUX or -TPALMOS
117
mysystem.pp should be replaced by the system unit name
123
- BIG sets (with more then different 32 values) are stored in little
124
endian format. This can cause BIG problems if you use exotic set
125
functions like an array of byte typecast to a set, the values should
126
be byteswapped first to conform to little (intel) endian format. If
127
you use normal set functions such as addition, subtraction, in operator
128
you should not get any problems. I'm not sure if this is worth fixing
130
- Because of how everything works now, BYTE pushes are stored in byte
131
reversed format in a word on the stack. This behavior should not
132
be noticeable unless you do very low level stuff. The downside of this
133
is that linking with external routines which expect bytes as parameters
134
will probably not work. This will be fixed, just need to find the
137
Enjoy! BTW: I still need help in porting to Mac, Linux and Atari and
138
also someone to do a peephole optimizer for the m68k code output.
140
You can get general Free Pascal information at:
141
http://www.brain.uni-freibrug.de/~klaus/fpc/fpc.html
142
Developer mailing list:
143
fpc-devel@mail.terrasoft.hu
145
You can contact me at:
147
http://www-edu.gel.usherb.ca/codc01
148
Amiga inlucdes/units and Amiga specific stuff:
149
nils.sjoholm@mailbox.swipnet.se
152
That is apart from the FPC development team (which i am part)....:
154
Nils Sjoholm - AMIGA porter and tester, 68000 tester,
155
the most dedicated person for the m68k port found so far!