VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp@ 48000

Last change on this file since 48000 was 47568, checked in by vboxsync, 11 years ago

IEM: LAR,LSL,ARPL, and some tracing (RTTraceBuf*).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: IEMAllAImplC.cpp 47568 2013-08-07 03:11:58Z vboxsync $ */
2/** @file
3 * IEM - Instruction Implementation in Assembly, portable C variant.
4 */
5
6/*
7 * Copyright (C) 2011-2013 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#include "IEMInternal.h"
22#include <VBox/vmm/vm.h>
23#include <iprt/x86.h>
24
25
26#ifdef RT_ARCH_X86
27/*
28 * There are a few 64-bit on 32-bit things we'd rather do in C.
29 */
30
31
32IEM_DECL_IMPL_DEF(int, iemAImpl_mul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pEFlags))
33{
34 AssertFailed();
35 return -1;
36}
37
38
39IEM_DECL_IMPL_DEF(int, iemAImpl_imul_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Factor, uint32_t *pEFlags))
40{
41 AssertFailed();
42 return -1;
43}
44
45
46IEM_DECL_IMPL_DEF(int, iemAImpl_div_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pEFlags))
47{
48 AssertFailed();
49 return -1;
50}
51
52
53IEM_DECL_IMPL_DEF(int, iemAImpl_idiv_u64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64Divisor, uint32_t *pEFlags))
54{
55 AssertFailed();
56 return -1;
57}
58
59#endif /* RT_ARCH_X86 */
60
61
62IEM_DECL_IMPL_DEF(void, iemAImpl_arpl,(uint16_t *pu16Dst, uint16_t u16Src, uint32_t *pEFlags))
63{
64 if ((*pu16Dst & X86_SEL_RPL) < (u16Src & X86_SEL_RPL))
65 {
66 *pu16Dst &= X86_SEL_MASK_OFF_RPL;
67 *pu16Dst |= u16Src & X86_SEL_RPL;
68
69 *pEFlags |= X86_EFL_ZF;
70 }
71 else
72 *pEFlags &= ~X86_EFL_ZF;
73}
74
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette