FPU exception

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

FPU exception

Post by asdfgh »

i am gettin triple fault when ever i use float values..
how to remove it.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: FPU exception

Post by Combuster »

Solution: Don't use floats.

Seriously, you sound like your kernel is messed up such that you can't even handle an exception properly. Make sure your IDT and exception handlers work first before even trying these things.

Also, many consider the use of floats in the kernel bad practice.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

Re: FPU exception

Post by asdfgh »

no idt is set up correct..

i get a eror when i do any operation of float..
not when i assign
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: FPU exception

Post by Combuster »

no idt is set up correct..
Then prove that it is, as the triple fault obviously suggests otherwise.

The reason why I ask, is because the place where you fail to complete this proof is most likely the place where your real problem is.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
asdfgh
Member
Member
Posts: 42
Joined: Fri Apr 18, 2008 9:14 pm

Re: FPU exception

Post by asdfgh »

ok..correctd but now every time i use a float i get a floating point exception.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: FPU exception

Post by Combuster »

i get a floating point exception.
Then you also know that you should check all possible causes of that exception. It's not that difficult.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: FPU exception

Post by pcmattman »

And you find all possible causes by, well, RTFM.
Post Reply