mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 01:10:01 +02:00
* handle GOT-relative loads in the assembler reader as reads of
sizeof(pint) bytes (mantis 23109) git-svn-id: trunk@28789 -
This commit is contained in:
parent
edd96fc46b
commit
5c8ae259c4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13923,6 +13923,7 @@ tests/webtbs/tw2300.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2305.pp svneol=native#text/plain
|
tests/webtbs/tw2305.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2306.pp svneol=native#text/plain
|
tests/webtbs/tw2306.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2307.pp svneol=native#text/plain
|
tests/webtbs/tw2307.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw23109.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2311.pp svneol=native#text/plain
|
tests/webtbs/tw2311.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw23130.pp svneol=native#text/pascal
|
tests/webtbs/tw23130.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw23136.pp svneol=native#text/pascal
|
tests/webtbs/tw23136.pp svneol=native#text/pascal
|
||||||
|
@ -437,7 +437,11 @@ begin
|
|||||||
memopsize := 0;
|
memopsize := 0;
|
||||||
case operands[i].opr.typ of
|
case operands[i].opr.typ of
|
||||||
OPR_LOCAL: memopsize := operands[i].opr.localvarsize * 8;
|
OPR_LOCAL: memopsize := operands[i].opr.localvarsize * 8;
|
||||||
OPR_REFERENCE: memopsize := operands[i].opr.varsize * 8;
|
OPR_REFERENCE:
|
||||||
|
if operands[i].opr.ref.refaddr = addr_pic then
|
||||||
|
memopsize := sizeof(pint) * 8
|
||||||
|
else
|
||||||
|
memopsize := operands[i].opr.varsize * 8;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if memopsize = 0 then memopsize := topsize2memsize[tx86operand(operands[i]).opsize];
|
if memopsize = 0 then memopsize := topsize2memsize[tx86operand(operands[i]).opsize];
|
||||||
|
13
tests/webtbs/tw23109.pp
Normal file
13
tests/webtbs/tw23109.pp
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ %cpu=x86_64}
|
||||||
|
{ %opt=-Cg -vew }
|
||||||
|
|
||||||
|
var
|
||||||
|
global: boolean;
|
||||||
|
begin
|
||||||
|
asm
|
||||||
|
movq global@GOTPCREL(%rip), %rax
|
||||||
|
movb $1, (%rax)
|
||||||
|
end;
|
||||||
|
if not global then
|
||||||
|
halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user