Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146861
b: refs/heads/master
c: 48c72fc
h: refs/heads/master
i:
  146859: 3d83d8b
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jun 4, 2009
1 parent bd0fdea commit e94e80a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 138f025267dcc07d5e7d0bb1f20e9a6b5f2fdcf7
refs/heads/master: 48c72fccbfb1db01b5d0b98baff4442fea50d7a4
10 changes: 5 additions & 5 deletions trunk/arch/sh/include/asm/unaligned-sh4a.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

/*
* SH-4A has support for unaligned 32-bit loads, and 32-bit loads only.
* Support for 16 and 64-bit accesses are done through shifting and
* masking relative to the endianness. Unaligned stores are not supported
* by the instruction encoding, so these continue to use the packed
* Support for 64-bit accesses are done through shifting and masking
* relative to the endianness. Unaligned stores are not supported by the
* instruction encoding, so these continue to use the packed
* struct.
*
* The same note as with the movli.l/movco.l pair applies here, as long
Expand Down Expand Up @@ -41,9 +41,9 @@ struct __una_u64 { u64 x __attribute__((packed)); };
static inline u16 __get_unaligned_cpu16(const u8 *p)
{
#ifdef __LITTLE_ENDIAN
return __get_unaligned_cpu32(p) & 0xffff;
return p[0] | p[1] << 8;
#else
return __get_unaligned_cpu32(p) >> 16;
return p[0] << 8 | p[1];
#endif
}

Expand Down

0 comments on commit e94e80a

Please sign in to comment.