I am new to gem5 simulations and I want to use a simple multiplication matrix matmul.c file to simulate with X86 or ALPHA ISAs. Can anyone help me with the steps on how to cross-compile the .c file??
For x86 simulation, you don't need to use cross-compilation. Compile your code using the default compiler founded in ubuntu, i.e., gcc compiler, and the extract the binary code.
$ gcc matmul.c -o binarymm
the binarymm file should be executed on both the host and the x86 simulation.
move the binarymm to your simulation and run it. You need to build the gem5. (opt, fast, debug) binary for x86 to be enable to run this code.