Lines Matching refs:nr
510 static inline ulong reg_read(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_read() argument
512 if (KVM_EMULATOR_BUG_ON(nr >= NR_EMULATOR_GPRS, ctxt)) in reg_read()
513 nr &= NR_EMULATOR_GPRS - 1; in reg_read()
515 if (!(ctxt->regs_valid & (1 << nr))) { in reg_read()
516 ctxt->regs_valid |= 1 << nr; in reg_read()
517 ctxt->_regs[nr] = ctxt->ops->read_gpr(ctxt, nr); in reg_read()
519 return ctxt->_regs[nr]; in reg_read()
522 static inline ulong *reg_write(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_write() argument
524 if (KVM_EMULATOR_BUG_ON(nr >= NR_EMULATOR_GPRS, ctxt)) in reg_write()
525 nr &= NR_EMULATOR_GPRS - 1; in reg_write()
530 ctxt->regs_valid |= 1 << nr; in reg_write()
531 ctxt->regs_dirty |= 1 << nr; in reg_write()
532 return &ctxt->_regs[nr]; in reg_write()
535 static inline ulong *reg_rmw(struct x86_emulate_ctxt *ctxt, unsigned nr) in reg_rmw() argument
537 reg_read(ctxt, nr); in reg_rmw()
538 return reg_write(ctxt, nr); in reg_rmw()