Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #14166
| From | stephenXXX@mpeforth.com (Stephen Pelc) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Any thoughts on ARM FORTH register usage |
| Message-ID | <5007c81d.235658401@192.168.0.50> (permalink) |
| References | <614b2a42-0df7-48af-92f1-0161e149ba45@googlegroups.com> <33344b11-5871-4c3e-8bbd-368c4f06eb77@googlegroups.com> |
| Date | 2012-07-19 08:56 +0000 |
On Thu, 19 Jul 2012 00:56:50 -0700 (PDT), "Clyde W. Phillips Jr." <cwpjr02@gmail.com> wrote: >Thanks Steve. My name is Stephen. > If STC = Subroutine Threaded Code I assume you are recommending > it because of the Link Register as Return Stack Pointer is only > 1 level. Am I understanding this correctly? No. Regardless of the so-called data on threading performance, tests on real systems usually show that naive STC without inlining or optimisation is two times faster than DTC. This occurs because of the nest/unnest overhead. This overhead becomes worse with short definitions. You need to read the ARM Tech Ref Manual for the core you are using. In hand-waving terms, a branch costs 3 cycles, a read/write costs 3 or 2, and register operations happen in 1. In STC for ARM or Cortex, you need two instructions for the call BL foo ... foo: PUSH LR and one or two for the return, but mostly POP PC Now start counting clocks for DTC and ITC. Now inline @ as mov tos, [ tos, # 0 ] and so on and so on. Then add a real code generator such as VFX to the mix and the factor of 2 has become a factor of 10. That's why our MPE Forth Stamp cross compiler is such a bargain. Stephen -- Stephen Pelc, stephenXXX@mpeforth.com MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeforth.com - free VFX Forth downloads
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Any thoughts on ARM FORTH register usage Clyde Phillips <cwpjr02@gmail.com> - 2012-07-15 22:01 -0700
Re: Any thoughts on ARM FORTH register usage stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-16 08:50 +0000
Re: Any thoughts on ARM FORTH register usage "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2012-07-19 00:56 -0700
Re: Any thoughts on ARM FORTH register usage stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-19 08:56 +0000
Re: Any thoughts on ARM FORTH register usage "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2012-07-19 16:13 -0700
Re: Any thoughts on ARM FORTH register usage stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-20 05:38 +0000
Re: Any thoughts on ARM FORTH register usage "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2012-07-23 23:08 -0700
Re: Any thoughts on ARM FORTH register usage stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-24 09:05 +0000
Re: Any thoughts on ARM FORTH register usage "Clyde W. Phillips Jr." <cwpjr02@gmail.com> - 2012-07-24 16:20 -0700
Re: Any thoughts on ARM FORTH register usage stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-25 08:01 +0000
csiph-web