mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 19:19:19 +02:00
* AArch64: fix spilling integer registers to stack offsets that cannot be
encoded directly into the spilling instructions (second part of mantis #38053) git-svn-id: trunk@49207 -
This commit is contained in:
parent
4b4ae79609
commit
bb977b398d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -18733,6 +18733,7 @@ tests/webtbs/tw38012.pp svneol=native#text/pascal
|
|||||||
tests/webtbs/tw38022.pp svneol=native#text/pascal
|
tests/webtbs/tw38022.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3805.pp svneol=native#text/plain
|
tests/webtbs/tw3805.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw38051.pp svneol=native#text/pascal
|
tests/webtbs/tw38051.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw38053.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw38054.pp svneol=native#text/plain
|
tests/webtbs/tw38054.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw38058.pp svneol=native#text/pascal
|
tests/webtbs/tw38058.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw38069.pp svneol=native#text/pascal
|
tests/webtbs/tw38069.pp svneol=native#text/pascal
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
Copyright (c) 1998-2002 by Florian Klaempfl
|
Copyright (c) 1998-2002 by Florian Klaempfl
|
||||||
|
|
||||||
This unit implements the SPARC specific class for the register
|
This unit implements the AArch64 specific class for the register
|
||||||
allocator
|
allocator
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -87,8 +87,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
helplist:=TAsmList.create;
|
helplist:=TAsmList.create;
|
||||||
|
|
||||||
if getregtype(tempreg)=R_INTREGISTER then
|
if (getregtype(tempreg)=R_INTREGISTER) then
|
||||||
hreg:=tempreg
|
hreg:=getregisterinline(helplist,[R_SUBWHOLE])
|
||||||
else
|
else
|
||||||
hreg:=cg.getaddressregister(helplist);
|
hreg:=cg.getaddressregister(helplist);
|
||||||
|
|
||||||
@ -100,6 +100,8 @@ implementation
|
|||||||
else
|
else
|
||||||
helpins:=spilling_create_store(tempreg,tmpref);
|
helpins:=spilling_create_store(tempreg,tmpref);
|
||||||
helplist.concat(helpins);
|
helplist.concat(helpins);
|
||||||
|
if (getregtype(tempreg)=R_INTREGISTER) then
|
||||||
|
ungetregisterinline(helplist,hreg);
|
||||||
add_cpu_interferences(helpins);
|
add_cpu_interferences(helpins);
|
||||||
list.insertlistafter(pos,helplist);
|
list.insertlistafter(pos,helplist);
|
||||||
helplist.free;
|
helplist.free;
|
||||||
|
69
tests/webtbs/tw38053.pp
Normal file
69
tests/webtbs/tw38053.pp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{ %opt=-Sg }
|
||||||
|
|
||||||
|
program fsz;
|
||||||
|
// fpc -OoREGVAR az.pas; ./az
|
||||||
|
// fpc -OoNoREGVAR az.pas; ./az
|
||||||
|
|
||||||
|
// {$mode delphi}
|
||||||
|
{$mode objfpc}
|
||||||
|
|
||||||
|
Type
|
||||||
|
ByteRA0 = array [0..0] of byte;
|
||||||
|
Bytep0 = ^ByteRA0;
|
||||||
|
TNIFTIhdr = record //Next: analyze Format Header structure
|
||||||
|
HdrSz : longint; //MUST BE 348
|
||||||
|
end;
|
||||||
|
|
||||||
|
function readTiff(fnm: string; nhdr: TNIFTIhdr; img: byteP0): string;
|
||||||
|
label
|
||||||
|
555;
|
||||||
|
type
|
||||||
|
TTIFFhdr = record
|
||||||
|
Compression, ImageHeight, ImageWidth,
|
||||||
|
NewSubfileType: uint32;
|
||||||
|
end;
|
||||||
|
const
|
||||||
|
kMaxIFD = 2200;
|
||||||
|
kVal = 1050090;
|
||||||
|
var
|
||||||
|
fsz, i, ok1: integer{int64};
|
||||||
|
jj,w, nTag, nIFD: uint32 {uint64};
|
||||||
|
hdr: array[1..kMaxIFD] of TTIFFhdr;
|
||||||
|
begin
|
||||||
|
result := '';
|
||||||
|
fsz := kVal;
|
||||||
|
ok1 := kVal;
|
||||||
|
jj := kVal;
|
||||||
|
w := kVal;
|
||||||
|
i := kVal;
|
||||||
|
nTag := kVal;
|
||||||
|
nIFD := kVal;
|
||||||
|
writeln('Value ', fsz,' ',ok1,' ',jj,' ',w,' ',i,' ',nTag,' ',nIFD,' -- ', kVal);
|
||||||
|
if fsz <> kVal then
|
||||||
|
halt(1);
|
||||||
|
if ok1 <> kVal then
|
||||||
|
halt(2);
|
||||||
|
if jj <> kVal then
|
||||||
|
halt(3);
|
||||||
|
if w <> kVal then
|
||||||
|
halt(4);
|
||||||
|
if i <> kVal then
|
||||||
|
halt(5);
|
||||||
|
if nTag <> kVal then
|
||||||
|
halt(6);
|
||||||
|
if nIFD <> kVal then
|
||||||
|
halt(7);
|
||||||
|
555:
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ReportTiff();
|
||||||
|
var
|
||||||
|
img: byteP0;
|
||||||
|
nhdr: TNIFTIhdr;
|
||||||
|
begin
|
||||||
|
readTiff('xxx', nhdr, img);
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
ReportTiff();
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user