mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-22 04:05:39 +00:00
GP-4055: Corrected AVR 8 Hflag usage in DES instruction
This commit is contained in:
parent
041be82286
commit
79d775e6a5
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user