Skip to content

Instantly share code, notes, and snippets.

View xry111's full-sized avatar
😿
in an empty house

Xi Ruoyao xry111

😿
in an empty house
View GitHub Profile
@xry111
xry111 / gcc-lbt.patch
Created July 22, 2024 10:14
Useless patch to make GCC generate LBT instructions
From 5f9783382bbe039d1fd00fe43ff5adce3405398e Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <xry111@xry111.site>
Date: Tue, 11 Jun 2024 18:37:27 +0800
Subject: [PATCH] [NOT FOR UPSTREAM] LBT
Note that the result is *slower* so this is just a toy project. Maybe
we can use it if "-mlbt -Os" but I don't think it's valuable enough for
upstreaming.
---
gcc/config/loongarch/lbt.md | 242 +++++++++++++++++++++++
diff --git a/gas/NEWS b/gas/NEWS
index cf4e8ff7c95..d699a78b50d 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -66,6 +66,37 @@ Changes in 2.42:
* The BPF assembler now allows using both hash (#) and double slash (//) to
begin line comments.
+* Add support for LoongArch v1.10 new instructions: estimated reciprocal
+ instructions, sub-word atomic instructions, atomic CAS instructions,
diff --color -Naur firefox-91.8.0.orig/build/moz.configure/init.configure firefox-91.8.0.patched/build/moz.configure/init.configure
--- firefox-91.8.0.orig/build/moz.configure/init.configure 2022-03-31 03:25:29.000000000 +0800
+++ firefox-91.8.0.patched/build/moz.configure/init.configure 2022-04-21 19:24:15.397434052 +0800
@@ -753,6 +753,9 @@
elif cpu.startswith("arm"):
canonical_cpu = "arm"
endianness = "big" if cpu.startswith(("armeb", "armbe")) else "little"
+ elif cpu in ("loongarch64"):
+ canonical_cpu = "loongarch64"
+ endianness = "little"