[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 13/17] xenctx: Add convert of more registers to symbols
>>> On 20.03.14 at 20:07, Don Slutz <dslutz@xxxxxxxxxxx> wrote: > @@ -368,8 +380,11 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t > *ctx) > printf(" gs: %04x\n", regs->gs); > > if (xenctx.disp_all) { > - print_special(ctx->ctrlreg, "cr", 0x1d, 4); > - print_special(ctx->debugreg, "dr", 0xcf, 4); > + uint64_t cr_reg_mask[5] = {0, 0, ~0ULL}; > + uint64_t dr_reg_mask[8] = {~0ULL, ~0ULL, ~0ULL, ~0ULL}; So you've got a total of three of those. Why can't they be static const at file scope, and be used in all three places? Also, using C99 (available as gcc extension) here may make this a bit more legible: static const uint64_t cr_reg_mask[5] = { [2] = ~UINT64_C(0) }; static const uint64_t dr_reg_mask[8] = { [0 ... 3] = ~UINT64_C(0) }; Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |