|[18 earlier articles]|
|Re: What is byte-code ? firstname.lastname@example.org (John Slimick) (2005-04-11)|
|Re: What is byte-code ? email@example.com (Chris Dollin) (2005-04-11)|
|Re: What is byte-code ? firstname.lastname@example.org (2005-04-11)|
|Re: What is byte-code ? email@example.com (Nathan Moore) (2005-04-16)|
|Re: What is byte-code ? firstname.lastname@example.org (glen herrmannsfeldt) (2005-04-16)|
|Re: What is byte-code ? email@example.com (2005-05-09)|
|Re: What is byte-code ? firstname.lastname@example.org (glen herrmannsfeldt) (2005-05-13)|
|From:||glen herrmannsfeldt <email@example.com>|
|Date:||13 May 2005 17:56:26 -0400|
|References:||05-03-015 05-03-026 05-03-053 05-03-088 05-03-125 05-04-005 05-04-037|
|Posted-Date:||13 May 2005 17:56:26 EDT|
Anton Ertl wrote:
(snip regarding switch statements or statement label arrays)
>>This will save you about 2 jumps per instructoin since the jump tables
>>that are usually spit out by compilers are:
> I have never seen that kind of code generated. Which compiler does it
> that way? Big, dense switch statements have been translated into a
> range check, an array access (for the target address), and an indirect
> jump to the target in the code I looked at (usually by gcc).
IBM S/360 (S/370, ESA/390, etc.) compilers generate that for computed
GOTO in Fortran, and switch in languages with that.
S/360 has pretty much only one memory addressing mode with is
12 bit constant plus register plus register.
The exit codes (return codes) of all IBM supplied S/360 programs are
multiples of four, convenient for use in indexed branch instructions.
(Hopefully after bounds testing.)
Return to the
Search the comp.compilers archives again.