Make vconst BxN match specification
This commit is contained in:
@@ -16,7 +16,7 @@ block0:
|
|||||||
return v0
|
return v0
|
||||||
}
|
}
|
||||||
|
|
||||||
; sameln: [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0]
|
; sameln: [FF, FF, 0, 0, FF, FF, 0, 0, FF, FF, 0, 0, FF, FF, FF, FF]
|
||||||
|
|
||||||
|
|
||||||
; Since both jump tables and constants are emitted after the function body, it is important that they do not interfere.
|
; Since both jump tables and constants are emitted after the function body, it is important that they do not interfere.
|
||||||
|
|||||||
@@ -1075,9 +1075,8 @@ impl<'a> Parser<'a> {
|
|||||||
if lane_size < 1 {
|
if lane_size < 1 {
|
||||||
panic!("The boolean lane must have a byte size greater than zero.");
|
panic!("The boolean lane must have a byte size greater than zero.");
|
||||||
}
|
}
|
||||||
let mut buffer = vec![0; lane_size as usize];
|
let value = if value { 0xFF } else { 0 };
|
||||||
buffer[0] = if value { 1 } else { 0 };
|
vec![value; lane_size as usize]
|
||||||
buffer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !ty.is_vector() {
|
if !ty.is_vector() {
|
||||||
@@ -3824,7 +3823,7 @@ mod tests {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
c.into_vec(),
|
c.into_vec(),
|
||||||
[1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
|
[0xFF, 0xFF, 0xFF, 0xFF, 0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0, 0, 0]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user