diff --git a/BCB/Cheang et al/Figure 3b/Figure_3b.cod b/BCB/Cheang et al/Figure 3b/Figure_3b.cod deleted file mode 100644 index 18d541f68a40b5b6eab2c3a63ca9d7fb96332d4d..0000000000000000000000000000000000000000 --- a/BCB/Cheang et al/Figure 3b/Figure_3b.cod +++ /dev/null @@ -1,61 +0,0 @@ -; Listing generated by Microsoft (R) Optimizing Compiler Version 19.32.31332.0 - -include listing.inc - -INCLUDELIB MSVCRT -INCLUDELIB OLDNAMES - -PUBLIC foo -EXTRN array1:BYTE -EXTRN array2:BYTE -EXTRN N:BYTE -EXTRN S:BYTE -EXTRN __ImageBase:BYTE -; Function compile flags: /Ogtpy -; File C:\Users\piano\Documents\PhD\hyperproperties\IsabelleScripts\Relative_Security_Spectre\Kevin Cheang\3b\Figure_3b.c -; COMDAT foo -_TEXT SEGMENT -i$ = 8 -foo PROC ; COMDAT - -; 5 : if (i < N) { - - 00000 0f b6 05 00 00 - 00 00 movzx eax, BYTE PTR N - 00007 3b c8 cmp ecx, eax - 00009 73 2a jae SHORT $LN2@foo - -; 6 : _mm_lfence(); - - 0000b 0f ae e8 lfence - 0000e 0f ae e8 lfence - -; 7 : return array2[array1[i]*S]; - - 00011 8b c1 mov eax, ecx - 00013 48 8d 15 00 00 - 00 00 lea rdx, OFFSET FLAT:__ImageBase - 0001a 0f b6 8c 10 00 - 00 00 00 movzx ecx, BYTE PTR array1[rax+rdx] - 00022 0f b6 05 00 00 - 00 00 movzx eax, BYTE PTR S - 00029 0f af c8 imul ecx, eax - 0002c 0f b6 84 11 00 - 00 00 00 movzx eax, BYTE PTR array2[rcx+rdx] - -; 10 : } - - 00034 c3 ret 0 -$LN2@foo: - -; 8 : } -; 9 : return 0; - - 00035 32 c0 xor al, al - -; 10 : } - - 00037 c3 ret 0 -foo ENDP -_TEXT ENDS -END diff --git a/BCB/Cheang et al/Figure 3b/Figure_3b.bir b/BCB/Cheang et al/Figure_3b/Figure_3b.bir similarity index 100% rename from BCB/Cheang et al/Figure 3b/Figure_3b.bir rename to BCB/Cheang et al/Figure_3b/Figure_3b.bir diff --git a/BCB/Cheang et al/Figure 3b/Figure_3b.c b/BCB/Cheang et al/Figure_3b/Figure_3b.c similarity index 100% rename from BCB/Cheang et al/Figure 3b/Figure_3b.c rename to BCB/Cheang et al/Figure_3b/Figure_3b.c diff --git a/BCB/Cheang et al/Figure 3b/Figure_3b.dll b/BCB/Cheang et al/Figure_3b/Figure_3b.dll similarity index 100% rename from BCB/Cheang et al/Figure 3b/Figure_3b.dll rename to BCB/Cheang et al/Figure_3b/Figure_3b.dll diff --git a/BCB/Cheang et al/Figure_3c/Figure_3c.c b/BCB/Cheang et al/Figure_3c/Figure_3c.c new file mode 100644 index 0000000000000000000000000000000000000000..5b57ab35b2b4e843529260a2f7ef0c672747c81f --- /dev/null +++ b/BCB/Cheang et al/Figure_3c/Figure_3c.c @@ -0,0 +1,10 @@ +#include "../ex_main.h" + +__declspec(dllexport) +uint8_t foo(unsigned i) { + if (i < N) { + uint8_t v = array1[0]; + return array2[v*S]+i; + } + return 0; +} \ No newline at end of file diff --git a/BCB/Cheang et al/Figure_3c/Figure_3c.dll b/BCB/Cheang et al/Figure_3c/Figure_3c.dll new file mode 100644 index 0000000000000000000000000000000000000000..d4af6ad8148a3842eaed45f0ba2e5896be1289db Binary files /dev/null and b/BCB/Cheang et al/Figure_3c/Figure_3c.dll differ diff --git a/BCB/Cheang et al/Figure 3d/Figure_3d.bir b/BCB/Cheang et al/Figure_3d/Figure_3d.bir similarity index 100% rename from BCB/Cheang et al/Figure 3d/Figure_3d.bir rename to BCB/Cheang et al/Figure_3d/Figure_3d.bir diff --git a/BCB/Cheang et al/Figure_3d/Figure_3d.c b/BCB/Cheang et al/Figure_3d/Figure_3d.c new file mode 100644 index 0000000000000000000000000000000000000000..dea41df01e2b261bb209fee86314929969e34d64 --- /dev/null +++ b/BCB/Cheang et al/Figure_3d/Figure_3d.c @@ -0,0 +1,11 @@ +#include "../ex_main.h" + +__declspec(dllexport) +uint8_t foo(unsigned i) { + if (i < N) { + uint8_t v = array1[i]; + _mm_lfence(); + return array2[v*S]; + } + return 0; +} \ No newline at end of file diff --git a/BCB/Cheang et al/Figure 3d/Figure_3d.dll b/BCB/Cheang et al/Figure_3d/Figure_3d.dll similarity index 100% rename from BCB/Cheang et al/Figure 3d/Figure_3d.dll rename to BCB/Cheang et al/Figure_3d/Figure_3d.dll