Ignore:
Timestamp:
Apr 12, 2019, 2:19:02 PM (6 years ago)
Author:
chronos
Message:
  • Added: Use more opcodes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/virtualcpu4/UInstructionWriter.pas

    r177 r178  
    4545    procedure JumpRelNotZero(Addr: QWord);
    4646    procedure JumpRelZero(Addr: QWord);
     47    procedure Push(Reg: TRegIndex);
     48    procedure Pop(Reg: TRegIndex);
    4749    procedure DataPrefix8;
    4850    procedure DataPrefix16;
     
    187189end;
    188190
     191procedure TInstructionWriter.Push(Reg: TRegIndex);
     192begin
     193  PrefixBegin;
     194  Write8(Byte(opPush));
     195  Write8(Reg);
     196  PrefixEnd;
     197end;
     198
     199procedure TInstructionWriter.Pop(Reg: TRegIndex);
     200begin
     201  PrefixBegin;
     202  Write8(Byte(opPop));
     203  Write8(Reg);
     204  PrefixEnd;
     205end;
     206
    189207procedure TInstructionWriter.DataPrefix8;
    190208begin
Note: See TracChangeset for help on using the changeset viewer.