-
Notifications
You must be signed in to change notification settings - Fork 0
SIMD
- Deactivate any optimisation flag, such as
-O3
,-O2
and so on. - Check the OS architecture. Are you both working on 64 or 32 bits?
- Protect your asm code with
volatile
like this:
__asm__ __volatile__(
/* Your code here */
);
- Make sure the path is correct, it should point to
gdb.exe
or a similar file. This setting is located inSettings > Debugger... > Default > Executable path
- Make sure you don't have accented characters in you project path, such as
éèêçàâ
, etc. - To have more info on why the debugging does not work, enable full logs in
Settings > > Debugger... > Common > Full (Debug) log
- Make sure you're compiling with the
-g
flag. - If you have multiple installations of MinGW, uninstall all those not necessary.
Check that you read/write in binary by specifying rb
and wb
in fread
and fwrite
.
On Windows, "Exception code c0000005
is the code for an access violation".
Most probable reasons:
-
You are using an instruction that reads 128 bits of aligned memory, but the operand you provide is unaligned. Use a memory operand that is aligned or use an instruction that do not require aligned memory
-
You are reading/writing outside of allocated memory (eg. you have an array of 3 elements, and you read/write to array[3])
Check that the compilation flags are not the culprits here. Disable them all and check their influence one by one. Don't forget to clean your build between each compilation.
Also, in CodeBlocks, "Optimize even more (for speed) [-O2]" and "-O2" are not exactly the same. The first one applies the flag at an earlier stage than the second, sometimes leading to malfunctions in the compiled executable.
The list of available instructions and their description can be found at: https://www.felixcloutier.com/x86/
Two different types of registers should be used in this lab:
They must be used in the case of SIMD instructions.
- Register names should be preceded by %%
- Immediates should be preceded by $