forked from OSchip/llvm-project
Process: fix FXSAVE on x86
The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit) instead of the correct width (16-bit) as per the x87 Programmer's Manual. Adjust this to ensure that we print out the complete value for the register. llvm-svn: 311579
This commit is contained in:
parent
fe3a5bfb25
commit
bf2a8a2878
|
@ -256,7 +256,7 @@ class RegisterCommandsTestCase(TestBase):
|
|||
self.expect(
|
||||
"register read ftag", substrs=[
|
||||
'ftag' + ' = ', str(
|
||||
"0x%0.2x" %
|
||||
"0x%0.4x" %
|
||||
(reg_value_ftag_initial | (
|
||||
1 << fstat_top_pointer_initial)))])
|
||||
reg_value_ftag_initial = reg_value_ftag_initial | (
|
||||
|
|
|
@ -36,8 +36,7 @@ struct GPR {
|
|||
struct FPR_i386 {
|
||||
uint16_t fctrl; // FPU Control Word (fcw)
|
||||
uint16_t fstat; // FPU Status Word (fsw)
|
||||
uint8_t ftag; // FPU Tag Word (ftw)
|
||||
uint8_t reserved_1; // Reserved
|
||||
uint16_t ftag; // FPU Tag Word (ftw)
|
||||
uint16_t fop; // Last Instruction Opcode (fop)
|
||||
union {
|
||||
struct {
|
||||
|
|
|
@ -257,8 +257,7 @@ struct XMMReg {
|
|||
struct FXSAVE {
|
||||
uint16_t fctrl; // FPU Control Word (fcw)
|
||||
uint16_t fstat; // FPU Status Word (fsw)
|
||||
uint8_t ftag; // FPU Tag Word (ftw)
|
||||
uint8_t reserved_1; // Reserved
|
||||
uint16_t ftag; // FPU Tag Word (ftw)
|
||||
uint16_t fop; // Last Instruction Opcode (fop)
|
||||
union {
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue