mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 08:52:36 +02:00
- testing sparc is now possible using standard test programs
it passed the stage of hello world!
This commit is contained in:
parent
ddfc73d0eb
commit
f0e37e3520
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
DoExitAsm ()
|
||||
{ echo "An error occurred while assembling $1"; exit 1; }
|
||||
DoExitLink ()
|
||||
{ echo "An error occurred while linking $1"; exit 1; }
|
||||
echo Assembling $1
|
||||
/usr/local/bin/sparc-linux/as -o "$1.o" "$1.s"
|
||||
if [ $? != 0 ]; then DoExitAsm system; fi
|
||||
echo Assembling system
|
||||
/usr/local/bin/sparc-linux/as -o system.o system.s
|
||||
/usr/local/bin/sparc-linux/as -o prt0.o ../../rtl/linux/sparc/prt0.as
|
||||
if [ $? != 0 ]; then DoExitAsm sparctest; fi
|
||||
echo Linking sparctest
|
||||
/usr/local/bin/sparc-linux/ld -s -L. -o "$1" link.res
|
||||
if [ $? != 0 ]; then DoExitLink sparctest; fi
|
@ -1,15 +0,0 @@
|
||||
{ $Id$ }
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
BEGIN
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2003-02-05 21:54:37 mazen
|
||||
* changing names of test files to allow traçability and automated NRT
|
||||
|
||||
Revision 1.5 2002/12/06 08:35:50 mazen
|
||||
+ added just to test RTL compilation
|
||||
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
x:Cardinal;
|
||||
BEGIN
|
||||
x:=0;
|
||||
END.
|
@ -1,10 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
x,y:Cardinal;
|
||||
BEGIN
|
||||
y:=0;
|
||||
y:=0;
|
||||
y:=x+1;
|
||||
END.
|
@ -1,20 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
x,y:Cardinal;
|
||||
z:0..255;
|
||||
FUNCTION CopyMe(x:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
CopyMe:=x;
|
||||
END;
|
||||
FUNCTION Add(a,b:Cardinal):Cardinal;
|
||||
BEGIN
|
||||
Add:=a+b;
|
||||
END;
|
||||
BEGIN
|
||||
y:=0;
|
||||
z:=0;
|
||||
x:=1+y;
|
||||
x:=Add(x,y);
|
||||
END.
|
@ -1,8 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
CONST
|
||||
s:STRING='Hello World!';
|
||||
BEGIN
|
||||
WriteLn(s);
|
||||
END.
|
@ -1,9 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
i:Integer;
|
||||
BEGIN
|
||||
FOR i:=0 TO MaxInt DO
|
||||
WriteLn(i);
|
||||
END.
|
@ -1,10 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
i:Integer;
|
||||
BEGIN
|
||||
IF(i>0)
|
||||
THEN
|
||||
WriteLn(i);
|
||||
END.
|
@ -1,10 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
c:Char;
|
||||
BEGIN
|
||||
IF(c='0')
|
||||
THEN
|
||||
WriteLn(c);
|
||||
END.
|
@ -1,15 +0,0 @@
|
||||
{$UNITPATH ../../rtl/linux}
|
||||
{$INCLUDEPATH ../../rtl/unix;../../rtl/inc;../../rtl/unix;../../rtl/sparc}
|
||||
PROGRAM SparcTest;
|
||||
VAR
|
||||
c:Char;
|
||||
BEGIN
|
||||
CASE c OF
|
||||
'0':
|
||||
WriteLn(0);
|
||||
'1':
|
||||
WriteLn(1);
|
||||
'2':
|
||||
WriteLn('2');
|
||||
END;
|
||||
END.
|
Loading…
Reference in New Issue
Block a user