GP-4055: Corrected AVR 8 Hflag usage in DES instruction

This commit is contained in:
ghidorahrex 2023-11-21 14:06:23 +00:00
parent 041be82286
commit 79d775e6a5
9 changed files with 18 additions and 13 deletions

View File

@ -739,11 +739,16 @@ define pcodeop decrypt;
:des op4to7 is phase=1 & ophi8=0x94 & oplow4=0xb & op4to7 {
val:1 = op4to7;
if (Hflg) goto <enc>;
R15R14R13R12R11R10R9R8 = decrypt(R7R6R5R4R3R2R1R0, val);
goto inst_next;
local key:8 = R15R14R13R12R11R10R9R8;
local result:16 = 0;
if (!Hflg) goto <enc>;
result = decrypt(R7R6R5R4R3R2R1R0, key, val);
goto <des_end>;
<enc>
R15R14R13R12R11R10R9R8 = encrypt(R7R6R5R4R3R2R1R0, val);
result = encrypt(R7R6R5R4R3R2R1R0, key, val);
<des_end>
R7R6R5R4R3R2R1R0 = result(0);
R15R14R13R12R11R10R9R8 = result(8);
}
@if HASEIND == "1"

View File

@ -44,7 +44,7 @@ public class AVR8_31_GCC_O0_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_31_GCC_O3_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_51_GCC_O0_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_51_GCC_O3_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_6_GCC_O0_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_6_GCC_O3_EmulatorTest extends ProcessorEmulatorTestAdapter {
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_xmega_GCC_O0_EmulatorTest extends ProcessorEmulatorTestAdapter
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override

View File

@ -44,7 +44,7 @@ public class AVR8_xmega_GCC_O3_EmulatorTest extends ProcessorEmulatorTestAdapter
testRunner.setRegister("SP", 0x0);
testRunner.setRegister("R1", 0x0);
testRunner.setRegister("Y", 0x0);
testRunner.setRegister("W", 0x0);
testRunner.setRegister("R25R24", 0x0);
}
@Override