[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned acce
From: |
Curt McDowell |
Subject: |
RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access |
Date: |
Tue, 25 Apr 2006 16:00:36 -0700 |
Timmy Brolin wrote:
> But replacing ip_addr2 with ip_addr will break things on all
> compilers that do not support packed structs. Possibly others as well.
Ah; if lwip was meant to compile without packed structs, that explains a lot.
It would have saved a lot of hassle if ip_addr2 had a comment next to it, and
was not itself packed, or if the comments in etharp.c mentioned that...
> If your compiler generates special code to handle potential
> alignment problems whenever packed structs are used even if
> there are no alignment issues, then I suggest you try
> disabling packed structs.
Sounds good. I'll try that because of code bloat. For packed ip_addr, ARM gcc
generates a sequence of 11 (7) instructions to store (load) it one byte at a
time, and armcc generates calls to library functions __rt_uwrite4
(__rt_uread4).
Regards,
Curt McDowell
Broadcom Corp.
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, (continued)
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Pedro Alves, 2006/04/25
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/26
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Derek Guerdon, 2006/04/27
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Leon Woestenberg, 2006/04/30
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access,
Curt McDowell <=
- RE: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Leon Woestenberg, 2006/04/30
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Curt McDowell, 2006/04/23
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Leon Woestenberg, 2006/04/23
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/24
- Re: [lwip-users] [PATCH] fix warning for gcc and possible unaligned access, Timmy Brolin, 2006/04/22