summary refs log tree commit diff stats
path: root/results/classifier/gemma3:27b/instruction/1771
blob: 818e547e806eacd1048561c82ded10dcc8d268da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Missing CASA instruction handling for SPARC qemu-user
Description of problem:
Qemu-sparc does not handle the CASA instruction, even if the selected CPU (in this case, LEON3) support it.
Steps to reproduce:
1. Launch a program that use CASA instruction (any program, also "ls" on a recent glibc [>=2.31])
2. qemu-sparc will raise "Illegal instruction"
Additional information:
The following patch remove the missing handling, but it needs asi load/store that is not implemented for sparc32 user-space.

```
diff -urp qemu-20230327.orig/target/sparc/translate.c qemu-20230327/target/sparc/translate.c
--- qemu-20230327.orig/target/sparc/translate.c 2023-03-27 15:41:42.000000000 +0200
+++ qemu-20230327/target/sparc/translate.c      2023-04-01 15:24:18.293176711 +0200
@@ -5521,7 +5522,7 @@ static void disas_sparc_insn(DisasContex
                 case 0x37: /* stdc */
                     goto ncp_insn;
 #endif
-#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
+//#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
                 case 0x3c: /* V9 or LEON3 casa */
 #ifndef TARGET_SPARC64
                     CHECK_IU_FEATURE(dc, CASA);
@@ -5529,8 +5530,8 @@ static void disas_sparc_insn(DisasContex
                     rs2 = GET_FIELD(insn, 27, 31);
                     cpu_src2 = gen_load_gpr(dc, rs2);
                     gen_cas_asi(dc, cpu_addr, cpu_src2, insn, rd);
+//#endif
                     break;
-#endif
                 default:
                     goto illegal_insn;
                 }
```