That sounds plausible. In general, when you write to a register in x86, you
may be doing a partial write where the old data in the register needs to be
preserved. For instance, if %rax has 0x0123456789abcdef in it, and you want
to write 0x1 to %al, then you need both the old value and the value
Hello mohit,
But my problem is we shouldn't modify the program binary, instead when the
simulator process the binary, when it triggers fopen syscall, it should
should open a different file instead of already specified one. Here, as
this is in the hardware level, I guess we can't see the filename
Hi gogineni,
You will have to modify the hello world program to take in a command line
argument and use that instead of hard coded file name. Something like this
fp = fopen( argv[1] , "w" );
In gem5, if your se.py equivalent system is using the default set of command
line parameters defined
Hi Ayaz,
Thanks for your reply. You are right that they do get renamed and are assigned
a different destination physical register for each instruction. But, as you see
below, IMPLICIT(0) and IMPLICIT(1) are both source and destination for IMUL_R_R
instruction. So each instruction is still
Hello,
I have a C code, which creates a file *file.txt* and prints the hello world
content in the file.
#include
int main () {
FILE *fp;
char str[] = "Hello world";
fp = fopen( "file.txt" , "w" );
fwrite(str , 1 , sizeof(str) , fp );
fclose(fp);
On Wed, Jul 21, 2021, 11:48 AM gogineni kailashnath <
gkailashnath1...@gmail.com> wrote:
> Hello,
>
> I have a C code, which creates a file *file.txt* and prints the hello
> world content in the file.
>
> #include
>
> int main () {
>FILE *fp;
>char str[] = "Hello world";
>
>