Instruction Set / Compiler

Reply

Join Date: Mar 2007
Posts: 686
Reputation: sillyboy is on a distinguished road 
Solved Threads: 61
sillyboy's Avatar
sillyboy sillyboy is offline Offline
Practically a Master Poster

Instruction Set / Compiler

 
0
  #1
Mar 31st, 2007
Hi all,
I am after a instruction set with limited or no floating-point instructions. Why I want this is to get a compiler of this certain architecture and compile code (one with floating-point and the other without). With the resulting assembly I wanted to compare the two and do some analysis.

So what I need exactly is a compiler with access to compiling with/without floating-point.

Any help is welcome, thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: Instruction Set / Compiler

 
0
  #2
Mar 31st, 2007
Not sure what you mean. Either a processor has a built in capability to do floating point calculations (as all Intel processors nowadays have), or it hasn't. If it does have that capability, it would take a fairly eccentric compiler writer not to take advantage of it. On the other hand, if the processor does not have that capability there is, by definition, no possibility of a compiler producing code which contains floating point (machine code) instructions.

Possibly you are thinking of a situation which existed many years ago. In those days Intel processors did not have a built in floating point unit, but there was a seperate maths co-processor which was sometimes to be found on the mother board, and sometimes not. In those days compilers had to take account of both possibilities. But today the situation is different, and a floating point capability is always to be found in the processor.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 686
Reputation: sillyboy is on a distinguished road 
Solved Threads: 61
sillyboy's Avatar
sillyboy sillyboy is offline Offline
Practically a Master Poster

Re: Instruction Set / Compiler

 
0
  #3
Mar 31st, 2007
I'm not actually after a processor for this. All I need is a compiler to emulate a situation with/without an extensive floating-point instruction set.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: Instruction Set / Compiler

 
0
  #4
Apr 1st, 2007
That's what I'm saying. Given that all processors do nowadays have an extensive floating point instruction set you are unlikely to find a compiler which makes life difficult (and slow) for itself by doing in software what is far better done in hardware.

If you were a compiler writer would you be able to see any point in not using the available capabilities of the hardware? What would be the point of having a software implementation even available as an option?
Last edited by mathematician; Apr 1st, 2007 at 6:38 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 49
Reputation: Purple Avenger is an unknown quantity at this point 
Solved Threads: 0
Purple Avenger Purple Avenger is offline Offline
Light Poster

Re: Instruction Set / Compiler

 
0
  #5
Apr 2nd, 2007
Almost all early DOS C compilers can generate hard 87 stuff or emulated 87'. Most assemblers can do it too.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 129
Reputation: Evenbit is on a distinguished road 
Solved Threads: 4
Evenbit's Avatar
Evenbit Evenbit is offline Offline
Junior Poster

Re: Instruction Set / Compiler

 
0
  #6
Apr 3rd, 2007
Originally Posted by sillyboy View Post
Hi all,
I am after a instruction set with limited or no floating-point instructions. Why I want this is to get a compiler of this certain architecture and compile code (one with floating-point and the other without). With the resulting assembly I wanted to compare the two and do some analysis.

So what I need exactly is a compiler with access to compiling with/without floating-point.

Any help is welcome, thanks in advance.
The old compilers for 16-bit DOS and 16-bit Windows (that would be Windows versions 3.0, 3.1, and 3.11, etc.) provided such functionality. You can still download compilers like that. Two that I know of:

GFA BASIC

http://en.wikipedia.org/wiki/GFA_BASIC

Digital Mars C/C++

http://www.digitalmars.com/

Nathan.
while (CPU is present) {some assembly required}
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 24
Reputation: Ryu is an unknown quantity at this point 
Solved Threads: 0
Ryu Ryu is offline Offline
Newbie Poster

Re: Instruction Set / Compiler

 
0
  #7
Apr 3rd, 2007
Back in DOS days the FPU was software emulated by an interrupt which a modern processor should never interrupt to. In otherwords you'll need the CPU to trigger that interrupt, a ancient system that does not have a FPU which is pretty rare to have..

It did or may even still have a interrupt number reserved for this purpose, however my other point is if your going to emulate this case, modern operating systems won't allow you to install ISR's which sturs up a problem, unless your satisfied on doing this in DOS.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 49
Reputation: Purple Avenger is an unknown quantity at this point 
Solved Threads: 0
Purple Avenger Purple Avenger is offline Offline
Light Poster

Re: Instruction Set / Compiler

 
0
  #8
Apr 6th, 2007
Originally Posted by Ryu View Post
modern operating systems won't allow you to install ISR's
You can hook the NPX exception on almost anything. Its not anything that requires ring 0 interactions within an OS.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC