From: Wolfgang Denk Date: Wed, 07 Nov 2007 20:51:46 +0100 Subject: [U-Boot-Users] Spartan FPGA patch In-Reply-To: Your message of "Wed, 07 Nov 2007 17:49:36 +0100." <4731ECA0.1010502@schweigstill.de> Message-ID: <20071107195146.2526A248D3@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <4731ECA0.1010502@schweigstill.de> you wrote: > > Wolfgang Denk schrieb: > > Oops? I can't parse that. What's the difference between "signed char" > > and "int" except the number of bits? > > Like mentioned before, accessing data via a (signed|unsigned|.) char * > is independant of the processor endianess. If you want to read a Correct. And storing the result in an "int" type is independent of the byte order as well,if you do it right. > bitstream which is bytewise formatted you don't want to care about > endianess. Or do you also want some endianess string definitions? What has this to do with what we're discussing? > And it is even worse; on some architectures, like ARM, it is not > allowed to do a 16/32 bit memory access on a non-aligned address, > e.g.: Nobody intended to do that. > int val; > int * p_data; STOP! I asked why we cannot change "val" into an "int". I never said anything about using an "int *" to access to buffer data. > Depending of the ARM implementation you either get a data abort or > an "implementation depending" wrong value in val. For write access > it is even worse because this can overwrite some memory. This bug is your invention, not mine. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Dear Lord: I just want *one* one-armed manager so I never have to hear "On the other hand", again.