blob: e94a8cf178d86812514f881f105cebff4a84a947 (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
architecture: 0.922
ppc: 0.848
graphic: 0.844
device: 0.803
performance: 0.747
mistranslation: 0.701
semantic: 0.647
vnc: 0.578
PID: 0.575
permissions: 0.423
peripherals: 0.414
arm: 0.411
boot: 0.365
debug: 0.348
user-level: 0.310
risc-v: 0.306
TCG: 0.305
kernel: 0.272
hypervisor: 0.247
x86: 0.226
VMM: 0.226
network: 0.172
i386: 0.171
register: 0.171
virtual: 0.150
socket: 0.138
files: 0.101
assembly: 0.044
KVM: 0.019
--------------------
ppc: 0.997
performance: 0.797
architecture: 0.441
kernel: 0.251
debug: 0.219
TCG: 0.170
files: 0.102
device: 0.025
user-level: 0.025
semantic: 0.020
peripherals: 0.020
assembly: 0.014
PID: 0.013
register: 0.012
virtual: 0.007
risc-v: 0.005
VMM: 0.004
hypervisor: 0.004
network: 0.003
boot: 0.003
permissions: 0.003
graphic: 0.002
KVM: 0.001
mistranslation: 0.001
vnc: 0.001
socket: 0.001
arm: 0.001
x86: 0.000
i386: 0.000
PowerPC AltiVec source vector subnormal values are not flushed to zero
Description of problem:
AltiVec specifies that source and result vectors are flushed to zero (in NJ mode). Only result vectors are flushed to zero.
Steps to reproduce:
1. Compile the attached Rust program (e.g. `cargo +nightly build --target powerpc-unknown-linux-gnu`)
2. Run the program and expect assertions to pass.
3. See assertions fail.
Additional information:
See the offending Rust program:
```
#![feature(stdsimd, powerpc_target_feature)]
use std::arch::powerpc::*;
#[target_feature(enable = "altivec")]
unsafe fn add(x: f32, y: f32) -> f32 {
let array: [f32; 4] = unsafe { std::mem::transmute(vec_add(vec_splats(x), vec_splats(y))) };
array[0]
}
pub fn main() {
let result = unsafe { add(-1.0857398e-38, 0.) };
assert_eq!(result, 0.);
// if the input is flushed, the result will be +0
// if only the output is flushed, the result is -0
assert!(result.is_sign_positive());
}
```
|