[OpenBIOS] [PATCH] sparc32: add sbus-intr>cpu for sun4m

Segher Boessenkool segher at kernel.crashing.org
Mon Aug 22 17:33:07 CEST 2011


> Looking at CREATE, you build up a byte array one byte at a time with
> "c," after each byte, and the result is not const, so it's not quite
> what I was hoping for... However, I came across hex strings, i.e.
> " "(A1 B2)" will directly encode those 2 bytes into a string, which  
> can
> be used as a byte array. I kinda like the hex string idea, but what's
> your preference?

The byte array isn't "const" either, in exactly the same way (some
compilers might put it in ROM if so instructed, but that is true
for the CREATE version as well).

The string approach is sort of hackish, for example you need to
drop the length it leaves on the stack.  It can be convenient
for big chunks of byte data, but for something short I wouldn't
bother.


Segher




More information about the OpenBIOS mailing list