On 2011年04月08日 06:14, [email protected] wrote:
Try this:
---[ test.S ]---
// gcc -march=loongson2f test.S -o test
.text
.global main
main:
ldc1 $f1, a
ldc1 $f2, b
madd.d $f0, $f1, $f2
Could it be the problem of using odd number floatpoint registers for double?
MIPS has two modes, normally we use 32bit registers mode, for double, we use
a pair. e.g.
lwc1 f0, xx1_low
lwc1 f1, xx1_high
lwc1 f2, xx2_low
lwc1 f3, xx2_high
fadd.d f4, f0, f2
jalr $t9
nop
.data
a: .quad 0x0
b: .quad 0x7ff7ffffffffffff
---[ test.S ]---
compile and run : it simulates a madd.d instruction with same input as your
guile program when crashing, ie. a sigill because of a arithmetic error.
This crash in my yeeloong as well.
as already noted in various previous threads, it would be easier if sigfpe
were raised instead.
But the real question is: how guile (or any other program) is supposed to
handle this? I'm completely ignorant in floating point arithmetic, so I have
no idea.
--
You received this message because you are subscribed to the Google Groups
"loongson-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/loongson-dev?hl=en.