mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 12:30:42 +02:00
add loongarch64 tests support
This commit is contained in:
parent
33acbedd53
commit
6dcfed0e0b
@ -2580,7 +2580,9 @@ copyfiles:
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/cg
|
||||
-$(COPY) $(C_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
-$(COPY) $(CPP_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
ifeq ($(FULL_TARGET),i8086-msdos)
|
||||
-$(COPY) $(TASM_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
endif
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
|
||||
testprep: testprep-stamp.$(TEST_FULL_TARGET)
|
||||
testprep-stamp.$(TEST_FULL_TARGET): utils tstunits copyfiles
|
||||
|
@ -284,7 +284,9 @@ copyfiles:
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/cg
|
||||
-$(COPY) $(C_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
-$(COPY) $(CPP_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
ifeq ($(FULL_TARGET),i8086-msdos)
|
||||
-$(COPY) $(TASM_OBJECTS) $(TEST_OUTPUTDIR)/test/cg
|
||||
endif
|
||||
-$(MKDIRTREE) $(TEST_OUTPUTDIR)/test/units/system
|
||||
|
||||
|
||||
|
@ -73,6 +73,13 @@ asm
|
||||
addi a1, y, 0
|
||||
end;
|
||||
{$endif CPURISCV64}
|
||||
{$ifdef CPULOONGARCH64}
|
||||
{$define SUPPORTED}
|
||||
asm
|
||||
addi.d $a0, x, 0
|
||||
addi.d $a1, y, 0
|
||||
end;
|
||||
{$endif CPULOONGARCH6}
|
||||
{$ifndef SUPPORTED}
|
||||
asm
|
||||
end;
|
||||
|
@ -70,6 +70,12 @@ end;
|
||||
end;
|
||||
{$define implemented}
|
||||
{$endif cpuriscv64}
|
||||
{$ifdef cpuloongarch64}
|
||||
pcalau12i $a0, %got_pc_hi20(stacksize)
|
||||
ld.d $a0, $a0, %got_pc_lo12(stacksize)
|
||||
end;
|
||||
{$define implemented}
|
||||
{$endif cpuloongarch64}
|
||||
{$ifndef implemented}
|
||||
{$error This test does not supported this CPU}
|
||||
end;
|
||||
|
BIN
tests/test/cg/obj/linux/loongarch64/cpptcl1.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/cpptcl1.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/cpptcl2.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/cpptcl2.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/ctest.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/ctest.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/tcext3.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/tcext3.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/tcext4.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/tcext4.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/tcext5.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/tcext5.o
Normal file
Binary file not shown.
BIN
tests/test/cg/obj/linux/loongarch64/tcext6.o
Normal file
BIN
tests/test/cg/obj/linux/loongarch64/tcext6.o
Normal file
Binary file not shown.
31
tests/test/treturn1.pp
Normal file
31
tests/test/treturn1.pp
Normal file
@ -0,0 +1,31 @@
|
||||
{ %opt=-O-}
|
||||
type
|
||||
TIpHtmlElemMarginStyle = (
|
||||
hemsAuto, // use default
|
||||
hemsPx // pixel
|
||||
);
|
||||
TIpHtmlElemMargin = record
|
||||
Style: TIpHtmlElemMarginStyle;
|
||||
Size: single;
|
||||
end;
|
||||
|
||||
var
|
||||
tmp2 :TIpHtmlElemMargin;
|
||||
|
||||
function test_fn:TIpHtmlElemMargin;
|
||||
var
|
||||
tmp1 :TIpHtmlElemMargin;
|
||||
begin
|
||||
tmp1.Size := 3.123;
|
||||
tmp1.Style := hemsPx;
|
||||
test_fn := tmp1;
|
||||
end;
|
||||
|
||||
begin
|
||||
tmp2 := test_fn();
|
||||
if(tmp2.Style <> hemsPx)then
|
||||
halt(1);
|
||||
if(Abs(tmp2.Size - 3.123) > 0.01)then
|
||||
halt(2);
|
||||
writeln('ok ');
|
||||
end.
|
@ -27,6 +27,10 @@ program ExecStack;
|
||||
{$ifdef cpum68k}
|
||||
ret: word;
|
||||
{$endif}
|
||||
{$if defined(cpuloongarch64)}
|
||||
ret: longint;
|
||||
{$endif}
|
||||
|
||||
DoNothing: proc;
|
||||
|
||||
begin
|
||||
@ -94,6 +98,12 @@ program ExecStack;
|
||||
DoNothing;
|
||||
{$endif cpuarm}
|
||||
|
||||
{$if defined(cpuloongarch64)}
|
||||
ret := $20220829;
|
||||
DoNothing := proc(@ret);
|
||||
DoNothing;
|
||||
{$endif cpuloongarch64}
|
||||
|
||||
end;
|
||||
begin
|
||||
DoIt;
|
||||
|
Loading…
Reference in New Issue
Block a user