summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/118/device/2317
blob: c6427ac21c7c4eb28e3f03e3b2b2965faac0a0c5 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
device: 0.841
ppc: 0.814
register: 0.813
socket: 0.672
permissions: 0.667
graphic: 0.665
vnc: 0.650
hypervisor: 0.644
kernel: 0.641
performance: 0.638
architecture: 0.630
network: 0.620
semantic: 0.613
assembly: 0.550
boot: 0.545
risc-v: 0.518
peripherals: 0.494
mistranslation: 0.480
PID: 0.474
files: 0.448
arm: 0.443
debug: 0.369
user-level: 0.317
VMM: 0.300
x86: 0.274
i386: 0.240
TCG: 0.232
KVM: 0.048
virtual: 0.026

SH4:  ADDV instruction not emulated properly
Description of problem:
ADDV opcode is emulated incorrectly.

The documentation says:

`ADDV Rm, Rn        Rn + Rm -> Rn, overflow -> T`

What Qemu actually emulates:

`ADDV Rm, Rn        Rn + Rm -> Rm, overflow -> T`
Steps to reproduce:
```c
#include <stdio.h>

int main(void)
{
	register unsigned int a asm("r8") = 0x7fffffff;
	register unsigned int b asm("r9") = 1;
	register unsigned int c asm("r10");

	asm volatile("clrt\n"
		     "addv %2,%0\n"
		     "movt %1\n"
		     : "+r"(a), "=r"(c) : "r"(b) :);

	printf("Values: a=0x%x b=0x%x c=0x%x\n", a, b, c);

	return 0;
}

```
Additional information:
Tested on real hardware (SEGA Dreamcast, GCC 15.0), the program above prints:
`Values: a=0x80000000 b=0x1 c=0x1`

Running with Qemu (and GCC 13.0), the same program prints:
`Values: a=0x7fffffff b=0x80000000 c=0x1`