From cec6843e87fe29d8419fd5a9ed9912729c068656 Mon Sep 17 00:00:00 2001 From: bellard Date: Wed, 21 May 2008 16:25:27 +0000 Subject: converted LSL/LAR/VERW/VERR to TCG - force 16 bit memory access for LSL/LAR git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4513 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-i386/helper.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'target-i386/helper.c') diff --git a/target-i386/helper.c b/target-i386/helper.c index 0891ec9dc1..731d7a328c 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -3138,13 +3138,13 @@ void helper_rdmsr(void) } #endif -uint32_t helper_lsl(uint32_t selector) +target_ulong helper_lsl(target_ulong selector1) { unsigned int limit; - uint32_t e1, e2, eflags; + uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl, type; - selector &= 0xffff; + selector = selector1 & 0xffff; eflags = cc_table[CC_OP].compute_all(); if (load_segment(&e1, &e2, selector) != 0) goto fail; @@ -3181,12 +3181,12 @@ uint32_t helper_lsl(uint32_t selector) return limit; } -uint32_t helper_lar(uint32_t selector) +target_ulong helper_lar(target_ulong selector1) { - uint32_t e1, e2, eflags; + uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl, type; - selector &= 0xffff; + selector = selector1 & 0xffff; eflags = cc_table[CC_OP].compute_all(); if ((selector & 0xfffc) == 0) goto fail; @@ -3227,12 +3227,12 @@ uint32_t helper_lar(uint32_t selector) return e2 & 0x00f0ff00; } -void helper_verr(uint32_t selector) +void helper_verr(target_ulong selector1) { - uint32_t e1, e2, eflags; + uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl; - selector &= 0xffff; + selector = selector1 & 0xffff; eflags = cc_table[CC_OP].compute_all(); if ((selector & 0xfffc) == 0) goto fail; @@ -3260,12 +3260,12 @@ void helper_verr(uint32_t selector) CC_SRC = eflags | CC_Z; } -void helper_verw(uint32_t selector) +void helper_verw(target_ulong selector1) { - uint32_t e1, e2, eflags; + uint32_t e1, e2, eflags, selector; int rpl, dpl, cpl; - selector &= 0xffff; + selector = selector1 & 0xffff; eflags = cc_table[CC_OP].compute_all(); if ((selector & 0xfffc) == 0) goto fail; -- cgit v1.2.3