7 #include <linux/sched.h>
8 #include <asm/uaccess.h>
21 "not EINVAL\n", -err);
39 if (n !=
sizeof(instr)) {
41 "instruction from 0x%lx\n", addr);
46 return (instr == 0x80cd) || (instr == 0x340f);
51 #define FLAG_MASK 0x00044dd5
53 static const int reg_offsets[] = {
87 if (value && (value & 3) != 3)
91 if (value && (value & 3) != 3)
96 if (value && (value & 3) != 3)
102 if ((value & 3) != 3)
114 panic(
"Bad register in putreg() : %d\n", regno);
116 child->
thread.regs.regs.gp[reg_offsets[regno]] =
value;
122 if ((addr & 3) || addr < 0)
126 return putreg(child, addr, data);
127 else if ((addr >=
offsetof(
struct user, u_debugreg[0])) &&
131 if ((addr == 4) || (addr == 5))
141 unsigned long mask = ~0
UL;
146 return child->
thread.regs.regs.syscall;
167 panic(
"Bad register in getreg() : %d\n", regno);
169 return mask & child->
thread.regs.regs.gp[reg_offsets[regno]];
177 if ((addr & 3) || addr < 0)
182 tmp =
getreg(child, addr);
184 else if ((addr >=
offsetof(
struct user, u_debugreg[0])) &&
219 (
unsigned long *) &fpregs);
248 (
unsigned long *) &fpregs);
252 unsigned long addr,
unsigned long data)
258 ret = get_fpregs(datap, child);
261 ret = set_fpregs(datap, child);
264 ret = get_fpxregs(datap, child);
267 ret = set_fpxregs(datap, child);