[gem5-users] Re: Implicit Register Dependencies in x86

2021-07-21 Thread Gabe Black via gem5-users
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

[gem5-users] Re: How to redirect the fopen to open a different file instead of specifed filename in the program binary given as input to gem5 simulator in SE mode

2021-07-21 Thread gogineni kailashnath via gem5-users
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

[gem5-users] Re: How to redirect the fopen to open a different file instead of specifed filename in the program binary given as input to gem5 simulator in SE mode

2021-07-21 Thread mohit.gambhir84--- via gem5-users
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

[gem5-users] Re: Implicit Register Dependencies in x86

2021-07-21 Thread mohit.gambhir84--- via gem5-users
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

[gem5-users] How to redirect the fopen to open a different file instead of specifed filename in the program binary given as input to gem5 simulator in SE mode

2021-07-21 Thread gogineni kailashnath via gem5-users
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);

[gem5-users] Re: How to redirect the fopen to open a different file instead of specifed filename in the program binary given as input to gem5 simulator in SE mode

2021-07-21 Thread gogineni kailashnath via gem5-users
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"; > >