From aceeecb1925afff455d9355d3379d393993192ab Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Nov 2014 01:00:53 -0800 Subject: [PATCH] x86: Fix setting segment bases in real mode. The data size used for actually writing the base value for the segment was the default size, but really it should set the entire value without any possible truncation. --- .../x86/isa/insts/general_purpose/control_transfer/jump.py | 4 ++-- src/arch/x86/isa/insts/general_purpose/data_transfer/move.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py b/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py index 6999b913d..3bb2d3e87 100644 --- a/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py +++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py @@ -145,7 +145,7 @@ def macroop JMP_FAR_REAL_M zexti t3, t1, 15, dataSize=8 slli t3, t3, 4, dataSize=8 wrsel cs, t1, dataSize=2 - wrbase cs, t3 + wrbase cs, t3, dataSize=8 wrip t0, t2, dataSize=asz }; @@ -168,7 +168,7 @@ def macroop JMP_FAR_REAL_I mov t2, t0, t2 slli t3, t1, 4, dataSize=8 wrsel cs, t1, dataSize=2 - wrbase cs, t3 + wrbase cs, t3, dataSize=8 wrip t0, t2, dataSize=asz }; ''' diff --git a/src/arch/x86/isa/insts/general_purpose/data_transfer/move.py b/src/arch/x86/isa/insts/general_purpose/data_transfer/move.py index 3f5c2d303..75a20ffbd 100644 --- a/src/arch/x86/isa/insts/general_purpose/data_transfer/move.py +++ b/src/arch/x86/isa/insts/general_purpose/data_transfer/move.py @@ -215,7 +215,7 @@ def macroop MOV_REAL_S_R { zexti t2, regm, 15, dataSize=8 slli t3, t2, 4, dataSize=8 wrsel reg, regm - wrbase reg, t3 + wrbase reg, t3, dataSize=8 }; def macroop MOV_REAL_S_M { @@ -223,7 +223,7 @@ def macroop MOV_REAL_S_M { zexti t2, t1, 15, dataSize=8 slli t3, t2, 4, dataSize=8 wrsel reg, t1 - wrbase reg, t3 + wrbase reg, t3, dataSize=8 }; def macroop MOV_REAL_S_P {