Skip to content

Commit 7c0ef85

Browse files
committed
fix vector regs in test case
1 parent f09cc54 commit 7c0ef85

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/ui/asm/hexagon-register-pairs.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ add-core-stubs
2-
//@ compile-flags: --target hexagon-unknown-linux-musl
2+
//@ compile-flags: --target hexagon-unknown-linux-musl -C target-feature=+hvx-length128b
33
//@ needs-llvm-components: hexagon
44

55
#![feature(no_core, asm_experimental_arch)]
@@ -20,12 +20,12 @@ fn test_register_spans() {
2020
asm!("r15:14 = memd(r30+#8)", lateout("r14") _, lateout("r15") _);
2121
asm!("memd(r29+#0) = r5:4", in("r4") 0u32, in("r5") 0u32);
2222

23-
// Vector register pairs (hypothetical since we can't actually use them without HVX)
24-
asm!("nop // V5:4 = vadd(V3:2, V1:0)"); // Comment form to avoid actual instruction issues
25-
asm!("nop // V7:6.w = vadd(V5:4.w, V3:2.w)"); // With type suffixes
23+
// Vector register pairs
24+
asm!("V5:4 = vadd(V3:2, V1:0)", out("v4") _, out("v5") _);
25+
asm!("V7:6.w = vadd(V5:4.w, V3:2.w)", in("v4") _, in("v5") _, out("v6") _, out("v7") _);
2626

2727
// Predicate register pairs
28-
asm!("nop // p1:0 = vcmpb.eq(V1:0, V3:2)"); // Comment form
28+
asm!("p1:0 = vcmpb.eq(V1:0, V3:2)", in("v1") _, in("v2") _, in("v3") _, in("v4") _, out("p0") _, out("p1") _);
2929

3030
// Mixed with actual labels should still trigger for the labels
3131
asm!("label1: r7:6 = combine(#2, #3)"); //~ ERROR avoid using named labels

0 commit comments

Comments
 (0)