From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fdb77,db15d2f6cb54705a X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,db15d2f6cb54705a X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,db15d2f6cb54705a X-Google-Attributes: gid1073c2,public X-Google-Thread: 101deb,db15d2f6cb54705a X-Google-Attributes: gid101deb,public X-Google-Thread: 10a146,db15d2f6cb54705a X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-06-28 14:49:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!netnews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.bc.home.com.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.ada,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml,comp.lang.java.advocacy Subject: Re: S/390 (was Market pressures for more reliable software) Organization: Canadian Mind Products Reply-To: roedy@mindprod.com Message-ID: References: X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 28 Jun 2001 21:49:23 GMT NNTP-Posting-Host: 24.76.128.193 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.bc.home.com 993764963 24.76.128.193 (Thu, 28 Jun 2001 14:49:23 PDT) NNTP-Posting-Date: Thu, 28 Jun 2001 14:49:23 PDT Xref: archiver1.google.com comp.lang.ada:9221 comp.lang.java.programmer:79459 comp.lang.pl1:1159 comp.lang.vrml:3939 comp.lang.java.advocacy:22187 Date: 2001-06-28T21:49:23+00:00 List-Id: On Thu, 28 Jun 2001 11:44:29 GMT, robin wrote or quoted : >With the BALR instruction, one or >more registers can be loaded with the absolute address of the next >instruction. This register(s) can then be used as the >base register(s). No address constants needed. The BALR was S/360's rather odd subroutine jump instruction. BALR 14,15 would put the return address in reg 14 and jump to the subroutine addressed by reg 15. There was no hardware stack. If the called routine was not a leaf routine it that to call GETMAIN to allocate a block of RAM to store the regs, and when it was done call FREEMAIN to give it back. OUCH. However, when the subroutine was a leaf (called no methods), this was very efficient, because you could return without having to access ram/stack, just look in R14. Now to bring this back to JAVA. I thought there should be special optimisations for calls to Java leaf routines where the return address is left in a register, and the usual overhead of creating a stack frame is bypassed. This would be analogous to the old S/360 BALR 14,15. Clever lookahed logic in hardware could then get you your subroutine return for free. I did an optimisation of this form in my BBL Forth compiler. It made a huge difference on the old 8086 that did not have an optimised stack-based call/ret. Chuck Moore's SHBOOM chip reserved a bit in each operand for piggybacking a ret. The Pentium has such a well optimised CALL/RET using this trick would not buy you anything. However, it might be something clever to try in a Picojava processor. For more detail, please look up the key words mentioned in this post in the Java Glossary at: http://mindprod.com/gloss.html -- Roedy Green, Canadian Mind Products Custom computer programming since 1963. Ready to take on new work.