Hi,
20090819-2-trim-down-cbfs: CBFS uses sprintf, which requires vtxprintf, which requires (in the current design) a nested function. That works on x86, but on PPC this requires a trampoline. In the ROM stage, this is not available, so remove the single use of sprintf and replace it with a direct string handler - it's only used to fill in fixed-length hex values.
20090819-3-more-noreturns-in-romcc: Mark two more functions in romcc as noreturn. Helps clang's scan-build a bit
20090819-4-cbfsify-ppc: Make PPC use CBFS. Support big endian ELF in cbfs-mkstage. Untested and not complete yet.
20090819-5-fix-ppc-build: The CBFS build system requires ROM_IMAGE_SIZE to have a somewhat plausible value.
All of them are Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
20090819-2-trim-down-cbfs:
+static void tohex32(int val, char* dest) +{ + dest[0]=tohex8(val>>24);
Shouldn't val be unsigned? You could also and this value with 0xff to remove sign-extended bits.
20090819-3-more-noreturns-in-romcc: Mark two more functions in romcc as noreturn. Helps clang's scan-build a bit
20090819-4-cbfsify-ppc: Make PPC use CBFS. Support big endian ELF in cbfs-mkstage. Untested and not complete yet. 20090819-5-fix-ppc-build: The CBFS build system requires ROM_IMAGE_SIZE to have a somewhat plausible value.
All of them are Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Acked-by: Myles Watson mylesgw@gmail.com
On 8/19/09 11:08 PM, Patrick Georgi wrote:
+static int tohex8(int c) +{
- return (c<=9)?(c+'0'):(c-10+'a');
+}
+static void tohex32(int val, char* dest) +{
- dest[0]=tohex8(val>>24);
- dest[1]=tohex8((val>>16) & 0xff);
- dest[2]=tohex8((val>>8) & 0xff);
- dest[3]=tohex8((val) & 0xff);
+}
I think I agree with Myles, those val/c should probably be u8 and u32?
Acked-by: Stefan Reinauer stepan@coresystems.de