ebcdic support for binutils...
DJ Delorie
dj@delorie.com
Tue Dec 11 19:10:00 GMT 2001
> hm. That's better?
Better than a compile error. Not all compilers support #elif.
> ( ps - what was the rationale for the hex replacement anyways? I
> thought the other file was much cleaner.)
The rationale was that you didn't need to initialize it at runtime if
you could initialize it at compile time. It's a performance boost.
I would approve a patch that defaulted to a zero-filled array,
with explicit assignments for each digit, like this:
__hex_arr['4'] = 4;
__hex_arr['A'] = 10;
__hex_arr['B'] = 11;
etc. You can't use for loops, though.
Unfortunately, You'd have to remove the ASCII table (replace it with
an uninitialized array decl) also if you do this, else nobody will
ever notice if you forget to call hex_init().
More information about the Binutils
mailing list