mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:49:27 +02:00
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
This commit is contained in:
parent
3cd628d2f2
commit
f58a4b485c
@ -663,17 +663,17 @@ ait_labeled_instruction : AsmWriteLn(#9#9+int_op2str[pai386_labeled(hp)^.opcode]
|
|||||||
if pai386(hp)^.op3t<>top_none then
|
if pai386(hp)^.op3t<>top_none then
|
||||||
begin
|
begin
|
||||||
if pai386(hp)^.op2t<>top_none then
|
if pai386(hp)^.op2t<>top_none then
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),0,
|
s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
||||||
s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),0,
|
s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,0,
|
s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
||||||
s:=getopstr(pai386(hp)^.op3t,pai386(hp)^.op3,0,
|
s:=getopstr(pai386(hp)^.op3t,pai386(hp)^.op3,0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if pai386(hp)^.op2t<>top_none then
|
if pai386(hp)^.op2t<>top_none then
|
||||||
@ -795,7 +795,11 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 1999-04-16 11:49:39 peter
|
Revision 1.33 1999-04-17 22:17:05 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.32 1999/04/16 11:49:39 peter
|
||||||
+ tempalloc
|
+ tempalloc
|
||||||
+ -at to show temp alloc info in .s file
|
+ -at to show temp alloc info in .s file
|
||||||
|
|
||||||
|
@ -621,17 +621,17 @@ ait_labeled_instruction :
|
|||||||
if pai386(hp)^.op3t<>top_none then
|
if pai386(hp)^.op3t<>top_none then
|
||||||
begin
|
begin
|
||||||
if pai386(hp)^.op2t<>top_none then
|
if pai386(hp)^.op2t<>top_none then
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),0,
|
s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
||||||
s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),0,
|
s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,0,
|
s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,true)+','+s;
|
||||||
s:=getopstr(pai386(hp)^.op3t,pai386(hp)^.op3,0,
|
s:=getopstr(pai386(hp)^.op3t,pai386(hp)^.op3,0,
|
||||||
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
pai386(hp)^.opsize,pai386(hp)^.opcode,false)+','+s;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if pai386(hp)^.op2t<>top_none then
|
if pai386(hp)^.op2t<>top_none then
|
||||||
@ -740,7 +740,11 @@ ait_stab_function_name : ;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.27 1999-04-16 11:49:40 peter
|
Revision 1.28 1999-04-17 22:17:06 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.27 1999/04/16 11:49:40 peter
|
||||||
+ tempalloc
|
+ tempalloc
|
||||||
+ -at to show temp alloc info in .s file
|
+ -at to show temp alloc info in .s file
|
||||||
|
|
||||||
|
@ -190,11 +190,11 @@ Type
|
|||||||
TLabelTable = Array[0..2500000] Of TLabelTableItem;
|
TLabelTable = Array[0..2500000] Of TLabelTableItem;
|
||||||
{$Endif tp}
|
{$Endif tp}
|
||||||
PLabelTable = ^TLabelTable;
|
PLabelTable = ^TLabelTable;
|
||||||
{$IfNDef USE_OP3}
|
{$IfDef NO_OP3}
|
||||||
TwoWords = Record
|
TwoWords = Record
|
||||||
Word1, Word2: Word;
|
Word1, Word2: Word;
|
||||||
End;
|
End;
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
|
|
||||||
{******************************* Variables *******************************}
|
{******************************* Variables *******************************}
|
||||||
|
|
||||||
@ -1114,23 +1114,23 @@ Begin
|
|||||||
If Not(TmpResult) Then
|
If Not(TmpResult) Then
|
||||||
Case Pai386(p1)^.op2t Of
|
Case Pai386(p1)^.op2t Of
|
||||||
Top_Reg:
|
Top_Reg:
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpResult := Reg = TRegister(Pai386(p1)^.op2);
|
TmpResult := Reg = TRegister(Pai386(p1)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
if Pai386(p1)^.op3t<>Top_reg
|
if Pai386(p1)^.op3t<>Top_reg
|
||||||
then TmpResult := Reg = TRegister(Pai386(p1)^.op2)
|
then TmpResult := Reg = TRegister(Pai386(p1)^.op2)
|
||||||
else TmpResult := longint(Reg) = twowords(Pai386(p1)^.op2).word1;
|
else TmpResult := longint(Reg) = twowords(Pai386(p1)^.op2).word1;
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
Top_Ref: TmpResult := RegInRef(Reg, TReference(Pai386(p1)^.op2^))
|
Top_Ref: TmpResult := RegInRef(Reg, TReference(Pai386(p1)^.op2^))
|
||||||
End;
|
End;
|
||||||
If Not(TmpResult) Then
|
If Not(TmpResult) Then
|
||||||
Case Pai386(p1)^.op3t Of
|
Case Pai386(p1)^.op3t Of
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
Top_Reg: TmpResult := Reg = TRegister(Pai386(p1)^.op3);
|
Top_Reg: TmpResult := Reg = TRegister(Pai386(p1)^.op3);
|
||||||
Top_Ref: TmpResult := RegInRef(Reg, TReference(Pai386(p1)^.op3^));
|
Top_Ref: TmpResult := RegInRef(Reg, TReference(Pai386(p1)^.op3^));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
Top_Reg: TmpResult := longint(Reg) = twowords(Pai386(p1)^.op2).word2;
|
Top_Reg: TmpResult := longint(Reg) = twowords(Pai386(p1)^.op2).word2;
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End
|
End
|
||||||
End;
|
End;
|
||||||
RegInInstruction := TmpResult
|
RegInInstruction := TmpResult
|
||||||
@ -1399,7 +1399,7 @@ Begin
|
|||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{Procedure AddRegsToSet(p: Pai; Var RegSet: TRegSet);
|
(*Procedure AddRegsToSet(p: Pai; Var RegSet: TRegSet);
|
||||||
Begin
|
Begin
|
||||||
If (p^.typ = ait_instruction) Then
|
If (p^.typ = ait_instruction) Then
|
||||||
Begin
|
Begin
|
||||||
@ -1419,11 +1419,11 @@ Begin
|
|||||||
Case Pai386(p)^.op2t Of
|
Case Pai386(p)^.op2t Of
|
||||||
top_reg:
|
top_reg:
|
||||||
If Not(TRegister(Pai386(p)^.op2) in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
|
If Not(TRegister(Pai386(p)^.op2) in [R_NO,R_ESP,ProcInfo.FramePointer]) Then
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
RegSet := RegSet + [TRegister(Pai386(p)^.op2)];
|
RegSet := RegSet + [TRegister(Pai386(p)^.op2)];
|
||||||
{$EndIf USE_OP3}
|
{$Else NO_OP3}
|
||||||
RegSet := RegSet + [TRegister(TwoWords(Pai386(p)^.op2).Word1];
|
RegSet := RegSet + [TRegister(TwoWords(Pai386(p)^.op2).Word1];
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
top_ref:
|
top_ref:
|
||||||
With TReference(Pai386(p)^.op2^) Do
|
With TReference(Pai386(p)^.op2^) Do
|
||||||
Begin
|
Begin
|
||||||
@ -1434,7 +1434,7 @@ Begin
|
|||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;}
|
End;*)
|
||||||
|
|
||||||
Function OpsEquivalent(typ: Longint; OldOp, NewOp: Pointer; Var RegInfo: TRegInfo; OpAct: TopAction): Boolean;
|
Function OpsEquivalent(typ: Longint; OldOp, NewOp: Pointer; Var RegInfo: TRegInfo; OpAct: TopAction): Boolean;
|
||||||
Begin {checks whether the two ops are equivalent}
|
Begin {checks whether the two ops are equivalent}
|
||||||
@ -1546,12 +1546,12 @@ Begin {checks whether two Pai386 instructions are equal}
|
|||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
{an instruction <> mov, movzx, movsx}
|
{an instruction <> mov, movzx, movsx}
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
InstructionsEquivalent :=
|
InstructionsEquivalent :=
|
||||||
OpsEquivalent(Pai386(p1)^.op1t, Pai386(p1)^.op1, Pai386(p2)^.op1, RegInfo, OpAct_Unknown) And
|
OpsEquivalent(Pai386(p1)^.op1t, Pai386(p1)^.op1, Pai386(p2)^.op1, RegInfo, OpAct_Unknown) And
|
||||||
OpsEquivalent(Pai386(p1)^.op2t, Pai386(p1)^.op2, Pai386(p2)^.op2, RegInfo, OpAct_Unknown) And
|
OpsEquivalent(Pai386(p1)^.op2t, Pai386(p1)^.op2, Pai386(p2)^.op2, RegInfo, OpAct_Unknown) And
|
||||||
OpsEquivalent(Pai386(p1)^.op3t, Pai386(p1)^.op3, Pai386(p2)^.op3, RegInfo, OpAct_Unknown)
|
OpsEquivalent(Pai386(p1)^.op3t, Pai386(p1)^.op3, Pai386(p2)^.op3, RegInfo, OpAct_Unknown)
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
If (Pai386(p1)^.op3t = top_none) Then
|
If (Pai386(p1)^.op3t = top_none) Then
|
||||||
InstructionsEquivalent :=
|
InstructionsEquivalent :=
|
||||||
OpsEquivalent(Pai386(p1)^.op1t, Pai386(p1)^.op1, Pai386(p2)^.op1, RegInfo, OpAct_Unknown) And
|
OpsEquivalent(Pai386(p1)^.op1t, Pai386(p1)^.op1, Pai386(p2)^.op1, RegInfo, OpAct_Unknown) And
|
||||||
@ -1563,7 +1563,7 @@ Begin {checks whether two Pai386 instructions are equal}
|
|||||||
Pointer(Longint(TwoWords(Pai386(p2)^.op2).Word1)), RegInfo, OpAct_Unknown) And
|
Pointer(Longint(TwoWords(Pai386(p2)^.op2).Word1)), RegInfo, OpAct_Unknown) And
|
||||||
OpsEquivalent(Pai386(p1)^.op3t, Pointer(Longint(TwoWords(Pai386(p1)^.op2).Word2)),
|
OpsEquivalent(Pai386(p1)^.op3t, Pointer(Longint(TwoWords(Pai386(p1)^.op2).Word2)),
|
||||||
Pointer(Longint(TwoWords(Pai386(p2)^.op2).Word2)), RegInfo, OpAct_Unknown)
|
Pointer(Longint(TwoWords(Pai386(p2)^.op2).Word2)), RegInfo, OpAct_Unknown)
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
{the instructions haven't even got the same structure, so they're certainly
|
{the instructions haven't even got the same structure, so they're certainly
|
||||||
not equivalent}
|
not equivalent}
|
||||||
Else InstructionsEquivalent := False;
|
Else InstructionsEquivalent := False;
|
||||||
@ -2068,13 +2068,13 @@ Begin
|
|||||||
A_IMUL:
|
A_IMUL:
|
||||||
Begin
|
Begin
|
||||||
ReadOp(CurProp, Pai386(p)^.Op1t, Pai386(p)^.Op1);
|
ReadOp(CurProp, Pai386(p)^.Op1t, Pai386(p)^.Op1);
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
ReadOp(CurProp, Pai386(p)^.Op2t, Pai386(p)^.Op2);
|
ReadOp(CurProp, Pai386(p)^.Op2t, Pai386(p)^.Op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
If (Pai386(p)^.Op2t = Top_Ref) Then
|
If (Pai386(p)^.Op2t = Top_Ref) Then
|
||||||
ReadOp(CurProp, Pai386(p)^.Op2t, Pai386(p)^.Op2)
|
ReadOp(CurProp, Pai386(p)^.Op2t, Pai386(p)^.Op2)
|
||||||
Else ReadOp(CurProp, Pai386(p)^.Op2t, Pointer(Longint(TwoWords(Pai386(p)^.Op2).Word1)));
|
Else ReadOp(CurProp, Pai386(p)^.Op2t, Pointer(Longint(TwoWords(Pai386(p)^.Op2).Word1)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
If (Pai386(p)^.Op3t = top_none)
|
If (Pai386(p)^.Op3t = top_none)
|
||||||
Then
|
Then
|
||||||
If (Pai386(p)^.Op2t = top_none)
|
If (Pai386(p)^.Op2t = top_none)
|
||||||
@ -2084,11 +2084,11 @@ Begin
|
|||||||
DestroyReg(CurProp, R_EDX)
|
DestroyReg(CurProp, R_EDX)
|
||||||
End
|
End
|
||||||
Else Destroy(p, Pai386(p)^.Op2t, Pai386(p)^.Op2)
|
Else Destroy(p, Pai386(p)^.Op2t, Pai386(p)^.Op2)
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
Else Destroy(p, Pai386(p)^.Op3t, Pai386(p)^.Op3);
|
Else Destroy(p, Pai386(p)^.Op3t, Pai386(p)^.Op3);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
Else DestroyReg(CurProp, TRegister(longint(twowords(Pai386(p)^.Op2).word2)));
|
Else DestroyReg(CurProp, TRegister(longint(twowords(Pai386(p)^.Op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End;
|
End;
|
||||||
A_XOR:
|
A_XOR:
|
||||||
Begin
|
Begin
|
||||||
@ -2122,22 +2122,22 @@ Begin
|
|||||||
C_CDirFlag: CurProp^.DirFlag := F_NotSet;
|
C_CDirFlag: CurProp^.DirFlag := F_NotSet;
|
||||||
C_SDirFlag: CurProp^.DirFlag := F_Set;
|
C_SDirFlag: CurProp^.DirFlag := F_Set;
|
||||||
C_ROp1: ReadOp(CurProp, Pai386(p)^.op1t, Pai386(p)^.op1);
|
C_ROp1: ReadOp(CurProp, Pai386(p)^.op1t, Pai386(p)^.op1);
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
C_ROp2: ReadOp(CurProp, Pai386(p)^.op2t, Pai386(p)^.op2);
|
C_ROp2: ReadOp(CurProp, Pai386(p)^.op2t, Pai386(p)^.op2);
|
||||||
C_ROp3: ReadOp(CurProp, Pai386(p)^.op3t, Pai386(p)^.op3);
|
C_ROp3: ReadOp(CurProp, Pai386(p)^.op3t, Pai386(p)^.op3);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
C_ROp2: If (Pai386(p)^.Op3t = top_none) Then
|
C_ROp2: If (Pai386(p)^.Op3t = top_none) Then
|
||||||
ReadOp(CurProp, Pai386(p)^.op2t, Pai386(p)^.op2)
|
ReadOp(CurProp, Pai386(p)^.op2t, Pai386(p)^.op2)
|
||||||
Else ReadOp(CurProp, Pai386(p)^.op2t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word1)));
|
Else ReadOp(CurProp, Pai386(p)^.op2t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word1)));
|
||||||
C_ROp3: ReadOp(CurProp, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
C_ROp3: ReadOp(CurProp, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
C_WOp1..C_RWOp1:
|
C_WOp1..C_RWOp1:
|
||||||
Begin
|
Begin
|
||||||
If (InstrProp.Ch[Cnt] = C_RWOp1) Then
|
If (InstrProp.Ch[Cnt] = C_RWOp1) Then
|
||||||
ReadOp(CurProp, Pai386(p)^.op1t, Pai386(p)^.op1);
|
ReadOp(CurProp, Pai386(p)^.op1t, Pai386(p)^.op1);
|
||||||
Destroy(p, Pai386(p)^.op1t, Pai386(p)^.op1);
|
Destroy(p, Pai386(p)^.op1t, Pai386(p)^.op1);
|
||||||
End;
|
End;
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
C_WOp2..C_RWOp2:
|
C_WOp2..C_RWOp2:
|
||||||
Begin
|
Begin
|
||||||
If (InstrProp.Ch[Cnt] = C_RWOp2) Then
|
If (InstrProp.Ch[Cnt] = C_RWOp2) Then
|
||||||
@ -2150,7 +2150,7 @@ Begin
|
|||||||
ReadOp(CurProp, Pai386(p)^.op3t, Pai386(p)^.op3);
|
ReadOp(CurProp, Pai386(p)^.op3t, Pai386(p)^.op3);
|
||||||
Destroy(p, Pai386(p)^.op3t, Pai386(p)^.op3);
|
Destroy(p, Pai386(p)^.op3t, Pai386(p)^.op3);
|
||||||
End;
|
End;
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
C_WOp2..C_RWOp2:
|
C_WOp2..C_RWOp2:
|
||||||
Begin
|
Begin
|
||||||
If (InstrProp.Ch[Cnt] = C_RWOp2) Then
|
If (InstrProp.Ch[Cnt] = C_RWOp2) Then
|
||||||
@ -2167,7 +2167,7 @@ Begin
|
|||||||
ReadOp(CurProp, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
ReadOp(CurProp, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
||||||
Destroy(p, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
Destroy(p, Pai386(p)^.op3t, Pointer(Longint(TwoWords(Pai386(p)^.op2).word2)));
|
||||||
End;
|
End;
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
C_WMemEDI:
|
C_WMemEDI:
|
||||||
Begin
|
Begin
|
||||||
ReadReg(CurProp, R_EDI);
|
ReadReg(CurProp, R_EDI);
|
||||||
@ -2286,7 +2286,11 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 1999-04-16 15:16:31 jonas
|
Revision 1.43 1999-04-17 22:16:59 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.42 1999/04/16 15:16:31 jonas
|
||||||
* changes to work with -dUSE_OP3
|
* changes to work with -dUSE_OP3
|
||||||
|
|
||||||
Revision 1.41 1999/04/16 13:42:33 jonas
|
Revision 1.41 1999/04/16 13:42:33 jonas
|
||||||
|
@ -404,9 +404,9 @@ unit i386;
|
|||||||
opxt:word;
|
opxt:word;
|
||||||
op1,op2 : pointer;
|
op1,op2 : pointer;
|
||||||
op1ofs : longint;
|
op1ofs : longint;
|
||||||
{$ifdef USE_OP3}
|
{$ifndef NO_OP3}
|
||||||
op3 : pointer;
|
op3 : pointer;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
constructor op_none(op : tasmop;_size : topsize);
|
constructor op_none(op : tasmop;_size : topsize);
|
||||||
|
|
||||||
constructor op_reg(op : tasmop;_size : topsize;_op1 : tregister);
|
constructor op_reg(op : tasmop;_size : topsize;_op1 : tregister);
|
||||||
@ -434,11 +434,11 @@ unit i386;
|
|||||||
|
|
||||||
constructor op_const_reg_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : tregister);
|
constructor op_const_reg_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : tregister);
|
||||||
|
|
||||||
{$ifdef USE_OP3}
|
{$ifndef NO_OP3}
|
||||||
constructor op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
|
constructor op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
|
||||||
constructor op_const_ref_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference;_op3 : tregister);
|
constructor op_const_ref_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : preference;_op3 : tregister);
|
||||||
constructor op_reg_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : tregister;_op3 : preference);
|
constructor op_reg_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : tregister;_op3 : preference);
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
|
|
||||||
{ this is for CALL etc. }
|
{ this is for CALL etc. }
|
||||||
{ symbol is replaced by the address of symbol }
|
{ symbol is replaced by the address of symbol }
|
||||||
@ -707,14 +707,14 @@ unit i386;
|
|||||||
(i : A_SHL;ops : 2;oc : $d2;eb : 4;m : af_w or Modrm;o1 : ao_shiftcount;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SHL;ops : 2;oc : $d2;eb : 4;m : af_w or Modrm;o1 : ao_shiftcount;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
(i : A_SHL;ops : 1;oc : $d0;eb : 4;m : af_w or Modrm;o1 : ao_reg or ao_mem;o2 : 0;o3 : 0),
|
(i : A_SHL;ops : 1;oc : $d0;eb : 4;m : af_w or Modrm;o1 : ao_reg or ao_mem;o2 : 0;o3 : 0),
|
||||||
(i : A_SHLD;ops : 3;oc : $0fa4;eb : ao_none;m : Modrm;o1 : ao_imm8;o2 : ao_wordreg;o3 : ao_wordreg or ao_mem),
|
(i : A_SHLD;ops : 3;oc : $0fa4;eb : ao_none;m : Modrm;o1 : ao_imm8;o2 : ao_wordreg;o3 : ao_wordreg or ao_mem),
|
||||||
(i : A_SHLD;ops : 3;oc : $0fa5;eb : ao_none;m : Modrm;o1 : ao_reg8 or ao_shiftcount;o2 : ao_wordreg;
|
(i : A_SHLD;ops : 3;oc : $0fa5;eb : ao_none;m : Modrm;o1 : {ao_reg8 or }ao_shiftcount;o2 : ao_wordreg;
|
||||||
o3 : ao_wordreg or ao_mem),
|
o3 : ao_wordreg or ao_mem),
|
||||||
(i : A_SHR;ops : 2;oc : $d0;eb : 5;m : af_w or Modrm;o1 : ao_imm1;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SHR;ops : 2;oc : $d0;eb : 5;m : af_w or Modrm;o1 : ao_imm1;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
(i : A_SHR;ops : 2;oc : $c0;eb : 5;m : af_w or Modrm;o1 : ao_imm8;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SHR;ops : 2;oc : $c0;eb : 5;m : af_w or Modrm;o1 : ao_imm8;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
(i : A_SHR;ops : 2;oc : $d2;eb : 5;m : af_w or Modrm;o1 : ao_shiftcount;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SHR;ops : 2;oc : $d2;eb : 5;m : af_w or Modrm;o1 : ao_shiftcount;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
(i : A_SHR;ops : 1;oc : $d0;eb : 5;m : af_w or Modrm;o1 : ao_reg or ao_mem;o2 : 0;o3 : 0),
|
(i : A_SHR;ops : 1;oc : $d0;eb : 5;m : af_w or Modrm;o1 : ao_reg or ao_mem;o2 : 0;o3 : 0),
|
||||||
(i : A_SHRD;ops : 3;oc : $0fac;eb : ao_none;m : Modrm;o1 : ao_imm8;o2 : ao_wordreg;o3 : ao_wordreg or ao_mem),
|
(i : A_SHRD;ops : 3;oc : $0fac;eb : ao_none;m : Modrm;o1 : ao_imm8;o2 : ao_wordreg;o3 : ao_wordreg or ao_mem),
|
||||||
(i : A_SHRD;ops : 3;oc : $0fad;eb : ao_none;m : Modrm;o1 : ao_reg8 or ao_shiftcount;o2 : ao_wordreg;
|
(i : A_SHRD;ops : 3;oc : $0fad;eb : ao_none;m : Modrm;o1 : {ao_reg8 or }ao_shiftcount;o2 : ao_wordreg;
|
||||||
o3 : ao_wordreg or ao_mem),
|
o3 : ao_wordreg or ao_mem),
|
||||||
(i : A_SAR;ops : 2;oc : $d0;eb : 7;m : af_w or Modrm;o1 : ao_imm1;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SAR;ops : 2;oc : $d0;eb : 7;m : af_w or Modrm;o1 : ao_imm1;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
(i : A_SAR;ops : 2;oc : $c0;eb : 7;m : af_w or Modrm;o1 : ao_imm8;o2 : ao_reg or ao_mem;o3 : 0),
|
(i : A_SAR;ops : 2;oc : $c0;eb : 7;m : af_w or Modrm;o1 : ao_imm8;o2 : ao_reg or ao_mem;o3 : 0),
|
||||||
@ -1546,12 +1546,12 @@ unit i386;
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
type
|
type
|
||||||
twowords=record
|
twowords=record
|
||||||
word1,word2:word;
|
word1,word2:word;
|
||||||
end;
|
end;
|
||||||
{$endif ndef USE_OP3}
|
{$endif NO_OP3}
|
||||||
|
|
||||||
constructor tai386.op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
|
constructor tai386.op_reg_reg_reg(op : tasmop;_size : topsize;_op1,_op2,_op3 : tregister);
|
||||||
|
|
||||||
@ -1562,13 +1562,13 @@ unit i386;
|
|||||||
opxt:=Top_reg shl 8+Top_reg shl 4+Top_reg;
|
opxt:=Top_reg shl 8+Top_reg shl 4+Top_reg;
|
||||||
opsize:=_size;
|
opsize:=_size;
|
||||||
op1:=pointer(_op1);
|
op1:=pointer(_op1);
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
twowords(op2).word1:=word(_op2);
|
twowords(op2).word1:=word(_op2);
|
||||||
twowords(op2).word2:=word(_op3);
|
twowords(op2).word2:=word(_op3);
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
op2:=pointer(_op2);
|
op2:=pointer(_op2);
|
||||||
op3:=pointer(_op3);
|
op3:=pointer(_op3);
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor tai386.op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : preference);
|
constructor tai386.op_reg_ref(op : tasmop;_size : topsize;_op1 : tregister;_op2 : preference);
|
||||||
@ -1662,16 +1662,16 @@ unit i386;
|
|||||||
opxt:=Top_const+Top_reg shl 4+Top_reg shl 8;
|
opxt:=Top_const+Top_reg shl 4+Top_reg shl 8;
|
||||||
opsize:=_size;
|
opsize:=_size;
|
||||||
op1:=pointer(_op1);
|
op1:=pointer(_op1);
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
twowords(op2).word1:=word(_op2);
|
twowords(op2).word1:=word(_op2);
|
||||||
twowords(op2).word2:=word(_op3);
|
twowords(op2).word2:=word(_op3);
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
op2:=pointer(_op2);
|
op2:=pointer(_op2);
|
||||||
op3:=pointer(_op3);
|
op3:=pointer(_op3);
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
constructor tai386.op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
|
constructor tai386.op_const_reg_ref(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister;_op3 : preference);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -1710,7 +1710,7 @@ unit i386;
|
|||||||
op2:=pointer(_op2);
|
op2:=pointer(_op2);
|
||||||
op3:=pointer(_op3);
|
op3:=pointer(_op3);
|
||||||
end;
|
end;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
|
|
||||||
|
|
||||||
constructor tai386.op_const_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister);
|
constructor tai386.op_const_reg(op : tasmop;_size : topsize;_op1 : longint;_op2 : tregister);
|
||||||
@ -2066,7 +2066,11 @@ Begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.41 1999-04-16 11:49:43 peter
|
Revision 1.42 1999-04-17 22:17:02 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.41 1999/04/16 11:49:43 peter
|
||||||
+ tempalloc
|
+ tempalloc
|
||||||
+ -at to show temp alloc info in .s file
|
+ -at to show temp alloc info in .s file
|
||||||
|
|
||||||
|
@ -373,13 +373,13 @@ Begin
|
|||||||
Else
|
Else
|
||||||
{change "imul $1, reg1, reg2" to "mov reg1, reg2"}
|
{change "imul $1, reg1, reg2" to "mov reg1, reg2"}
|
||||||
Begin
|
Begin
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
hp1 := New(Pai386, Op_Reg_Reg(A_MOV, S_L, TRegister(Pai386(p)^.op2),
|
hp1 := New(Pai386, Op_Reg_Reg(A_MOV, S_L, TRegister(Pai386(p)^.op2),
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
hp1 := New(Pai386, Op_Reg_Reg(A_MOV, S_L, TRegister(TwoWords(Pai386(p)^.op2).Word1),
|
hp1 := New(Pai386, Op_Reg_Reg(A_MOV, S_L, TRegister(TwoWords(Pai386(p)^.op2).Word1),
|
||||||
TRegister(TwoWords(Pai386(p)^.op2).Word2)));
|
TRegister(TwoWords(Pai386(p)^.op2).Word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
hp1^.fileinfo := p^.fileinfo;
|
hp1^.fileinfo := p^.fileinfo;
|
||||||
InsertLLItem(AsmL, p^.previous, p^.next, hp1);
|
InsertLLItem(AsmL, p^.previous, p^.next, hp1);
|
||||||
Dispose(p, Done);
|
Dispose(p, Done);
|
||||||
@ -406,22 +406,22 @@ Begin
|
|||||||
lea (reg1,reg1,2), reg2
|
lea (reg1,reg1,2), reg2
|
||||||
imul 3, reg1 to
|
imul 3, reg1 to
|
||||||
lea (reg1,reg1,2), reg1}
|
lea (reg1,reg1,2), reg1}
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 2;
|
TmpRef^.ScaleFactor := 2;
|
||||||
If (Pai386(p)^.op3t = Top_None)
|
If (Pai386(p)^.op3t = Top_None)
|
||||||
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
||||||
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
hp1^.fileinfo := p^.fileinfo;
|
hp1^.fileinfo := p^.fileinfo;
|
||||||
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
||||||
Dispose(p, Done);
|
Dispose(p, Done);
|
||||||
@ -432,22 +432,22 @@ Begin
|
|||||||
lea (reg1,reg1,4), reg2
|
lea (reg1,reg1,4), reg2
|
||||||
imul 5, reg1 to
|
imul 5, reg1 to
|
||||||
lea (reg1,reg1,4), reg1}
|
lea (reg1,reg1,4), reg1}
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 4;
|
TmpRef^.ScaleFactor := 4;
|
||||||
If (Pai386(p)^.op3t = Top_None)
|
If (Pai386(p)^.op3t = Top_None)
|
||||||
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
||||||
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
hp1^.fileinfo:= p^.fileinfo;
|
hp1^.fileinfo:= p^.fileinfo;
|
||||||
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
||||||
Dispose(p, Done);
|
Dispose(p, Done);
|
||||||
@ -463,26 +463,26 @@ Begin
|
|||||||
If (aktoptprocessor <= Class386)
|
If (aktoptprocessor <= Class386)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op3);
|
TmpRef^.base := TRegister(Pai386(p)^.op3);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).word2);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).word2);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 4;
|
TmpRef^.ScaleFactor := 4;
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
@ -494,22 +494,22 @@ Begin
|
|||||||
InsertLLItem(AsmL,p, p^.next, hp1);
|
InsertLLItem(AsmL,p, p^.next, hp1);
|
||||||
New(TmpRef);
|
New(TmpRef);
|
||||||
Reset_reference(TmpRef^);
|
Reset_reference(TmpRef^);
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 2;
|
TmpRef^.ScaleFactor := 2;
|
||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
TmpRef^.base := R_NO;
|
TmpRef^.base := R_NO;
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
@ -528,22 +528,22 @@ Begin
|
|||||||
lea (reg1,reg1,8), reg2
|
lea (reg1,reg1,8), reg2
|
||||||
imul 9, reg1 to
|
imul 9, reg1 to
|
||||||
lea (reg1,reg1,8), reg1}
|
lea (reg1,reg1,8), reg1}
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 8;
|
TmpRef^.ScaleFactor := 8;
|
||||||
If (Pai386(p)^.op3t = Top_None)
|
If (Pai386(p)^.op3t = Top_None)
|
||||||
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
Then hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef, TRegister(Pai386(p)^.op2)))
|
||||||
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
Else hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
hp1^.fileinfo := p^.fileinfo;
|
hp1^.fileinfo := p^.fileinfo;
|
||||||
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
InsertLLItem(AsmL,p^.previous, p^.next, hp1);
|
||||||
Dispose(p, Done);
|
Dispose(p, Done);
|
||||||
@ -561,33 +561,33 @@ Begin
|
|||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
hp1 := New(Pai386, op_reg_reg(A_ADD, S_L,
|
hp1 := New(Pai386, op_reg_reg(A_ADD, S_L,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
Tregister(Pai386(p)^.op3),
|
Tregister(Pai386(p)^.op3),
|
||||||
Tregister(Pai386(p)^.op3)))
|
Tregister(Pai386(p)^.op3)))
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
Tregister(twowords(Pai386(p)^.op2).word2),
|
Tregister(twowords(Pai386(p)^.op2).word2),
|
||||||
Tregister(twowords(Pai386(p)^.op2).word2)))
|
Tregister(twowords(Pai386(p)^.op2).word2)))
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
Else hp1 := New(Pai386, op_reg_reg(A_ADD, S_L,
|
Else hp1 := New(Pai386, op_reg_reg(A_ADD, S_L,
|
||||||
TRegister(Pai386(p)^.op2), TRegister(Pai386(p)^.op2)));
|
TRegister(Pai386(p)^.op2), TRegister(Pai386(p)^.op2)));
|
||||||
hp1^.fileinfo := p^.fileinfo;
|
hp1^.fileinfo := p^.fileinfo;
|
||||||
InsertLLItem(AsmL,p, p^.next, hp1);
|
InsertLLItem(AsmL,p, p^.next, hp1);
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
TmpRef^.base := TRegister(Pai386(p)^.op2);
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 4;
|
TmpRef^.ScaleFactor := 4;
|
||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)))
|
TRegister(Pai386(p)^.op3)))
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)))
|
TRegister(twowords(Pai386(p)^.op2).word2)))
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
Else
|
Else
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
TRegister(Pai386(p)^.op2)));
|
TRegister(Pai386(p)^.op2)));
|
||||||
@ -608,26 +608,26 @@ Begin
|
|||||||
If (aktoptprocessor <= Class386)
|
If (aktoptprocessor <= Class386)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.base := TRegister(Pai386(p)^.op3);
|
TmpRef^.base := TRegister(Pai386(p)^.op3);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).word2);
|
TmpRef^.base := TRegister(twowords(Pai386(p)^.op2).word2);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
TmpRef^.ScaleFactor := 8;
|
TmpRef^.ScaleFactor := 8;
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
@ -640,22 +640,22 @@ Begin
|
|||||||
InsertLLItem(AsmL,p, p^.next, hp1);
|
InsertLLItem(AsmL,p, p^.next, hp1);
|
||||||
New(TmpRef);
|
New(TmpRef);
|
||||||
Reset_reference(TmpRef^);
|
Reset_reference(TmpRef^);
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
TmpRef^.Index := TRegister(Pai386(p)^.op2);
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
TmpRef^.Index := TRegister(twowords(Pai386(p)^.op2).Word1);
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
If (Pai386(p)^.op3t = Top_Reg)
|
If (Pai386(p)^.op3t = Top_Reg)
|
||||||
Then
|
Then
|
||||||
Begin
|
Begin
|
||||||
TmpRef^.base := R_NO;
|
TmpRef^.base := R_NO;
|
||||||
TmpRef^.ScaleFactor := 4;
|
TmpRef^.ScaleFactor := 4;
|
||||||
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
hp1 := New(Pai386, op_ref_reg(A_LEA, S_L, TmpRef,
|
||||||
{$IfDef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
TRegister(Pai386(p)^.op3)));
|
TRegister(Pai386(p)^.op3)));
|
||||||
{$Else USE_OP3}
|
{$Else NO_OP3}
|
||||||
TRegister(twowords(Pai386(p)^.op2).word2)));
|
TRegister(twowords(Pai386(p)^.op2).word2)));
|
||||||
{$EndIf USE_OP3}
|
{$EndIf NO_OP3}
|
||||||
End
|
End
|
||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
@ -1677,7 +1677,11 @@ End.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.43 1999-04-16 15:16:29 jonas
|
Revision 1.44 1999-04-17 22:17:01 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.43 1999/04/16 15:16:29 jonas
|
||||||
* changes to work with -dUSE_OP3
|
* changes to work with -dUSE_OP3
|
||||||
|
|
||||||
Revision 1.42 1999/04/10 16:15:04 peter
|
Revision 1.42 1999/04/10 16:15:04 peter
|
||||||
|
@ -1448,6 +1448,12 @@ var
|
|||||||
Begin
|
Begin
|
||||||
operands[1].opinfo := ao_imm8;
|
operands[1].opinfo := ao_imm8;
|
||||||
operands[1].size := S_B;
|
operands[1].size := S_B;
|
||||||
|
end
|
||||||
|
else if (operands[1].operandtype = OPR_REGISTER) and
|
||||||
|
(operands[1].reg = R_CL) then
|
||||||
|
Begin
|
||||||
|
operands[1].opinfo := ao_shiftcount;
|
||||||
|
operands[1].size := S_B;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2074,15 +2080,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_ref(instruc, S_W,
|
op_const_reg_ref(instruc, S_W,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
newreference(instr.operands[3].ref))));
|
newreference(instr.operands[3].ref))));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER:
|
OPR_REGISTER:
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_W,
|
op_const_reg_reg(instruc, S_W,
|
||||||
@ -2097,9 +2103,9 @@ var
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if instr.operands[1].operandtype = OPR_REGISTER then
|
else if instr.operands[1].operandtype = OPR_REGISTER then
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
begin
|
begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
@ -2116,7 +2122,7 @@ var
|
|||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
else
|
else
|
||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
S_L:
|
S_L:
|
||||||
@ -2128,15 +2134,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_ref(instruc, S_L,
|
op_const_reg_ref(instruc, S_L,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
newreference(instr.operands[3].ref))));
|
newreference(instr.operands[3].ref))));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER:
|
OPR_REGISTER:
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_L,
|
op_const_reg_reg(instruc, S_L,
|
||||||
@ -2151,9 +2157,9 @@ var
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if instr.operands[1].operandtype = OPR_REGISTER then
|
else if instr.operands[1].operandtype = OPR_REGISTER then
|
||||||
{$ifndef USE_OP3}
|
{$ifdef NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
begin
|
begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
@ -2170,7 +2176,7 @@ var
|
|||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
else
|
else
|
||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
{ else of case instr.operands[2].size of }
|
{ else of case instr.operands[2].size of }
|
||||||
@ -2191,15 +2197,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[2].operandtype of
|
case instr.operands[2].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_ref_reg(instruc, S_W,
|
op_const_ref_reg(instruc, S_W,
|
||||||
instr.operands[1].val, newreference(instr.operands[2].ref),
|
instr.operands[1].val, newreference(instr.operands[2].ref),
|
||||||
instr.operands[3].reg)));
|
instr.operands[3].reg)));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER: p^.concat(new(pai386,
|
OPR_REGISTER: p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_W,
|
op_const_reg_reg(instruc, S_W,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
@ -2222,15 +2228,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[2].operandtype of
|
case instr.operands[2].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_ref_reg(instruc, S_L,
|
op_const_ref_reg(instruc, S_L,
|
||||||
instr.operands[1].val, newreference(instr.operands[2].ref),
|
instr.operands[1].val, newreference(instr.operands[2].ref),
|
||||||
instr.operands[3].reg)));
|
instr.operands[3].reg)));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER: p^.concat(new(pai386,
|
OPR_REGISTER: p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_L,
|
op_const_reg_reg(instruc, S_L,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
@ -3917,7 +3923,11 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.34 1999-04-16 10:00:58 pierre
|
Revision 1.35 1999-04-17 22:16:55 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.34 1999/04/16 10:00:58 pierre
|
||||||
+ ifdef USE_OP3 code :
|
+ ifdef USE_OP3 code :
|
||||||
added all missing op_... constructors for tai386 needed
|
added all missing op_... constructors for tai386 needed
|
||||||
for SHRD,SHLD and IMUL code in assembler readers
|
for SHRD,SHLD and IMUL code in assembler readers
|
||||||
|
@ -1195,6 +1195,12 @@ var
|
|||||||
Begin
|
Begin
|
||||||
operands[3].opinfo := ao_imm8;
|
operands[3].opinfo := ao_imm8;
|
||||||
operands[3].size := S_B;
|
operands[3].size := S_B;
|
||||||
|
end
|
||||||
|
else if (operands[3].operandtype = OPR_REGISTER) and
|
||||||
|
(operands[3].reg = R_CL) then
|
||||||
|
Begin
|
||||||
|
operands[3].opinfo := ao_shiftcount;
|
||||||
|
operands[3].size := S_B;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1688,15 +1694,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_ref(instruc, S_W,
|
op_const_reg_ref(instruc, S_W,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
newreference(instr.operands[3].ref))));
|
newreference(instr.operands[3].ref))));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER:
|
OPR_REGISTER:
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_W,
|
op_const_reg_reg(instruc, S_W,
|
||||||
@ -1711,9 +1717,9 @@ var
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if instr.operands[1].operandtype = OPR_REGISTER then
|
else if instr.operands[1].operandtype = OPR_REGISTER then
|
||||||
{$ifndef USE_OP3}
|
{$IfDef NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
begin
|
begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
@ -1730,7 +1736,7 @@ var
|
|||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
else
|
else
|
||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
S_L:
|
S_L:
|
||||||
@ -1742,15 +1748,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_ref(instruc, S_L,
|
op_const_reg_ref(instruc, S_L,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
newreference(instr.operands[3].ref))));
|
newreference(instr.operands[3].ref))));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER:
|
OPR_REGISTER:
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_L,
|
op_const_reg_reg(instruc, S_L,
|
||||||
@ -1765,9 +1771,9 @@ var
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else if instr.operands[1].operandtype = OPR_REGISTER then
|
else if instr.operands[1].operandtype = OPR_REGISTER then
|
||||||
{$ifndef USE_OP3}
|
{$IfDef NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
begin
|
begin
|
||||||
case instr.operands[3].operandtype of
|
case instr.operands[3].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
@ -1784,7 +1790,7 @@ var
|
|||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
else
|
else
|
||||||
Message(assem_e_invalid_opcode_and_operand);
|
Message(assem_e_invalid_opcode_and_operand);
|
||||||
{ else of case instr.operands[2].size of }
|
{ else of case instr.operands[2].size of }
|
||||||
@ -1805,15 +1811,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[2].operandtype of
|
case instr.operands[2].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_ref_reg(instruc, S_W,
|
op_const_ref_reg(instruc, S_W,
|
||||||
instr.operands[1].val, newreference(instr.operands[2].ref),
|
instr.operands[1].val, newreference(instr.operands[2].ref),
|
||||||
instr.operands[3].reg)));
|
instr.operands[3].reg)));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER: p^.concat(new(pai386,
|
OPR_REGISTER: p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_W,
|
op_const_reg_reg(instruc, S_W,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
@ -1836,15 +1842,15 @@ var
|
|||||||
Begin
|
Begin
|
||||||
case instr.operands[2].operandtype of
|
case instr.operands[2].operandtype of
|
||||||
OPR_REFERENCE:
|
OPR_REFERENCE:
|
||||||
{$ifdef USE_OP3}
|
{$IfNDef NO_OP3}
|
||||||
p^.concat(new(pai386,
|
p^.concat(new(pai386,
|
||||||
op_const_ref_reg(instruc, S_L,
|
op_const_ref_reg(instruc, S_L,
|
||||||
instr.operands[1].val, newreference(instr.operands[2].ref),
|
instr.operands[1].val, newreference(instr.operands[2].ref),
|
||||||
instr.operands[3].reg)));
|
instr.operands[3].reg)));
|
||||||
{$else USE_OP3}
|
{$else NO_OP3}
|
||||||
Message(assem_e_unsupported_opcode_and_operand)
|
Message(assem_e_unsupported_opcode_and_operand)
|
||||||
{ MISSING !!!! } ;
|
{ MISSING !!!! } ;
|
||||||
{$endif USE_OP3}
|
{$endif NO_OP3}
|
||||||
OPR_REGISTER: p^.concat(new(pai386,
|
OPR_REGISTER: p^.concat(new(pai386,
|
||||||
op_const_reg_reg(instruc, S_L,
|
op_const_reg_reg(instruc, S_L,
|
||||||
instr.operands[1].val, instr.operands[2].reg,
|
instr.operands[1].val, instr.operands[2].reg,
|
||||||
@ -3584,7 +3590,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.26 1999-04-16 10:01:00 pierre
|
Revision 1.27 1999-04-17 22:16:58 pierre
|
||||||
|
* ifdef USE_OP3 released (changed into ifndef NO_OP3)
|
||||||
|
* SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
|
||||||
|
|
||||||
|
Revision 1.26 1999/04/16 10:01:00 pierre
|
||||||
+ ifdef USE_OP3 code :
|
+ ifdef USE_OP3 code :
|
||||||
added all missing op_... constructors for tai386 needed
|
added all missing op_... constructors for tai386 needed
|
||||||
for SHRD,SHLD and IMUL code in assembler readers
|
for SHRD,SHLD and IMUL code in assembler readers
|
||||||
|
Loading…
Reference in New Issue
Block a user