Re: [sparc64] dead code in emul.c

2018-08-08 Thread Mark Kettenis
> Date: Wed, 8 Aug 2018 10:26:26 +0200
> From: Klemens Nanni 
> 
> On Mon, Aug 06, 2018 at 08:11:55PM +, Miod Vallat wrote:
> > emul.c r1.19 removed a bunch of code, but not enough, and left dead code
> > around.
> OK kn

Go ahead and commit it.



Re: [sparc64] dead code in emul.c

2018-08-08 Thread Klemens Nanni
On Mon, Aug 06, 2018 at 08:11:55PM +, Miod Vallat wrote:
> emul.c r1.19 removed a bunch of code, but not enough, and left dead code
> around.
OK kn



[sparc64] dead code in emul.c

2018-08-07 Thread Miod Vallat
emul.c r1.19 removed a bunch of code, but not enough, and left dead code
around.

Index: emul.c
===
RCS file: /OpenBSD/src/sys/arch/sparc64/sparc64/emul.c,v
retrieving revision 1.23
diff -u -p -r1.23 emul.c
--- emul.c  16 Nov 2014 12:30:59 -  1.23
+++ emul.c  6 Aug 2018 20:11:00 -
@@ -49,13 +49,9 @@
 
 #define GPR(tf, i) ((int32_t *)(u_long)>tf_global)[i]
 #define IPR(tf, i) ((int32_t *)(u_long)tf->tf_out[6])[i - 16]
-#define FPR(p, i)  ((int32_t) p->p_md.md_fpstate->fs_regs[i])
-#define FPRSET(p, i, v)p->p_md.md_fpstate->fs_regs[i] = (v)
 
 static __inline int readgpreg(struct trapframe64 *, int, void *);
-static __inline int readfpreg(struct proc *, int, void *);
 static __inline int writegpreg(struct trapframe64 *, int, const void *);
-static __inline int writefpreg(struct proc *, int, const void *);
 static __inline int decodeaddr(struct trapframe64 *, union instr *, void *);
 static int muldiv(struct trapframe64 *, union instr *, int32_t *, int32_t *,
 int32_t *);
@@ -81,7 +77,6 @@ readgpreg(tf, i, val)
return error;
 }
 
-   
 static __inline int
 writegpreg(tf, i, val)
struct trapframe64 *tf;
@@ -99,28 +94,6 @@ writegpreg(tf, i, val)
error = copyout((caddr_t) val, (tf, i), sizeof(int32_t));
 
return error;
-}
-   
-
-static __inline int
-readfpreg(p, i, val)
-   struct proc *p;
-   int i;
-   void *val;
-{
-   *(int32_t *) val = FPR(p, i);
-   return 0;
-}
-
-   
-static __inline int
-writefpreg(p, i, val)
-   struct proc *p;
-   int i;
-   const void *val;
-{
-   FPRSET(p, i, *(const int32_t *) val);
-   return 0;
 }
 
 static __inline int