~ubuntu-branches/ubuntu/oneiric/virtualbox/oneiric-updates

« back to all changes in this revision

Viewing changes to src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2011-09-02 11:50:47 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20110902115047-kfhmsikrpydgyoji
Tags: 4.1.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox.files/source_virtualbox.py
    - debian/virtualbox.install
  - Drop *-source packages.
  - Add vboxguest modalias the to the package control field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: IEMAllCImpl.cpp.h 37918 2011-07-13 13:38:33Z vboxsync $ */
 
1
/* $Id: IEMAllCImpl.cpp.h 38079 2011-07-19 17:25:00Z vboxsync $ */
2
2
/** @file
3
3
 * IEM - Instruction Implementation in C/C++ (code include).
4
4
 */
2944
2944
    uint8_t const  al = (uint8_t)ax + (uint8_t)(ax >> 8) * bImm;
2945
2945
    pCtx->ax = al;
2946
2946
    iemHlpUpdateArithEFlagsU8(pIemCpu, al,
2947
 
                              X86_EFL_SF | X86_EFL_SF | X86_EFL_PF,
2948
 
                              X86_EFL_OF | X86_EFL_AF | X86_EFL_CF);
2949
 
 
2950
 
    iemRegAddToRip(pIemCpu, cbInstr);
2951
 
    return VINF_SUCCESS;
2952
 
}
2953
 
 
 
2947
                              X86_EFL_SF | X86_EFL_ZF | X86_EFL_PF,
 
2948
                              X86_EFL_OF | X86_EFL_AF | X86_EFL_CF);
 
2949
 
 
2950
    iemRegAddToRip(pIemCpu, cbInstr);
 
2951
    return VINF_SUCCESS;
 
2952
}
 
2953
 
 
2954
 
 
2955
/**
 
2956
 * Implements 'AAM'.
 
2957
 *
 
2958
 * @param   enmEffOpSize    The effective operand size.
 
2959
 */
 
2960
IEM_CIMPL_DEF_1(iemCImpl_aam, uint8_t, bImm)
 
2961
{
 
2962
    PCPUMCTX pCtx = pIemCpu->CTX_SUFF(pCtx);
 
2963
 
 
2964
    uint16_t const ax = pCtx->ax;
 
2965
    uint8_t const  al = (uint8_t)ax % bImm;
 
2966
    uint8_t const  ah = (uint8_t)ax / bImm;
 
2967
    pCtx->ax = (ah << 8) + al;
 
2968
    iemHlpUpdateArithEFlagsU8(pIemCpu, al,
 
2969
                              X86_EFL_SF | X86_EFL_ZF | X86_EFL_PF,
 
2970
                              X86_EFL_OF | X86_EFL_AF | X86_EFL_CF);
 
2971
 
 
2972
    iemRegAddToRip(pIemCpu, cbInstr);
 
2973
    return VINF_SUCCESS;
 
2974
}
2954
2975
 
2955
2976
 
2956
2977