Search the web
Sign In
New User? Sign Up
fpga-cpu · FPGA CPU and SoC discussion list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
CISCifying RISC calls and returns   Message List  
Reply | Forward Message #703 of 3302 |
(Rob babbling away again...)

In the perpetual analysis for, and in striving for the perfect isa,
it seems to me that cisc style calls and returns would be better than
than the risc style of using a link register. But I'm wondering *why*
it hasn't been done.

For instance, a 'call' instruction could be viewed as nothing more
than a specialized store instruction that stores the pc to
the stack. Similarly, a 'ret' just retrieves (loads) the pc from the
stack. Of course the stack pointer has to be adjusted, but that is
*very* simple to do.

It seems to me that using cisc style calls and returns could
eliminate the two instructions from every non-leaf subroutine that
are otherwise required to save and restore the link register. This
should result in a modest performance gain of two per cent across the
non-leaf routines.

Before I go ahead and modify my processor, I'd like to know why this
is a bad idea ?

If implemented, this would mean my processor is no longer strictly a
load / store architecture. Maybe I'll call it a HyRC - HYbrid Risc -
Cisc ("Herc") processor ? Or better yet a CRHy ("Cry") processor.

PS. I'm thinking of code naming my 240Mips EPIC processor
the "Puffin".

Thanks
Rob http://www.birdcomputer.ca/






Fri Nov 16, 2001 6:58 am

rtfinch35
Offline Offline
Send Email Send Email

Forward
Message #703 of 3302 |
Expand Messages Author Sort by Date

(Rob babbling away again...) In the perpetual analysis for, and in striving for the perfect isa, it seems to me that cisc style calls and returns would be...
robfinch@...
rtfinch35
Offline Send Email
Nov 16, 2001
6:58 am

... But on a RISC CPU that doesn't have return address storing calls, there is not necessarily an explicit stack register. Such calls would require one. ... ...
Johan Klockars
johanklockars
Offline Send Email
Nov 16, 2001
9:36 am

First, thanks for the reply. It's very good to have someone to bounce ideas off of. Cisc style calls / returns are not a very significant performance benefit...
robfinch@...
rtfinch35
Offline Send Email
Nov 17, 2001
1:30 am

... so Hey, I found a cheesy way around having an explicit stack pointer register. Instead of the jump-and-link instruction specifying the link register, it...
robfinch@...
rtfinch35
Offline Send Email
Nov 18, 2001
2:47 am

... And what is wrong with a explicit stack pointer anyhow? In my current cpu design I have a memory accessed relative to a global base register for static...
Ben Franchuk
woodelf1
Offline Send Email
Nov 18, 2001
6:58 am

... There is absolutely nothing wrong with an explicit stack pointer. I think it's a good idea. I've always wondered why being able to specify any register as...
robfinch@...
rtfinch35
Offline Send Email
Nov 18, 2001
8:10 pm

... This delivers flexibility, and more importantly, simplicity, in the instruction set and in the implementation. Using a general purpose register instead of...
Jan Gray
jsgray@...
Send Email
Nov 20, 2001
2:11 am

... I was thinking in terms of from a programming standpoint. AFAIK programming wise, there is no advantage. In terms of hardware, I won't argue there is no...
robfinch@...
rtfinch35
Offline Send Email
Nov 20, 2001
6:29 am

... Not so. Leaf routines need not save the link register to the stack and thus can avoid an expensive load and an expensive store. Studies show that the...
Tommy Thorn
tt1729
Offline Send Email
Nov 20, 2001
6:58 am

<Rob being offensive> First, *read the post*, I was talking about the stack pointer not the link register. <Rob trying to be nice because he wants to be...
robfinch@...
rtfinch35
Offline Send Email
Nov 20, 2001
11:29 am

... Yep just like that. In this version I have no memory segments like the x86 processor. This is a flat 16 meg address space with ram/rom at the bottom of...
Ben Franchuk
woodelf1
Offline Send Email
Nov 18, 2001
11:27 pm

