Lines Matching refs:newregs
44 struct user_pt_regs newregs = { in gpr_get() local
57 memcpy(newregs.a, in gpr_get()
60 memcpy(newregs.a + regs->windowbase * 4, in gpr_get()
64 return membuf_write(&to, &newregs, sizeof(newregs)); in gpr_get()
73 struct user_pt_regs newregs = {0}; in gpr_set() local
77 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &newregs, 0, -1); in gpr_set()
81 if (newregs.windowbase >= XCHAL_NUM_AREGS / 4) in gpr_set()
85 regs->pc = newregs.pc; in gpr_set()
86 regs->ps = (regs->ps & ~ps_mask) | (newregs.ps & ps_mask); in gpr_set()
87 regs->lbeg = newregs.lbeg; in gpr_set()
88 regs->lend = newregs.lend; in gpr_set()
89 regs->lcount = newregs.lcount; in gpr_set()
90 regs->sar = newregs.sar; in gpr_set()
91 regs->threadptr = newregs.threadptr; in gpr_set()
93 if (newregs.syscall) in gpr_set()
94 regs->syscall = newregs.syscall; in gpr_set()
96 if (newregs.windowbase != regs->windowbase || in gpr_set()
97 newregs.windowstart != regs->windowstart) { in gpr_set()
100 rotws = (((newregs.windowstart | in gpr_set()
101 (newregs.windowstart << WSBITS)) >> in gpr_set()
102 newregs.windowbase) & in gpr_set()
106 regs->windowbase = newregs.windowbase; in gpr_set()
107 regs->windowstart = newregs.windowstart; in gpr_set()
111 memcpy(regs->areg + XCHAL_NUM_AREGS - newregs.windowbase * 4, in gpr_set()
112 newregs.a, newregs.windowbase * 16); in gpr_set()
113 memcpy(regs->areg, newregs.a + newregs.windowbase * 4, in gpr_set()
114 (WSBITS - newregs.windowbase) * 16); in gpr_set()
126 elf_xtregs_t *newregs = kzalloc(sizeof(elf_xtregs_t), GFP_KERNEL); in tie_get() local
128 if (!newregs) in tie_get()
131 newregs->opt = regs->xtregs_opt; in tie_get()
132 newregs->user = ti->xtregs_user; in tie_get()
137 newregs->cp0 = ti->xtregs_cp.cp0; in tie_get()
138 newregs->cp1 = ti->xtregs_cp.cp1; in tie_get()
139 newregs->cp2 = ti->xtregs_cp.cp2; in tie_get()
140 newregs->cp3 = ti->xtregs_cp.cp3; in tie_get()
141 newregs->cp4 = ti->xtregs_cp.cp4; in tie_get()
142 newregs->cp5 = ti->xtregs_cp.cp5; in tie_get()
143 newregs->cp6 = ti->xtregs_cp.cp6; in tie_get()
144 newregs->cp7 = ti->xtregs_cp.cp7; in tie_get()
146 ret = membuf_write(&to, newregs, sizeof(*newregs)); in tie_get()
147 kfree(newregs); in tie_get()
159 elf_xtregs_t *newregs = kzalloc(sizeof(elf_xtregs_t), GFP_KERNEL); in tie_set() local
161 if (!newregs) in tie_set()
165 newregs, 0, -1); in tie_set()
169 regs->xtregs_opt = newregs->opt; in tie_set()
170 ti->xtregs_user = newregs->user; in tie_set()
175 ti->xtregs_cp.cp0 = newregs->cp0; in tie_set()
176 ti->xtregs_cp.cp1 = newregs->cp1; in tie_set()
177 ti->xtregs_cp.cp2 = newregs->cp2; in tie_set()
178 ti->xtregs_cp.cp3 = newregs->cp3; in tie_set()
179 ti->xtregs_cp.cp4 = newregs->cp4; in tie_set()
180 ti->xtregs_cp.cp5 = newregs->cp5; in tie_set()
181 ti->xtregs_cp.cp6 = newregs->cp6; in tie_set()
182 ti->xtregs_cp.cp7 = newregs->cp7; in tie_set()
185 kfree(newregs); in tie_set()