This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ebcdic support for binutils...



> 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().


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]