mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 13:08:42 +00:00
HV: instr_emul: replace u_long with uint64_t
Rflags is always 64-bit. Spell out the width explicitly and drop the unused typedef'ed u_long type. Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
3f9b0d53f5
commit
bbb6920a75
@ -361,10 +361,10 @@ vie_update_register(struct vcpu *vcpu, enum vm_reg_name reg,
|
|||||||
* Return the status flags that would result from doing (x - y).
|
* Return the status flags that would result from doing (x - y).
|
||||||
*/
|
*/
|
||||||
#define GETCC(sz) \
|
#define GETCC(sz) \
|
||||||
static u_long \
|
static uint64_t \
|
||||||
getcc##sz(uint##sz##_t x, uint##sz##_t y) \
|
getcc##sz(uint##sz##_t x, uint##sz##_t y) \
|
||||||
{ \
|
{ \
|
||||||
u_long rflags; \
|
uint64_t rflags; \
|
||||||
\
|
\
|
||||||
__asm __volatile("sub %2,%1; pushfq; popq %0" : \
|
__asm __volatile("sub %2,%1; pushfq; popq %0" : \
|
||||||
"=r" (rflags), "+r" (x) : "m" (y)); \
|
"=r" (rflags), "+r" (x) : "m" (y)); \
|
||||||
@ -376,7 +376,7 @@ GETCC(16);
|
|||||||
GETCC(32);
|
GETCC(32);
|
||||||
GETCC(64);
|
GETCC(64);
|
||||||
|
|
||||||
static u_long
|
static uint64_t
|
||||||
getcc(int opsize, uint64_t x, uint64_t y)
|
getcc(int opsize, uint64_t x, uint64_t y)
|
||||||
{
|
{
|
||||||
ASSERT(opsize == 1 || opsize == 2 || opsize == 4 || opsize == 8,
|
ASSERT(opsize == 1 || opsize == 2 || opsize == 4 || opsize == 8,
|
||||||
|
@ -185,8 +185,6 @@ enum vm_reg_name {
|
|||||||
VM_REG_LAST
|
VM_REG_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef unsigned long u_long;
|
|
||||||
|
|
||||||
int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval);
|
int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval);
|
||||||
int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val);
|
int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val);
|
||||||
int vm_get_seg_desc(struct vcpu *vcpu, int reg,
|
int vm_get_seg_desc(struct vcpu *vcpu, int reg,
|
||||||
|
Loading…
Reference in New Issue
Block a user