mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 23:07:55 +02:00
* patch by Christo Crause: generate parameter location information in att assembler mode, resolves #32915
* forbid that parameters are subscribed in assembler, if they are references and take more than one register + test git-svn-id: trunk@38125 -
This commit is contained in:
parent
640480272f
commit
a29f968b3b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14337,6 +14337,7 @@ tests/webtbf/tw32605.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3267.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3275.pp svneol=native#text/plain
|
||||
tests/webtbf/tw32906.pp svneol=native#text/plain
|
||||
tests/webtbf/tw32915.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw3294.pp svneol=native#text/plain
|
||||
tests/webtbf/tw32949.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw3331.pp svneol=native#text/plain
|
||||
|
@ -120,7 +120,7 @@ unit raatt;
|
||||
{ globals }
|
||||
verbose,systems,
|
||||
{ input }
|
||||
scanner,
|
||||
scanner, pbase,
|
||||
{ symtable }
|
||||
symbase,symtype,symsym,symdef,symtable,
|
||||
{$ifdef x86}
|
||||
@ -1049,6 +1049,11 @@ unit raatt;
|
||||
_asmsorted:=TRUE;
|
||||
end;
|
||||
curlist:=TAsmList.Create;
|
||||
|
||||
{ we might need to know which parameters are passed in registers }
|
||||
if not parse_generic then
|
||||
current_procinfo.generate_parameter_info;
|
||||
|
||||
lasTSec:=sec_code;
|
||||
{ start tokenizer }
|
||||
gettoken;
|
||||
|
@ -155,6 +155,7 @@ unit rasm;
|
||||
if (po_assembler in current_procinfo.procdef.procoptions) and
|
||||
(sym.typ=paravarsym) and
|
||||
(tparavarsym(sym).paraloc[calleeside].location^.loc=LOC_REGISTER) and
|
||||
not assigned(tparavarsym(sym).paraloc[calleeside].location^.Next) and
|
||||
isimplicitpointer then
|
||||
exit;
|
||||
|
||||
|
25
tests/webtbf/tw32915.pp
Normal file
25
tests/webtbf/tw32915.pp
Normal file
@ -0,0 +1,25 @@
|
||||
{ %cpu=avr }
|
||||
{ %fail }
|
||||
program test;
|
||||
|
||||
type
|
||||
TUintRecord = packed record
|
||||
l:byte;
|
||||
h:byte;
|
||||
end;
|
||||
|
||||
procedure delayloop2(const counter: TUintRecord); assembler;
|
||||
asm
|
||||
mov XH, counter.h
|
||||
mov XL, counter.l
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
t: TUintRecord;
|
||||
|
||||
begin
|
||||
t.l := 1;
|
||||
t.h := 0;
|
||||
delayloop2(t);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user