0001-riscv64-disable-fp-multiply-and-accumulate-instructi.patch 902 B

12345678910111213141516171819202122232425262728293031
  1. From 4a599374d97dc4402ddc00171e388df6df21265c Mon Sep 17 00:00:00 2001
  2. From: JY <junyuan.tan@starfivetech.com>
  3. Date: Mon, 14 Nov 2022 10:39:16 +0800
  4. Subject: [PATCH 1/1] [riscv64] disable fp multiply and accumulate
  5. instructions
  6. Some wasm interpreter tests are failing since instructions generated
  7. by gcc such as *multiply and and* (fmadds) create intermediate
  8. results bigger than 8 bytes which doesn't match other architectures,
  9. hence the resulting output differs.
  10. Port commit 13314a207e2b22a10c72bfa83f985c7ff144c775
  11. ---
  12. BUILD.gn | 1 +
  13. 1 file changed, 1 insertion(+)
  14. diff --git a/BUILD.gn b/BUILD.gn
  15. index 988c907d96..fff48825e0 100644
  16. --- a/BUILD.gn
  17. +++ b/BUILD.gn
  18. @@ -1009,6 +1009,7 @@ config("toolchain") {
  19. cflags = []
  20. ldflags = []
  21. + cflags += ["-ffp-contract=off"]
  22. if (v8_current_cpu == "arm") {
  23. defines += [ "V8_TARGET_ARCH_ARM" ]
  24. if (arm_version >= 7) {
  25. --
  26. 2.25.1