Skip to content

Commit 90ccc1f

Browse files
committed
esp32: enable the FPU
This allows working with float32 values, for example it allows testdata/float.go to work correctly (assuming an Xtensa backend bug is fixed, see espressif/llvm-project#41).
1 parent e882a4a commit 90ccc1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/device/esp/esp32.S

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ call_start_cpu0:
4242
wsr.ps a2
4343
rsync
4444

45+
// Enable the FPU (coprocessor 0 so the lowest bit).
46+
movi a2, 1
47+
wsr.cpenable a2
48+
rsync
49+
4550
// Jump to the runtime start function written in Go.
4651
call4 main
4752

0 commit comments

Comments
 (0)