Subject: need help on unaligned loads,stores!

From: "Liu Hongming (Alan)" <[email-masked]>
Date: Mon, 13 Oct 2003 09:44:56 +0800

Hi all,

I am porting linux for a cpu that doesnt support unaligned loads/stores
instructions.

when using memcpy in arch/mips/memcpy.S,it will not work on these
instructions.

Any one could help me to deal with this? Have you ever ported linux for this
kind cpu?

And anyone could tell me which cpu doesnt support these instructions
either,and has

been ported for linux?

Best Regards,

Alan

---

From: Thomas Horsten <[email-masked]>
Date: Mon, 13 Oct 2003 19:27:07 +0100

On Monday 13 October 2003 02:44, Liu Hongming (Alan) wrote:

> Any one could help me to deal with this? Have you ever ported linux for
> this kind cpu?
>

Almost all MIPS CPU's are like this, and don't support unaligned accesses.

The memcpy in arch/mips/lib/memcpy.S already handles this (by copying the end 
and beginning using byte-accesses if not aligned).

Best regards,

Thomas

---

From: Geert Uytterhoeven <[email-masked]>
Date: Mon, 13 Oct 2003 21:34:07 +0200 (MEST)

> Almost all MIPS CPU's are like this, and don't support unaligned accesses.

I guess Liu meant the (patented) instructions to do explicit unaligned
accesses.  Real MIPS CPUs do support these.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email-masked]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 13 Oct 2003 22:49:06 +0200

> accesses.  Real MIPS CPUs do support these.

That correct.  Unfortunately emulating of these instructions in exception
handlers would also be covered by the patents, so rewriting which would
be rather easy in all cases I can think of is the way to go ...

  Ralf

---

From: Thomas Horsten <[email-masked]>
Date: Mon, 13 Oct 2003 22:15:59 +0100

> be rather easy in all cases I can think of is the way to go ...

Surely not in Europe (yet), at least?

- Thomas

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 13 Oct 2003 23:37:26 +0200

> Surely not in Europe (yet), at least?

The patent itself is a hardware patent and those also cover software
implementations by interpretation of US, European and various national
European patent offices.  Otoh the patent will expire in like a year or
two anyway :-)

  Ralf