... Providing you have push/pop for general registers even stack intensive programs like FORTH should work fine. Ben Franchuk. -- Live "Pre-historic Cpu's" --...
Ben Franchuk
woodelf1
Offline Send Email
Nov 18, 2001
11:39 pm

... If you mean push/pop of general registers on a single stack, that's not sufficient. FORTH wants separate data (evaluation) and return stacks. If you mean...
Eric Smith
jdripper
Offline Send Email
Nov 19, 2001
6:44 am

... I meant the above. I assumed that a general register could be used for auto-incriment/decriment as this is a modern design. I forgot about x86 style 'want...
Ben Franchuk
woodelf1
Offline Send Email
Nov 19, 2001
3:46 pm

... The link register idea is faster for short subroutine calls rather than inline code. getchar() comes to mind here. ... Why don't you define them as Macros...
Ben Franchuk
woodelf1
Offline Send Email
Nov 20, 2001
7:33 am

... Yea, this is probably the best bet. I've already got a few things defined as macros that are directly recognized by the assembler. ... the ... with a ... ...
robfinch@...
rtfinch35
Offline Send Email
Nov 20, 2001
11:59 am

I opted for an internal return stack for the YARD-1A core, which has worked out well so far, although I have yet to decide on the exact overflow handling...
brimdavis@...
brimdavis
Offline Send Email
Nov 21, 2001
3:38 am

Hi, Since I designed the MicroBlaze, I can say why MicroBlaze ended up to way it did. There is a tradeoff between area and performance and I tried to find a...
Goran Bilski
goran.bilski@...
Send Email
Nov 20, 2001
4:58 pm

Hi, I forgot to mention that MicroBlaze instruction for branch and link can have any of the 32 registers as the link register. The compiler needs however to...
Goran Bilski
goran.bilski@...
Send Email
Nov 20, 2001
5:04 pm

... Some compilers have a mechaism to allow the programmer to tell the compiler a routine is a leaf function. Some versions of GCC have this option. GCC for...
veronica.merryfield@...
veronica_mer...
Offline Send Email
Nov 20, 2001
5:31 pm

... Years back I remember in Dr Dobb's (early 1980's?) somebody had a idea for marking C-functions calling depth so that leaf functions could use static ...
Ben Franchuk
woodelf1
Offline Send Email
Nov 20, 2001
5:34 pm

... Other than small C , is GCC and LCC the only reasonably easily to port C compilers out there? I still figure a C compiler (source & basic library) need not...
Ben Franchuk
woodelf1
Offline Send Email
Nov 20, 2001
5:40 pm

Ben ... LCC isn't big. It isn't difficult to port. LCC is ANSI C only. The library support is poor. GCC is big. It is difficult to port. It is C and C++. The...
veronica.merryfield@...
veronica_mer...
Offline Send Email
Nov 20, 2001
5:56 pm

Hi, LCC takes one week to port but the optimization isn't that great. No good register allocation, etc .. No libraries. GCC takes 1-3 month to port but the...
Goran Bilski
goran.bilski@...
Send Email
Nov 20, 2001
6:02 pm

Rob I meant to pick up on this when I saw it, so appologies for the delay. ... This was said in a broader discussion about link registers verses stack and also...
Veronica Merryfield
veronica_mer...
Offline Send Email
Nov 21, 2001
10:45 pm

Hi Veronica, ... Cache flushing is a problem right now as there is no good way to invalidate the cache all at once. I've thought of a couple of different...
robfinch@...
rtfinch35
Offline Send Email
Nov 22, 2001
8:04 am

... Don't forget the old 'exchange' register instructions like on the Z80. They too could be adapted easily with the larger FPGA ram nowadays. ... Lets not...
Ben Franchuk
woodelf1
Offline Send Email
Nov 22, 2001
1:54 am

... Need all the software have the same cache size.Can't you have small and medium fixed size cache for core kernel/irq service and the standard cache for...
Ben Franchuk
woodelf1
Offline Send Email
Nov 22, 2001
6:06 pm

Go eat dinner !!!!! Happy thanksgiving __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting,...
Ed Corter
artiedc
Offline Send Email
Nov 22, 2001
7:28 pm
First  | < Prev  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help