944,031 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 2745
  • Assembly RSS
Mar 31st, 2007
0

Instruction Set / Compiler

Expand 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.
Similar Threads
Reputation Points: 85
Solved Threads: 64
Practically a Master Poster
sillyboy is offline Offline
686 posts
since Mar 2007
Mar 31st, 2007
0

Re: Instruction Set / Compiler

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.
Reputation Points: 14
Solved Threads: 4
Junior Poster
mathematician is offline Offline
149 posts
since Nov 2006
Mar 31st, 2007
0

Re: Instruction Set / Compiler

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.
Reputation Points: 85
Solved Threads: 64
Practically a Master Poster
sillyboy is offline Offline
686 posts
since Mar 2007
Apr 1st, 2007
0

Re: Instruction Set / Compiler

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.
Reputation Points: 14
Solved Threads: 4
Junior Poster
mathematician is offline Offline
149 posts
since Nov 2006
Apr 2nd, 2007
0

Re: Instruction Set / Compiler

Almost all early DOS C compilers can generate hard 87 stuff or emulated 87'. Most assemblers can do it too.
Reputation Points: 31
Solved Threads: 0
Light Poster
Purple Avenger is offline Offline
49 posts
since Jan 2007
Apr 3rd, 2007
0

Re: Instruction Set / Compiler

Click to Expand / Collapse  Quote originally posted by sillyboy ...
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.
Reputation Points: 99
Solved Threads: 5
Junior Poster
Evenbit is offline Offline
140 posts
since Mar 2005
Apr 3rd, 2007
0

Re: Instruction Set / Compiler

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.
Ryu
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ryu is offline Offline
24 posts
since Jul 2006
Apr 6th, 2007
0

Re: Instruction Set / Compiler

Click to Expand / Collapse  Quote originally posted by Ryu ...
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.
Reputation Points: 31
Solved Threads: 0
Light Poster
Purple Avenger is offline Offline
49 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: The best choice?
Next Thread in Assembly Forum Timeline: ASCII to number. I need a brilliant mind.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC