Skip to content

Commit bbb6920

Browse files
junjiemao1lijinxia
authored andcommitted
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>
1 parent 3f9b0d5 commit bbb6920

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

hypervisor/arch/x86/guest/instr_emul.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ vie_update_register(struct vcpu *vcpu, enum vm_reg_name reg,
361361
* Return the status flags that would result from doing (x - y).
362362
*/
363363
#define GETCC(sz) \
364-
static u_long \
364+
static uint64_t \
365365
getcc##sz(uint##sz##_t x, uint##sz##_t y) \
366366
{ \
367-
u_long rflags; \
367+
uint64_t rflags; \
368368
\
369369
__asm __volatile("sub %2,%1; pushfq; popq %0" : \
370370
"=r" (rflags), "+r" (x) : "m" (y)); \
@@ -376,7 +376,7 @@ GETCC(16);
376376
GETCC(32);
377377
GETCC(64);
378378

379-
static u_long
379+
static uint64_t
380380
getcc(int opsize, uint64_t x, uint64_t y)
381381
{
382382
ASSERT(opsize == 1 || opsize == 2 || opsize == 4 || opsize == 8,

hypervisor/arch/x86/guest/instr_emul_wrapper.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ enum vm_reg_name {
185185
VM_REG_LAST
186186
};
187187

188-
typedef unsigned long u_long;
189-
190188
int vm_get_register(struct vcpu *vcpu, int reg, uint64_t *retval);
191189
int vm_set_register(struct vcpu *vcpu, int reg, uint64_t val);
192190
int vm_get_seg_desc(struct vcpu *vcpu, int reg,

0 commit comments

Comments
 (0)