mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 19:59:18 +02:00
* fixes assembling of mov ax,<mem16>
* fixes assembling of test <mem8>,reg8; resolves #11786 git-svn-id: trunk@12040 -
This commit is contained in:
parent
c6c9ec83e0
commit
49195b0ac0
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8577,6 +8577,7 @@ tests/webtbs/tw11619.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11711.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11762.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11763.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11786.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1181.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11846a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw11846b.pp svneol=native#text/plain
|
||||
|
@ -1,2 +1,2 @@
|
||||
{ don't edit, this file is generated from x86ins.dat }
|
||||
1379;
|
||||
1380;
|
||||
|
@ -2936,10 +2936,17 @@
|
||||
(
|
||||
opcode : A_MOV;
|
||||
ops : 2;
|
||||
optypes : (ot_reg_ax or ot_bits32,ot_mem_offs,ot_none);
|
||||
code : #213#193#1#161#29;
|
||||
optypes : (ot_reg_ax,ot_mem_offs,ot_none);
|
||||
code : #212#193#1#161#29;
|
||||
flags : if_8086 or if_sm or if_nox86_64
|
||||
),
|
||||
(
|
||||
opcode : A_MOV;
|
||||
ops : 2;
|
||||
optypes : (ot_reg_eax,ot_mem_offs,ot_none);
|
||||
code : #213#193#1#161#29;
|
||||
flags : if_386 or if_sm or if_nox86_64
|
||||
),
|
||||
(
|
||||
opcode : A_MOV;
|
||||
ops : 2;
|
||||
@ -6346,7 +6353,7 @@
|
||||
opcode : A_TEST;
|
||||
ops : 2;
|
||||
optypes : (ot_regmem or ot_bits8,ot_reg8,ot_none);
|
||||
code : #193#211#1#132#72;
|
||||
code : #193#211#1#132#65;
|
||||
flags : if_8086 or if_sm
|
||||
),
|
||||
(
|
||||
|
@ -1017,7 +1017,8 @@ reg_eax,reg_ecx,reg_edx \3\x0F\x01\xC8 PRESCOTT,ND
|
||||
(Ch_Wop2, Ch_Rop1, Ch_None)
|
||||
mem_offs,reg_ax|32 \300\320\1\xA3\34 8086,SM,NOX86_64
|
||||
regmem,reg16|32|64 \300\320\1\x89\101 8086,SM
|
||||
reg_ax|32,mem_offs \325\301\1\xA1\35 8086,SM,NOX86_64
|
||||
reg_ax,mem_offs \324\301\1\xA1\35 8086,SM,NOX86_64
|
||||
reg_eax,mem_offs \325\301\1\xA1\35 386,SM,NOX86_64
|
||||
reg16|32|64,regmem \301\320\1\x8B\110 8086,SM
|
||||
reg32|64,imm \320\10\xB8\35 386,SD
|
||||
rm32|64,imm \300\320\1\xC7\200\41 386,SD
|
||||
@ -2025,7 +2026,7 @@ void \2\x0F\x07 P6,PRIV,AMD
|
||||
regmem,reg16|32|64 \300\320\1\x85\101 8086,SM
|
||||
reg16|32|64,mem \301\320\1\x85\110 8086,SM
|
||||
reg8,reg8 \300\323\1\x84\101 8086
|
||||
rm8,reg8 \301\323\1\x84\110 8086,SM
|
||||
rm8,reg8 \301\323\1\x84\101 8086,SM
|
||||
reg_eax,imm \325\1\xA9\41 386,SM
|
||||
reg_ax,imm \324\1\xA9\31 8086,SM
|
||||
reg_al,imm \1\xA8\21 8086,SM
|
||||
|
@ -6290,7 +6290,7 @@
|
||||
opcode : A_TEST;
|
||||
ops : 2;
|
||||
optypes : (ot_regmem or ot_bits8,ot_reg8,ot_none);
|
||||
code : #193#211#1#132#72;
|
||||
code : #193#211#1#132#65;
|
||||
flags : if_8086 or if_sm
|
||||
),
|
||||
(
|
||||
|
25
tests/webtbs/tw11786.pp
Normal file
25
tests/webtbs/tw11786.pp
Normal file
@ -0,0 +1,25 @@
|
||||
{ %cpu=i386 }
|
||||
var
|
||||
w : word;
|
||||
b1,b2,b3 : byte;
|
||||
begin
|
||||
b1:=$aa;
|
||||
b2:=$55;
|
||||
b3:=$aa;
|
||||
{$asmmode intel}
|
||||
asm
|
||||
mov eax,$deadbeef
|
||||
mov ax,w
|
||||
shr eax,16
|
||||
mov w,ax
|
||||
mov bl,$55
|
||||
lea edx,b2
|
||||
test [edx],bl
|
||||
setnz b1
|
||||
end;
|
||||
if w<>$dead then
|
||||
halt(1);
|
||||
if b1<>1 then
|
||||
halt(1);
|
||||
writeln('ok');
|
||||
end.
|
Loading…
Reference in New Issue
Block a user