mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 14:10:24 +02:00
* allow also 8 byte string constants in assembler, resolves #28640
git-svn-id: trunk@49066 -
This commit is contained in:
parent
308aee42a0
commit
6218254e53
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -18146,6 +18146,8 @@ tests/webtbs/tw2853e.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw2859.pp svneol=native#text/plain
|
tests/webtbs/tw2859.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw28593.pp svneol=native#text/plain
|
tests/webtbs/tw28593.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw28632.pp -text svneol=native#text/plain
|
tests/webtbs/tw28632.pp -text svneol=native#text/plain
|
||||||
|
tests/webtbs/tw28640.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw28640a.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw28641.pp svneol=native#text/plain
|
tests/webtbs/tw28641.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2865.pp svneol=native#text/plain
|
tests/webtbs/tw2865.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw28650.pp svneol=native#text/pascal
|
tests/webtbs/tw28650.pp svneol=native#text/pascal
|
||||||
|
@ -1594,6 +1594,11 @@ unit raatt;
|
|||||||
4 :
|
4 :
|
||||||
l:=ord(actasmpattern[4]) + ord(actasmpattern[3]) shl 8 +
|
l:=ord(actasmpattern[4]) + ord(actasmpattern[3]) shl 8 +
|
||||||
Ord(actasmpattern[2]) shl 16 + ord(actasmpattern[1]) shl 24;
|
Ord(actasmpattern[2]) shl 16 + ord(actasmpattern[1]) shl 24;
|
||||||
|
8 :
|
||||||
|
begin
|
||||||
|
move(actasmpattern[1],l,8);
|
||||||
|
l:=SwapEndian(l);
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
Message1(asmr_e_invalid_string_as_opcode_operand,actasmpattern);
|
Message1(asmr_e_invalid_string_as_opcode_operand,actasmpattern);
|
||||||
end;
|
end;
|
||||||
|
@ -1494,6 +1494,11 @@ Unit Rax86int;
|
|||||||
4 :
|
4 :
|
||||||
l:=ord(actasmpattern[4]) + ord(actasmpattern[3]) shl 8 +
|
l:=ord(actasmpattern[4]) + ord(actasmpattern[3]) shl 8 +
|
||||||
Ord(actasmpattern[2]) shl 16 + ord(actasmpattern[1]) shl 24;
|
Ord(actasmpattern[2]) shl 16 + ord(actasmpattern[1]) shl 24;
|
||||||
|
8 :
|
||||||
|
begin
|
||||||
|
move(actasmpattern[1],l,8);
|
||||||
|
l:=SwapEndian(l);
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
Message1(asmr_e_invalid_string_as_opcode_operand,actasmpattern);
|
Message1(asmr_e_invalid_string_as_opcode_operand,actasmpattern);
|
||||||
end;
|
end;
|
||||||
|
15
tests/webtbs/tw28640.pp
Normal file
15
tests/webtbs/tw28640.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ %cpu=x86_64 }
|
||||||
|
function test : int64;assembler;
|
||||||
|
{$ASMMODE INTEL}
|
||||||
|
asm
|
||||||
|
MOV RAX,'=TXEHTAP' // FAIL: LONG STRING "PATHEXT="
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
s : string[8];
|
||||||
|
l : int64 absolute s[1];
|
||||||
|
begin
|
||||||
|
l:=test;
|
||||||
|
s[0]:=#8;
|
||||||
|
if s<>'PATHEXT=' then
|
||||||
|
halt(1);
|
||||||
|
end.
|
14
tests/webtbs/tw28640a.pp
Normal file
14
tests/webtbs/tw28640a.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ %cpu=x86_64 }
|
||||||
|
function test : int64;assembler;
|
||||||
|
asm
|
||||||
|
MOV $'=TXEHTAP',%RAX // FAIL: LONG STRING "PATHEXT="
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
s : string[8];
|
||||||
|
l : int64 absolute s[1];
|
||||||
|
begin
|
||||||
|
l:=test;
|
||||||
|
s[0]:=#8;
|
||||||
|
if s<>'PATHEXT=' then
|
||||||
|
halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user