mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:05:48 +00:00
[FAST486]
Create a macro SWAP (swaps two variables) to shorten the code. Implement the BSWAP instruction. svn path=/branches/ntvdm/; revision=60717
This commit is contained in:
parent
a93095e678
commit
67b093f38c
4 changed files with 33 additions and 26 deletions
|
@ -2743,9 +2743,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSbbByteModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
@ -2806,9 +2804,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSbbModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
@ -2846,9 +2842,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSbbModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
@ -3067,9 +3061,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubByteModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
@ -3138,9 +3130,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
@ -3187,9 +3177,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeCmpSubModrm)
|
|||
if (!(Opcode & FAST486_OPCODE_WRITE_REG))
|
||||
{
|
||||
/* Swap the order */
|
||||
FirstValue ^= SecondValue;
|
||||
SecondValue ^= FirstValue;
|
||||
FirstValue ^= SecondValue;
|
||||
SWAP(FirstValue, SecondValue);
|
||||
}
|
||||
|
||||
/* Calculate the result */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue