Hello, List!
I've successfully built cross-compiler for PowerPC
GPC configuration attached below.
Anyway, I cannot execute simple program built with my new compiler. Program
looks like:
program test;
type
MyRecord = record
x: word;
y: word;
end;
var
t1, t2: MyRecord;
begin
writeln ('SizeOf (word)', Sizeof (word));
writeln ('SizeOf (longword)', Sizeof (longword));
writeln ('SizeOf (CInteger)', Sizeof (CInteger));
t1.x := 1;
t1.y := 1;
writeln ('before assignment');
t2 := t1;
writeln ('after assignment');
end.
Program output:
bash-2.05b# ./test
SizeOf (word)4
SizeOf (longword)8
SizeOf (CInteger)4
before assignment
Illegal instruction
When I change type of fields fo MyRecord to longword, it works fine. Is it
anything wrong with alignment or packed records? But my record isn't
packed ...
I could avoid usage of whole records assignments and assign the values field
by field but there are two reason why I don't want to do that:
1. it shows that something is wrong, isn't it?
2. assignment of the whole records is used in crt.pas unit, for example, in
function ScreenSize of crt.pas unit which return the value of TPoint type
which is record (this assignment doesn't work as well). I really don't want
change anything in crt.pas unit:).
Please, any ideas or hints ...
Thank you, regards,
Igor Marnat
GPC configuration:
(Reading specs
from /home/igor/denx_tools/usr/lib/gcc-lib/ppc-linux/3.3.3/specs
Configured with: ../configure --prefix=/home/igor/denx_tools/usr
--mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
--enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --with-newlib --enable-languages=c,c++,pascal
--disable-libgcj --host=i386-redhat-linux --target=ppc-linux
Thread model: posix
gpc version 20050217, based on gcc-3.3.3 (DENX ELDK custom version 3.3.3-8) ).
~