From 7f163ca6d997fd7b8b51f640d450589dff0de78f Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 5 Dec 2017 17:49:51 -0800 Subject: x86: Split apart x87's FSW and TOP, and add a missing break. The FSW and TOP values are technically part of the same register, but they have very different behaviors. One of them can be renamed and float along without affecting global state, while the other requires serialization. They just need to *look* like the same register when read by the user. Also, there was a missing break in setMiscRegNoEffect. Change-Id: If58de0f566f65068208240f4001209fb9e1826d6 Reviewed-on: https://gem5-review.googlesource.com/6441 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/arch/x86/isa/insts') diff --git a/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py b/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py index 20ecff43a..ffc490715 100644 --- a/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py +++ b/src/arch/x86/isa/insts/x87/control/save_and_restore_x87_environment.py @@ -63,6 +63,9 @@ fnstenvTemplate = """ # FSW includes TOP when read rdval t1, fsw st t1, seg, %(mode)s, "DISPLACEMENT + 4", dataSize=2 + srli t1, t1, 11, dataSize=2 + andi t1, t1, 0x7, dataSize=2 + wrval "InstRegIndex(MISCREG_X87_TOP)", t1 rdval t1, ftw st t1, seg, %(mode)s, "DISPLACEMENT + 8", dataSize=2 -- cgit v1.2.3