sarah-walker-pcem / arculator

Arculator
http://b-em.bbcmicro.com/arculator
GNU General Public License v2.0
56 stars 23 forks source link

FPU crash #50

Open 0x746172677A opened 5 days ago

0x746172677A commented 5 days ago

I made a mistake while testing FPU ops and accidentally found a way to crash Arculator. Seems like ldfs f#, [r#] with r# containing a bad address causes a crash if your config has an FPU. Crashes with arm2+fppc under ROS3, generates an exception in RISC OS without the fppc.

Here's the minimal test case

.arch armv2
.fpu fpa
.global main
main:
    ldr r0, floatNum
    ldfs f0, [r0]
    mov pc, lr

floatNum:
    .word 0x3f9d70a4