-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2365/
-----------------------------------------------------------

Review request for Default.


Repository: gem5


Description
-------

This patch corrects the FXSAVE and FXRSTOR Macroops.
The actual code used for saving/restore the FP registers is in the file but it 
was not used.


Diffs
-----

  
src/arch/x86/isa/insts/simd128/integer/save_and_restore_state/save_and_restore_state.py
 79fde1c67ed8 

Diff: http://reviews.gem5.org/r/2365/diff/


Testing
-------

The FXSAVE and FXRSTOR instructions are used in the kernel for saving and 
loading
the state of the mmx,xmm and fpu registers.

This operation is triggered in FS by issuing a Device Not Available Fault.
The cr0 register has a TS flag that is set upon each context change. Every time 
a task
access any FP related register (SIMD as well) if the TS flag is set to one, the 
device not available fault is issued.
The kernel saves the current state of the registers, and restore the previous 
state of the currently running task.

Right now Gem5 lacks of this capability. the Device Not Available Fault is 
never issued, leading to several problems
when different threads share the same CPU and SMT is not used. The PARSEC 
Ferret benchmark is an example of this behavior.

In order to test this a hack in the atomic cpu code was done to detect if an 
static instruction has any FP operands and the cr0 reg TS bit is set.
However, this check should be done in the ISA dependent code.


Thanks,

Emilio Castillo

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to