summaryrefslogtreecommitdiff
path: root/tools/arch/loongarch
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 11:13:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 11:13:51 +0200
commit56fb05093756ed55ba1cdf5d432a68004da67860 (patch)
tree87dc333d4f606f375d6253eb5b8ef6f04674ffa6 /tools/arch/loongarch
parentb6a153b0829afbc63032e8271d3ca9a19e704e03 (diff)
parentda274362a7bd9ab3a6e46d15945029145ebce672 (diff)
Merge v6.12.49linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/arch/loongarch')
-rw-r--r--tools/arch/loongarch/include/asm/inst.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/arch/loongarch/include/asm/inst.h b/tools/arch/loongarch/include/asm/inst.h
index c25b5853181d..d68fad63c8b7 100644
--- a/tools/arch/loongarch/include/asm/inst.h
+++ b/tools/arch/loongarch/include/asm/inst.h
@@ -51,6 +51,10 @@ enum reg2i16_op {
bgeu_op = 0x1b,
};
+enum reg3_op {
+ amswapw_op = 0x70c0,
+};
+
struct reg0i15_format {
unsigned int immediate : 15;
unsigned int opcode : 17;
@@ -96,6 +100,13 @@ struct reg2i16_format {
unsigned int opcode : 6;
};
+struct reg3_format {
+ unsigned int rd : 5;
+ unsigned int rj : 5;
+ unsigned int rk : 5;
+ unsigned int opcode : 17;
+};
+
union loongarch_instruction {
unsigned int word;
struct reg0i15_format reg0i15_format;
@@ -105,6 +116,7 @@ union loongarch_instruction {
struct reg2i12_format reg2i12_format;
struct reg2i14_format reg2i14_format;
struct reg2i16_format reg2i16_format;
+ struct reg3_format reg3_format;
};
#define LOONGARCH_INSN_SIZE sizeof(union loongarch_instruction)