mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 15:05:58 +02:00
* ag386bin finally make cycles correct
* prefixes are now also normal opcodes
This commit is contained in:
parent
f4c74e4a3d
commit
03bdf07fe0
@ -553,8 +553,29 @@ ait_labeled_instruction : AsmWriteLn(#9#9+int_op2str[pai386_labeled(hp)^.opcode]
|
|||||||
prefix:= '';
|
prefix:= '';
|
||||||
{$ifdef AG386BIN}
|
{$ifdef AG386BIN}
|
||||||
{ added prefix instructions, must be on same line as opcode }
|
{ added prefix instructions, must be on same line as opcode }
|
||||||
for i:=1to pai386(hp)^.nprefixes do
|
if (pai386(hp)^.ops = 0) and
|
||||||
prefix:=int_prefix2str[pai386(hp)^.prefixes[i-1]]+#9;
|
((pai386(hp)^.opcode = A_REP) or
|
||||||
|
(pai386(hp)^.opcode = A_LOCK) or
|
||||||
|
(pai386(hp)^.opcode = A_REPE) or
|
||||||
|
(pai386(hp)^.opcode = A_REPNZ) or
|
||||||
|
(pai386(hp)^.opcode = A_REPZ) or
|
||||||
|
(pai386(hp)^.opcode = A_REPNE)) then
|
||||||
|
Begin
|
||||||
|
prefix:=int_op2str[pai386(hp)^.opcode]+#9;
|
||||||
|
hp:=Pai(hp^.next);
|
||||||
|
{ this is theorically impossible... }
|
||||||
|
if hp=nil then
|
||||||
|
begin
|
||||||
|
s:=#9#9+prefix;
|
||||||
|
AsmWriteLn(s);
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
{ nasm prefers prefix on a line alone }
|
||||||
|
AsmWriteln(#9#9+prefix);
|
||||||
|
prefix:='';
|
||||||
|
end
|
||||||
|
else
|
||||||
|
prefix:= '';
|
||||||
if pai386(hp)^.ops<>0 then
|
if pai386(hp)^.ops<>0 then
|
||||||
begin
|
begin
|
||||||
if pai386(hp)^.opcode=A_CALL then
|
if pai386(hp)^.opcode=A_CALL then
|
||||||
@ -765,7 +786,11 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.27 1999-02-26 00:48:13 peter
|
Revision 1.28 1999-03-01 15:46:16 peter
|
||||||
|
* ag386bin finally make cycles correct
|
||||||
|
* prefixes are now also normal opcodes
|
||||||
|
|
||||||
|
Revision 1.27 1999/02/26 00:48:13 peter
|
||||||
* assembler writers fixed for ag386bin
|
* assembler writers fixed for ag386bin
|
||||||
|
|
||||||
Revision 1.26 1999/02/25 21:02:18 peter
|
Revision 1.26 1999/02/25 21:02:18 peter
|
||||||
|
@ -550,8 +550,6 @@ ait_labeled_instruction :
|
|||||||
suffix:='';
|
suffix:='';
|
||||||
prefix:='';
|
prefix:='';
|
||||||
{$ifdef AG386BIN}
|
{$ifdef AG386BIN}
|
||||||
for i:=1to pai386(hp)^.nprefixes do
|
|
||||||
AsmWriteln(int_prefix2str[pai386(hp)^.prefixes[i-1]]);
|
|
||||||
if pai386(hp)^.ops<>0 then
|
if pai386(hp)^.ops<>0 then
|
||||||
begin
|
begin
|
||||||
if pai386(hp)^.opcode=A_CALL then
|
if pai386(hp)^.opcode=A_CALL then
|
||||||
@ -596,7 +594,8 @@ ait_labeled_instruction :
|
|||||||
if pai386(hp)^.opcode=A_FWAIT then
|
if pai386(hp)^.opcode=A_FWAIT then
|
||||||
AsmWriteln(#9#9'DB'#9'09bh')
|
AsmWriteln(#9#9'DB'#9'09bh')
|
||||||
else
|
else
|
||||||
AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^.opcode]+cond2str[pai386_labeled(hp)^.condition]+suffix+s);
|
AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^.opcode]+
|
||||||
|
cond2str[pai386_labeled(hp)^.condition]+suffix+s);
|
||||||
{$else}
|
{$else}
|
||||||
{ added prefix instructions, must be on same line as opcode }
|
{ added prefix instructions, must be on same line as opcode }
|
||||||
if (pai386(hp)^.op1t = top_none) and
|
if (pai386(hp)^.op1t = top_none) and
|
||||||
@ -749,7 +748,11 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.20 1999-02-26 00:48:14 peter
|
Revision 1.21 1999-03-01 15:46:17 peter
|
||||||
|
* ag386bin finally make cycles correct
|
||||||
|
* prefixes are now also normal opcodes
|
||||||
|
|
||||||
|
Revision 1.20 1999/02/26 00:48:14 peter
|
||||||
* assembler writers fixed for ag386bin
|
* assembler writers fixed for ag386bin
|
||||||
|
|
||||||
Revision 1.19 1999/02/25 21:02:19 peter
|
Revision 1.19 1999/02/25 21:02:19 peter
|
||||||
|
@ -1268,6 +1268,11 @@ implementation
|
|||||||
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,
|
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,
|
||||||
newreference(pfrom^.location.reference),hregister)));
|
newreference(pfrom^.location.reference),hregister)));
|
||||||
end;
|
end;
|
||||||
|
LOC_FLAGS :
|
||||||
|
begin
|
||||||
|
hregister:=getregister32;
|
||||||
|
emit_flag2reg(pfrom^.location.resflags,hregister);
|
||||||
|
end;
|
||||||
LOC_REGISTER,LOC_CREGISTER :
|
LOC_REGISTER,LOC_CREGISTER :
|
||||||
begin
|
begin
|
||||||
hregister:=pfrom^.location.register;
|
hregister:=pfrom^.location.register;
|
||||||
@ -1277,7 +1282,6 @@ implementation
|
|||||||
end;
|
end;
|
||||||
exprasmlist^.concat(new(pai386,op_reg_reg(A_OR,S_L,hregister,hregister)));
|
exprasmlist^.concat(new(pai386,op_reg_reg(A_OR,S_L,hregister,hregister)));
|
||||||
hregister:=reg32toreg8(hregister);
|
hregister:=reg32toreg8(hregister);
|
||||||
emit_flag2reg(pfrom^.location.resflags,hregister);
|
|
||||||
case pto^.resulttype^.size of
|
case pto^.resulttype^.size of
|
||||||
1 : pto^.location.register:=hregister;
|
1 : pto^.location.register:=hregister;
|
||||||
2 : begin
|
2 : begin
|
||||||
@ -1620,7 +1624,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.58 1999-02-25 21:02:23 peter
|
Revision 1.59 1999-03-01 15:46:18 peter
|
||||||
|
* ag386bin finally make cycles correct
|
||||||
|
* prefixes are now also normal opcodes
|
||||||
|
|
||||||
|
Revision 1.58 1999/02/25 21:02:23 peter
|
||||||
* ag386bin updates
|
* ag386bin updates
|
||||||
+ coff writer
|
+ coff writer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user