Support comp_matrix
This commit is contained in:
@@ -21,6 +21,17 @@ namespace JabyEngine {
|
||||
__asm__ volatile("lwc2 $5, 4(%0)" :: "r"(&vector));
|
||||
}
|
||||
|
||||
// Load LS 16 bits of VECTOR to 16 bit universal vector.
|
||||
static __always_inline void ldlv0(const VECTOR& vector) {
|
||||
__asm__ volatile("lhu $13, 4(%0)" :: "r"(&vector) : "$12", "$13");
|
||||
__asm__ volatile("lhu $12, 0(%0)" :: "r"(&vector) : "$12", "$13");
|
||||
__asm__ volatile("sll $13, $13, 16" :: "r"(&vector) : "$12", "$13");
|
||||
__asm__ volatile("or $12, $12, $13" :: "r"(&vector) : "$12", "$13");
|
||||
__asm__ volatile("mtc2 $12, $0" :: "r"(&vector) : "$12", "$13");
|
||||
__asm__ volatile("lwc2 $1, 8(%0)" :: "r"(&vector) : "$12", "$13");
|
||||
|
||||
}
|
||||
|
||||
// Load column vector of MATRIX to universal register
|
||||
static __always_inline void ldclmv(const MATRIX& matrix, size_t col) {
|
||||
__asm__ volatile("lhu $12, 0(%0)" :: "r"(reinterpret_cast<uintptr_t>(&matrix) + (col << 1)) : "$12", "$13", "$14");
|
||||
|
Reference in New Issue
Block a user