Messages in this thread | | | From | Huacai Chen <> | Date | Tue, 18 Oct 2022 17:36:45 +0800 | Subject | Re: [PATCH V2] LoongArch: Add unaligned access support |
| |
On Tue, Oct 18, 2022 at 3:48 PM David Laight <David.Laight@aculab.com> wrote: > > From: Huacai Chen > > Sent: 18 October 2022 08:33 > ... > > > What about my more structured approach in another reply that avoids the > > > huge else-if conditions? Both the terrible line wraps and codegen could > > > be avoided. > ... > > OK, let me try. > > I suspect you can mask out some 'operand size' bits from the > instructions - instead of checking each opcode. > > I'm also pretty sure you can't assume the FP register are live. > If a read from userspace faults then there can be a full > process switch - so by the time you try to write to the > FP registers they no longer belong to the current process. > > It might be safer and simpler to just enforce the FP > registers be saved and then act on the save area. > I'd guess they get restored in the 'return to userspace' > code. Good catch, will be fixed in V4.
Huacai > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales)
| |