Lines Matching full:regs
123 #define compat_usr(x) regs[(x)]
124 #define compat_fp regs[11]
125 #define compat_sp regs[13]
126 #define compat_lr regs[14]
127 #define compat_sp_hyp regs[15]
128 #define compat_lr_irq regs[16]
129 #define compat_sp_irq regs[17]
130 #define compat_lr_svc regs[18]
131 #define compat_sp_svc regs[19]
132 #define compat_lr_abt regs[20]
133 #define compat_sp_abt regs[21]
134 #define compat_lr_und regs[22]
135 #define compat_sp_und regs[23]
136 #define compat_r8_fiq regs[24]
137 #define compat_r9_fiq regs[25]
138 #define compat_r10_fiq regs[26]
139 #define compat_r11_fiq regs[27]
140 #define compat_r12_fiq regs[28]
141 #define compat_sp_fiq regs[29]
142 #define compat_lr_fiq regs[30]
177 u64 regs[31]; member
202 static inline bool in_syscall(struct pt_regs const *regs) in in_syscall() argument
204 return regs->syscallno != NO_SYSCALL; in in_syscall()
207 static inline void forget_syscall(struct pt_regs *regs) in forget_syscall() argument
209 regs->syscallno = NO_SYSCALL; in forget_syscall()
217 #define compat_thumb_mode(regs) \ argument
218 (((regs)->pstate & PSR_AA32_T_BIT))
220 #define compat_thumb_mode(regs) (0) argument
223 #define user_mode(regs) \ argument
224 (((regs)->pstate & PSR_MODE_MASK) == PSR_MODE_EL0t)
226 #define compat_user_mode(regs) \ argument
227 (((regs)->pstate & (PSR_MODE32_BIT | PSR_MODE_MASK)) == \
230 #define processor_mode(regs) \ argument
231 ((regs)->pstate & PSR_MODE_MASK)
233 #define irqs_priority_unmasked(regs) \ argument
235 (regs)->pmr_save == GIC_PRIO_IRQON : \
238 #define interrupts_enabled(regs) \ argument
239 (!((regs)->pstate & PSR_I_BIT) && irqs_priority_unmasked(regs))
241 #define fast_interrupts_enabled(regs) \ argument
242 (!((regs)->pstate & PSR_F_BIT))
244 static inline unsigned long user_stack_pointer(struct pt_regs *regs) in user_stack_pointer() argument
246 if (compat_user_mode(regs)) in user_stack_pointer()
247 return regs->compat_sp; in user_stack_pointer()
248 return regs->sp; in user_stack_pointer()
252 extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
257 * @regs: pt_regs from which register value is gotten
260 * regs_get_register returns the value of a register whose offset from @regs.
264 static inline u64 regs_get_register(struct pt_regs *regs, unsigned int offset) in regs_get_register() argument
273 val = regs->regs[offset]; in regs_get_register()
276 val = regs->sp; in regs_get_register()
279 val = regs->pc; in regs_get_register()
282 val = regs->pstate; in regs_get_register()
295 static inline unsigned long pt_regs_read_reg(const struct pt_regs *regs, int r) in pt_regs_read_reg() argument
297 return (r == 31) ? 0 : regs->regs[r]; in pt_regs_read_reg()
304 static inline void pt_regs_write_reg(struct pt_regs *regs, int r, in pt_regs_write_reg() argument
308 regs->regs[r] = val; in pt_regs_write_reg()
312 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) in kernel_stack_pointer() argument
314 return regs->sp; in kernel_stack_pointer()
317 static inline unsigned long regs_return_value(struct pt_regs *regs) in regs_return_value() argument
319 return regs->regs[0]; in regs_return_value()
322 static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc) in regs_set_return_value() argument
324 regs->regs[0] = rc; in regs_set_return_value()
329 * @regs: pt_regs of that context
340 static inline unsigned long regs_get_kernel_argument(struct pt_regs *regs, in regs_get_kernel_argument() argument
345 return pt_regs_read_reg(regs, n); in regs_get_kernel_argument()
351 int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task);
353 static inline unsigned long instruction_pointer(struct pt_regs *regs) in instruction_pointer() argument
355 return regs->pc; in instruction_pointer()
357 static inline void instruction_pointer_set(struct pt_regs *regs, in instruction_pointer_set() argument
360 regs->pc = val; in instruction_pointer_set()
363 static inline unsigned long frame_pointer(struct pt_regs *regs) in frame_pointer() argument
365 return regs->regs[29]; in frame_pointer()
368 #define procedure_link_pointer(regs) ((regs)->regs[30]) argument
370 static inline void procedure_link_pointer_set(struct pt_regs *regs, in procedure_link_pointer_set() argument
373 procedure_link_pointer(regs) = val; in procedure_link_pointer_set()
376 extern unsigned long profile_pc(struct pt_regs *regs);