adding predicate instruction

This commit is contained in:
Blaise Tine
2021-08-31 03:23:59 -04:00
parent 6caf674163
commit c162ce526f
7 changed files with 57 additions and 32 deletions

View File

@@ -53,8 +53,13 @@ extern "C" {
})
// Set thread mask
inline void vx_tmc(unsigned num_threads) {
asm volatile (".insn s 0x6b, 0, x0, 0(%0)" :: "r"(num_threads));
inline void vx_tmc(unsigned mask) {
asm volatile (".insn s 0x6b, 0, x0, 0(%0)" :: "r"(mask));
}
// Set thread predicate
inline void vx_pred(unsigned condition) {
asm volatile (".insn s 0x6b, 0, x1, 0(%0)" :: "r"(condition));
}
typedef void (*vx_wspawn_pfn)();