[PATCH] Softemu 8xx implementation of LFS
Leif Lindholm
Leif.Lindholm at uab.ericsson.se
Tue May 11 22:37:58 EST 1999
Hello
I had some trouble with softemu failures for LFS, so I implemented it
(well, actually stole Corts code for LFD and changed it to float :). In
case someone else wants it, there is a patch below (against
embedded-2.2.5 kernel).
Please correct me if I messed up (first dabbling in softemu), but it
seems to be working.
regards
/
Leif
--- linux/arch/ppc/kernel/softemu8xx.c.old Fri Apr 9 06:28:20 1999
+++ linux/arch/ppc/kernel/softemu8xx.c Tue May 11 14:20:56 1999
@@ -34,6 +34,7 @@
/* Eventually we may need a look-up table, but this works for now.
*/
+#define LFS 48
#define LFD 50
#define LFDU 51
#define STFD 54
@@ -86,6 +87,12 @@
else
regs->gpr[idxreg] = (uint)ea;
break;
+ case LFS:
+ sdisp = (instword & 0xffff);
+ ea = (uint *)(regs->gpr[idxreg] + sdisp);
+ if (copy_from_user(ip, ea, sizeof(float)))
+ retval = EFAULT;
+ break;
case STFD:
/* this is a 16 bit quantity that is sign extended
* so use a signed short here -- Cort
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
More information about the Linuxppc-dev
mailing list