diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-11-13 01:42:19 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-11-13 01:42:19 +0000 |
commit | 3ab493de4c524926bb75b04765b644f9189ccf01 (patch) | |
tree | 24764a89faa67761bde836517a5cc7e634774194 /target-i386/op.c | |
parent | 3e25f9515a07d47da843d9b3835e25def785dcee (diff) |
added verr, verw, arpl - more precise segment rights checks
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@453 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/op.c')
-rw-r--r-- | target-i386/op.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/target-i386/op.c b/target-i386/op.c index f1276f7a64..d4742a3847 100644 --- a/target-i386/op.c +++ b/target-i386/op.c @@ -936,6 +936,35 @@ void OPPROTO op_lar(void) helper_lar(); } +void OPPROTO op_verr(void) +{ + helper_verr(); +} + +void OPPROTO op_verw(void) +{ + helper_verw(); +} + +void OPPROTO op_arpl(void) +{ + if ((T0 & 3) < (T1 & 3)) { + /* XXX: emulate bug or 0xff3f0000 oring as in bochs ? */ + T0 = (T0 & ~3) | (T1 & 3); + T1 = CC_Z; + } else { + T1 = 0; + } + FORCE_RET(); +} + +void OPPROTO op_arpl_update(void) +{ + int eflags; + eflags = cc_table[CC_OP].compute_all(); + CC_SRC = (eflags & ~CC_Z) | T1; +} + /* T0: segment, T1:eip */ void OPPROTO op_ljmp_protected_T0_T1(void) { |